Re: Problems reinstalling grub/lilo (they always hang at boot time ...)



Douglas,

I'm pretty sure I did not change anything in the /boot/grub directory. I
actually had backups of the bootsectors (first 512 byte of the harddisks)
and they were unaltered (or do these only contain the partition table?).

I did reinstall the files in the /boot/grub directory via grub-install but
the loader still hangs.

I used to load grub from the XP bootloader (and not the other way around as
you suggested), but for now I'm happy if I can directly boot from the disk
where the grub boot loader is located (/dev/hdb).

Thanks for your comments,
Olaf

Douglas Mayne wrote:

On Tue, 25 Apr 2006 00:42:05 +0200, Olaf wrote:

I suddenly cannot boot my ubuntu (5.04) linux system anymore (nor
windows). Everything worked fine until yesterday, but since I last shut
down my linux system I cannot boot any OS :(

Were you making changes to your system? Did you accidentally delete files
from /boot/grub?


Grub hangs after displaying the following messages:

Grub loading Stage1.5
Grub loading, please wait...

I've booted my system via the SystemRescueCD and
I've followed the instructions on the Grub wiki
http://grub.enbug.org/GrubLegacy in the troubleshooting section, but
unfortunately without any success. Using the described method via chroot
actually does not work since grub-install then cannot find "sort" and
other tools. But if I only mount the /boot partition I can then reinstall
grub, but the loader then still hangs ...

One possible problem I've noticed is, that I get a warning when I mount
the /boot partition. It is a ext3 partition, but is only mounted as ext2
(ext2_fill_super warning). Is there anything I need to (can) do about
this?

I don't use ext3, but I know an initial ramdisk may be required to load
the ext3 kernel module. Without the module, then it may be fall back to
use ext2 (since ext2 is backward compatible with ext3). You can use an
ext3 partition for strictly boot purposes, but when you start mounting
devices you need to have all of the necessary kernel modules loaded.
Also, your /etc/fstab file should specify the ext3 filesystem for the
partition in question.


Next I tried to install lilo:

I booted via SysRescCD and mounted /dev/hdb1 as /boot and
/dev/mapper/vg00-root as /mnt/sysimage. I then ran

lilo -C /mnt/sysimage/etc/lilo.conf -b /dev/hdb

Unfortunately this also results in lilo hanging as follows:

LIL

I would appreciate any help in order to get my linux system booted again
:)

My setup is as follows:
/dev/hda - used for Windows XP (Windows actually also fails to boot)

/dev/hdb Ubuntu, with /root and /home dirs via LVM,
/boot on /dev/hdb1 (ext3)

I used to chainload grub via the XP bootloader.

Do you mean that you use grub to chainload XP, similar to this:

title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1



Thanks,
Olaf

Decide which loader you want to use, then concentrate on fixing that
loader. I looked at the wiki you referenced, which says grub can hang at
this point if the grub files are damaged. Presumably, you would fix the
files at /boot/grub. Did you attempt to do that?

I don't use ubuntu. Perhaps, reinstalling the grub package will restore
your grub directory. I'll wait for your reply before posting more. I
don't use lilo.


.



Relevant Pages

  • Re: Fedora Core 2/Windows XP dual boot: selecting Linux doesnt work
    ... grub is installed on the /root partition, which is the first partition on hdc: hdc1, or in grub notation. ... Stage1 is the unpatched 512-byte file, that is patched and copied to the boot record during setup. ... This byte is initialized to 0xff in the stage1 file, but patched to 0x81 in your setup, to say "we are booting from disk." ...
    (comp.os.linux.setup)
  • Re: [opensuse] Yast & Grub bootloader different.
    ... My Grub bootup menu is different than the bootloader ... that shows up on the logon screen aat boot time. ... any boot loader for that matter, can only operate on one /boot partition at ... Grub doesn't scour the all hard drives on each install ...
    (SuSE)
  • Re: [Fwd: Re: [opensuse] Boot magic]
    ... Since I installed some milestones I can no longer boot the partition I want. ... I installed on part3 milestone 6 with its own boot directory in the rootdir. ... I only use the milestone 6 grub environment against my will. ...
    (SuSE)
  • Re: Boot manager for Windows only
    ... And also is GRUB capable of booting any ... > Windows partition or will it always hand over to the XP boot loader? ...
    (comp.os.linux.setup)
  • Re: Howto fix grub after converting to reiserfs
    ... The initial load of grub is done by the BIOS, which reads the boot sectors for additional information for the boot process. ... If you still have problems, and can come up with a small bit of additional disk space, near the beginning of the disk, create a separate partition for /boot and format it as ext3, move all the files from your existing subdirectory into this new partition, edit the menu.lst file to remove all references to '/boot', edit fstab to do a mount of this partition on /boot, and reboot. ... it will perform a full install presuming the Stage 2 or Stage 1.5^10 is in its final install location. ... 0, Filesystem type is fat, partition type 0x16 ...
    (Debian-User)