PDA

View Full Version : cannot boot to Fedora 9



centguy
13th December 2008, 08:29 AM
I have a triboot machine (windowsxp,centos5.2,and Fedora 9).
I have been using FC9's grub bootloader to boot to any system without
any problem.

Today I single-mode logon to centos5.2 and type grub
and then "root (hd0,3)" and "setup (hd0)" in order to use the CentOS5.2
boot loader.

When I reboot the computer, I cannot boot to Fedora 9 any more:
error message is this :




root (hd0,2)
Filesystem type is ext2fs, partition type Ox83
kernel /boot/vmliuz-2.6.27-5-41.fc9.86_64 ro root=UUID=df8a58d-9835-4270-6219=f4d1c22e3c60 rhgb quiet

Error 2: Bad file or directory type
Press any key to continue...




Luckily I can still boot to CentOS5.2 or WindowsXP.
The menu list (with the Fedora entries copied from the Fedora 9)
is




[root@centos52-64-fuj ~]# cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,3)
# kernel /boot/vmlinuz-version ro root=/dev/sda4
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=20
splashimage=(hd0,3)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.el5) /dev/sda4
root (hd0,3)
kernel /boot/vmlinuz-2.6.18-92.el5 ro root=LABEL=/12 rhgb quiet noapic
initrd /boot/initrd-2.6.18-92.el5.img
title WindowsXP
rootnoverify (hd0,0)
chainloader +1
title Fedora (2.6.27.5-41.fc9.x86_64) "yum update"
root (hd0,2)
kernel /boot/vmlinuz-2.6.27.5-41.fc9.x86_64 ro root=UUID=df8a580d-9835-4270-b219-f4d1c22e3c60 rhgb quiet
initrd /boot/initrd-2.6.27.5-41.fc9.x86_64.img
title Old Fedora (2.6.25-14.fc9.x86_64)
root (hd0,2)
kernel /boot/vmlinuz-2.6.25-14.fc9.x86_64 ro root=UUID=df8a580d-9835-4270-b219-f4d1c22e3c60 rhgb quiet
initrd /boot/initrd-2.6.25-14.fc9.x86_64.img
[root@centos52-64-fuj ~]#


Right now I cannot locate my FC9 Installation DVD to rescue.



Is it possible that GRUB of CentOS5.2 does not support FC9 booting ??
This is really scary !! Who screwed up the whole show ? Me (I think that is highly probable),
CentOS 5.2's grub bootloader ??

I read about "chainloader +1" trick, but it does not work. I was hoping that the perfectly
bootable FC9 should be booted one way or another .. If not I can use only that FC9 to store some files..

Help !!!

brr872002
13th December 2008, 09:54 AM
I have a triboot machine (windowsxp,centos5.2,and Fedora 9).
I have been using FC9's grub bootloader to boot to any system without
any problem.

Today I single-mode logon to centos5.2 and type grub
and then "root (hd0,3)" and "setup (hd0)" in order to use the CentOS5.2
boot loader.

When I reboot the computer, I cannot boot to Fedora 9 any more:
error message is this :





Luckily I can still boot to CentOS5.2 or WindowsXP.
The menu list (with the Fedora entries copied from the Fedora 9)
is



Right now I cannot locate my FC9 Installation DVD to rescue.



Is it possible that GRUB of CentOS5.2 does not support FC9 booting ??
This is really scary !! Who screwed up the whole show ? Me (I think that is highly probable),
CentOS 5.2's grub bootloader ??

I read about "chainloader +1" trick, but it does not work. I was hoping that the perfectly
bootable FC9 should be booted one way or another .. If not I can use only that FC9 to store some files..

Help !!!

This may help you
http://forums.fedoraforum.org/showthread.php?t=205347&highlight=triple+boot

glennzo
13th December 2008, 10:40 AM
Just a guess. Then CentOS version of grub may be old enough that it doesn't understand UUID and as such the Fedora boot stanzas would need to be changed to root=LABEL=x.

centguy
13th December 2008, 04:20 PM
I copied vmlinuz-2.6.27.5-41.fc9.x86_64 and initrd-2.6.27.5-41.fc9.x86_64.img
to the CentOS's /boot and changed the menu.lst by adding

a stanza:

title (hd0,3) Fedora (2.6.27.5-41.fc9.x86_64) "experiment"
root (hd0,3)
kernel /boot/vmlinuz-2.6.27.5-41.fc9.x86_64 ro root=UUID=df8a580d-9835-4270-b219-f4d1c22e3c60 rhgb quiet
initrd /boot/initrd-2.6.27.5-41.fc9.x86_64.img

and I was able to boot. This is rather strange !!

Somehow I believe the partition where FC9 resides can't be mounted or something that causes
Error 2: bad file or directory.

Weird !!

centguy
13th December 2008, 05:29 PM
Latest update: I was able to boot to FC9 using the chainloader +1 trick from CentOS5.2 boot loader.

stoat
13th December 2008, 05:42 PM
Somehow I believe the partition where FC9 resides can't be mounted or something that causes
Error 2: bad file or directory.Hello centguy,

I believe you're right about that. Your scenario and that error message immediately reminded me of the incident that arose last summer regarding the 256-byte inodes in the Fedora 9 file system. It was commonly reported for a while during the month of June.

Fedora 9 was the first Fedora version to introduce the 256-byte inode file system in preparation for the coming ext4 file system. Last summer, not long after Fedora 9's release, people discovered that they sometimes could not boot Fedora 9 (http://forums.fedoraforum.org/showthread.php?t=191363) with the GRUB boot loader of previous versions of Fedora or some other Linux systems. Anyway, it was all related to the grub package and the GRUB boot loader it installs in the older Linux systems. It could not access files in these new 256-inode file systems. Eventually, the grub package was patched for this issue with v0.97-21. Actually that happened way earlier in January, but a patched version (v0.97-33) didn't make into the Fedora repos until June. But that is the true story about GRUB and the new 256-byte inodes and the trouble it caused last summer. And it sounds a lot like your story.

What you did was move the kernel and intial ramdisk files to a partition formatted by (and therefore readable by) CentOS and it worked. Good idea. When typing this, I just read where you were able to use the chainloader command in the CentOS grub.conf to boot F9. That works because the chainloader command does not try to access any file in the Fedora 9 file system. It merely loads and executes the boot sector code of its boot partition.

Anyway, if your CentOS grub package is earlier than v0.97-21, then another method of dealing with this is issue to update CentOS's grub package. But after that, you still have to do one more thing for it to make any difference booting F9. You must then use that new grub package to re-install CentOS's GRUB boot loader. Then CentOS will be able to boot everything again by any method (direct, chainloader, configfile).



P.S.: If you decide not to update CentOS's grub package and re-install its GRUB boot loader, that's perfectly okay. That chainloader command is an aceptable way of dealing with this. In fact, a neat side-effect of it is that it is "immune" to breakage by updates to the Fedora 9 kernel (a frequent event). Your file moving method, while clever, would have to be repeated after each kernel update.

centguy
13th December 2008, 06:28 PM
Thanks a lot stoat ! I was lucky enough to copy the files so that I can boot to FC9. You have provided an
in-depth analysis. I just read about the theory of GRUB today and figured out how to use chainloader
syntax. Was quite annoyed when I hit the problem in the morning but was glad that I learned something new along the way. Cheers!!