View Full Version : GRUB issue

23rd July 2007, 06:07 AM
Not sure how I managed to duff this install.. Fedora 7 was working fine. Probably while trying to get old LVM data transferred to backup volumes - I have managed to confuse GRUB or the file system and do not see how to untangle this. It looks easy but ...

When booting, it says it can not locate LABEL=/boot

going into maintenance mode: mount shows:
/dev/VolGroup00/LogVol00 on / type ext3 (rw,defaults)
/dev/sda1 on /boot type ext3 (rw, defaults)

a df shows

/dev/VolGroup00/LogVol00 187117284 4108036 173350880 3% /
/dev/sda1 187117284 4108036 173350880 3% /boot

something seems little crosslinked

I have tried rescue mode and fscked both volumes. Both do exist when booted from rescue disk (as independent entities - boot being about 101MB), the LVM is 188Gig. The files are all there, it looks like an install and there is swap is on VolGroup00/LogVol01.

But can not change the condition. I have tried reloading the MBR but have probably not done that right (by getting to that stage of an upgrade install).

GRUB can not seem to boot from maintenance mode.

The vmlinuz files are present in /mnt/sysimage/boot.

I think I have created an anomalous condition in LVM - its a virgin install so does not need to be repaired but I would like to know if and how to repair this if it happens elsewhere.

23rd July 2007, 06:32 AM
When booting, it says it can not locate LABEL=/boot

AFAIK grub doesn't use labels so the message is from the mount script after the kernel starts and it should not be a system failure condition.

What is in the /boot/grub/grub.conf and /boot/grub/device.map files ?

23rd July 2007, 07:11 AM
# grub.conf (generated by anaconda)
# ...
title Fedora (
root (hd0,0)
kernel /vmlinuz... etc

there were two kernels (yum upgrade from install when it worked) - (I have since removed the earlier one).

I have tried removing the # before #boot=/dev/sda as this looked suspicious but no interest.

It appears to be fsck that is trying to resolve LABEL=/boot

(but since I have fscked the boot (sda1) and LVM volumes, it should not be marked for fsck) but when booting (not from rescue CD)

... fsck fails trying to resolve LABEL=/boot
... and it asks for root password for Repair filesystem mode
... and then df shows /dev/sda1 as /boot with the same volume specs as the VolGroup00/LogGroup00 volume - and the root file system is the installed root file system (with a boot directory that is empty). If I try and umount /dev/sda1 in this state, it states (twice) that it is not mounted. mount says that it is mounted. The /boot directory in this state is empty (as /dev/sda1 is not mounted). Can I mount it, I wonder... no.

I usually class this sort of thing as a corrupted install - but is it?

From a rescue CD it looks all as one would expect - mounted under sysimage

then grub device.map file contains:
(hd0) /dev/sda

If this happened on a machine that mattered, I would just reinstall after moving any data - but curious

23rd July 2007, 10:58 AM
can't think of anything (its so darn cold here) else to learn from this, so upgrade install attempted, and it looks the same from rescuecd except that /mnt/sysimage/boot is populated. I think it was an fsck error... so lets try a regular boot ...

oh good - its is still the very same - /boot appears empty, and /dev/sda1 is oddly linked (has the same used/available block stats).

Thererfore it is partition table? parted and fdisk seem to think its okay.


tried a repair boot and editing the /etc/fstab and removing the boot volume - and it worked - basically eliminating /dev/sda1 altogether from the boot cycle and using the installed /boot on the LVM volume. Now its upgrading its kernel so gives me a chance to fix the broken /dev/sda1 volume, perhaps.

Still may reinstall it.

But first, I will try and boot with the updated kernel, by copying into the volume:

mount /dev/sda1 /mnt
cp -p /
cp -p /boot/* /mnt

edit fstab - reboot - and the problem is back
- in fact the /dev/sda1 volume has vanished!
- parted says its there
- fsck says its clean
- df does not see it
- mount does not see it
- mkfs says its mounted.

Sounds like a flag is wrong somewhere. oh well. works without the boot until a clean reinstall.

25th July 2007, 04:36 AM
You might try

e2label /dev/sda1
e2label /dev/sda2

to see what labels are applied.

25th July 2007, 06:58 AM
interestingly with it booted without a separate boot volume:

e2label /dev/sda1

e2label /dev/sda2
e2label: Bad magic number in super-block while trying to open /dev/sda2
Couldn't find valid filesystem superblock.

e2label /dev/VolGroup00/LogVol00
(returns a blank line)