Guest GorGor Posted October 13, 2003 Report Share Posted October 13, 2003 Using MDK CD1 to RESCUE your BOOTLOADER LiLO or Grub Assumptions You are reading this because you can't get any boot loader to load linux or you want a contingency technique 2) The rest of the system is ok especially /etc/fstab and at least /sbin/lilo or grub installed. 3) You know how to back up your data..... I strongly recommend partimage. Partimage saves mbr stuff with each saved image, so I don't need this mini-tutorial unless I have put images on a different partition table, heh heh. 4) You know how to change your bios to boot cdrom b4 hard disks with no floppy inserted either floppy cd hd or cd floppy hd 5) At end of command you know to press the ENTER key. 6) Your previous attempts to re-install boot loader from the rescue option has failed (it does for me too). 7) Feel free to correct my typos or other errors etc RESTORE LILO TO MBR boot cd1 and at first spash screen hit F1 and type rescue arrow down to mount partitions then tab to ok after mount occurs go back to rescue menu (thats enter ) arrow down to console then tab to ok loadkeys us (or whatever language or keyboard is) chroot /mnt ls (output will show a home and root directory proving you have a correctly mounted folder structure and not looking at the folders for the ramdisk) (skip this command if you trust me) /sbin/lilo (some lilo messages appear) remove cd and either type reboot or if journalised system like reieserfs hit the warm reboot reset button Lilo graphic and boot should now occur on boot up. RESTORE GRUB TO MBR ASSUME My ROOT is at /dev/hda3 and change it to suit your partition system. Grub counts from ZERO so its partitions 0,1,2 etc or its (hdaX subtract 1) Grub counts drives from ZERO and ignores that fact it may be scsi. I don't have any scsi so I will need others to confirm. Finally the special root command you see must have brackets and so (hd0,2) = first drive found, normally set on master ide controller and then there is COMMA and then the 2 means partiton THREE. There are no gaps in the brackets.= /dev/hda3 boot cd1 and at first spash screen hit F1 and type rescue arrow down to mount partitions then tab to ok after mount occurs (look at the screen it tells you where ROOT is mounted ie /dev/hdX use this info for the ROOT command) go back to rescue menu arrow down to console then tab to ok loadkeys us................(or whatever language or keyboard is) chroot /mnt............................................................................. .. ls......................................... (output will show a home and root directory proving you have a correctly mounted ..............................................folder structure and not looking at thefolders for the ramdisk) grub........................................(prompt changes to grub, you are now in the zone of hackers, heh heh ) root (hd0,2)............................ (or whatever you saw at the mount screen....most will use hdo, and hda1 will give .................................................you a 0, etc)....(ps root command is acting like a chroot command) There .................................................should be a response about detecting the type of fs. setup (hd0)..............................(there should a success response.) kernel /boot/vmlinuz.................(see notes) (there should be a bzImage response) initrd /boot/initrd.img............... (there should be a initrd response) boot..................................This quits the grub prompt and now remove cd and reboot. kernel notes 1) If you read the grub manual etc it may say kernel (hdx,y)/boot/vmlinuz root=/dev/hdax but my root command already takes care of root so you don't need the (hd) instruction or to restate where root is. ie I have set root structure absolutely and the kernel and initrd reference root relative to my ROOT command. 2) This is where you append your kernel eg acpi=off works for lots of hardware stuffups. References Grub and Lilo have stuff on Mdk cds and Mub and I read a number of references on /sbin/lilo and I found bvc's post to be very handy. There is also recovery stuff in Muo dox and heaps on the net if you google. WHAT HAPPENS NEXT 1) create a boot disk, label its partion to root and date it. THEN test please pretty please. 2) You will casually notice not a mention of other boot options to other partitions or floppies. I could do it, but its be done b4 and is a lot easier using Mdk control centre. 3) Be wary that independent emergency boot disks rarely address your hardware unusualness. My copy of toms boot disk does not have reiserfs kernel. Or the last time I checked it didn't. Did I mention partimage has a floppy system way of restoring your partitons and MBR, well I didn't heh heh. Quote Link to comment Share on other sites More sharing options...
Guest GorGor Posted October 17, 2003 Report Share Posted October 17, 2003 Append DOX OFF the net in case you are don't want to read your howto dox on cd. sample boot scripts here http://pelloni.org/linux/grub.html GRUB manual here http://www.gnu.org/manual/grub-0.92/html_m..._mono/grub.html ps I am likely to edit this after trying some more tricks Quote Link to comment Share on other sites More sharing options...
Guest GorGor Posted October 18, 2003 Report Share Posted October 18, 2003 Its getting bigger than ben hur lilo error l99 99 etc on screen. According to the lilo pdf the L and not li lil lilo etc shows stage 1 landed but probs. And the likely causes are because LILO has trouble with some bios. solution 1) If you have configured COMPACT as an option de-select it and rerun /sbin/lilo 2) if bios has trouble with your hardware, especially big drives try lba32 in your lilo.conf file and rerun /sbin/lilo 3) NO matter what changes you make always rerun /sbin/lilo or try grub. Quote Link to comment Share on other sites More sharing options...
Guest GorGor Posted October 18, 2003 Report Share Posted October 18, 2003 um, for those using grub, you do NOT need to command lba into your script? if you want to try it cos nothing has worked and lilo is too messy the command is --force-lba SCSI issue from the manual .....GRUB hangs up when accessing my SCSI disk. Check if you have turned on the support for INT 13 extension (LBA). If so, disable the support and see if GRUB can now access your SCSI disk. This will make it clear that your SCSI BIOS sucks. For now, we know the following doesn't provide working LBA mode: Adaptec AIC-7880 In the case where you have such a SCSI controller unfortunately, you cannot use the LBA mode, though GRUB still works fine in the CHS mode (so the well-known 1024 cylinders problem comes again to you) And from another part of manual, check your bios supports LBA and if not get the bios upgrade. I have dinosaur drives so this does not affect me yet Quote Link to comment Share on other sites More sharing options...
Guest GorGor Posted October 18, 2003 Report Share Posted October 18, 2003 BVC has just produced this error table for LILO BOOT ERRORS The boot process takes place in two stages. The first stage loader is a single sector, and is loaded by the BIOS or by the loader in the MBR. It loads the multi-sector second stage loader, but is very space lim- ited. When the first stage loader gets control, it types the letter "L"; when it is ready to transfer control to the second stage loader it types the letter "I". If any error occurs, like a disk read error, it will put out a hexadecimil error code, and then it will re-try the operation. All hex error codes are BIOS return values, except for the lilo-generated 40, 99 and 9A. A partial list of error codes follows: 00 no error 01 invalid disk command 0A bad sector flag 0B bad track flag 20 controller failure 40 seek failure (BIOS) 40 cylinder>1023 (LILO) 99 invalid second stage index sector (LILO) 9A no second stage loader signature (LILO) AA drive not ready FF sense operation failed Error code 40 is generated by the BIOS, or by LILO during the conver- sion of a linear (24-bit) disk address to a geometric (C:H:S) address. On older systems which do not support lba32 (32-bit) addressing, this error may also be generated. Errors 99 and 9A usually mean the map file (-m or map=) is not readable, likely because LILO was not re-run after some system change, or there is a geometry mis-match between what LILO used (lilo -v3 to display) and what is actually being used by the BIOS (one of the lilo diagnostic disks, available in the source distri- bution, may be needed to diagnose this problem). When the second stage loader has received control from the first stage, it prints the letter "L", and when it has initialized itself, including verifying the "Descriptor Table" - the list of kernels/others to boot - it will print the letter "O", to form the full word "LILO", in upper- case. MY COMMENT re run /sbin/lilo -v -v -v and if that fails you may have a bios issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.