LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   [Panic] Grub fail to dual boot win XP/Fedora Core 3 on Dell Laptop Latitude D610 (https://www.linuxquestions.org/questions/linux-software-2/%5Bpanic%5D-grub-fail-to-dual-boot-win-xp-fedora-core-3-on-dell-laptop-latitude-d610-435633/)

syseeker 04-16-2006 06:51 AM

[Panic] Grub fail to dual boot win XP/Fedora Core 3 on Dell Laptop Latitude D610
 
Hello all,

I have installed FC3 on my dell latitdue D610 laptop with only 1 hard disk, and with windows XP installed.

Problem:
When I reboot the laptop after FC 3 installation, all I see is just "GRUB" with a flashing _ then nothing happens and I cant access any OS's.

I guess some info might be helpful:

1. RH9 was previously installed at an extended partition. So in this installation, I use Fedora partitioning utility to choose this partition as mount point, and format as ext3.

2. GRUB is chose to install at "first boot partition", not MBR. (hope I didnt mistaken...)

3. Windows is picked to boot first.

I have tried to search for some solutions on the Internet, can't seems to have a perfectly match scenario and solutions to this problem. But i do found some info that worry me, such as

"Dell has some type of recovery data that came with the machine on /dev/hda1"
--> since i chose to install GRUB at "first boot partition", will it destroy these info?? What's the consequence?

syseeker 04-16-2006 07:56 AM

I have managed to get my grub.conf via linux rescue

# grub.conf generated by anaconda
# Notice: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,5)
# kernel /boot/vmlinuz-version ro root=/dev/sda6
# initrd /boot/initrd-version.img
#boot=/dev/sda6
default=1
timeout=5
splashimage=(hd1,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core 3
root (hd1,5)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1


Now, based on this info
1) has GRUB installed at first boot partition?
2) To install GRUB at MBR,
grub> root (hd ? , ?) <-- what should i type?
grub> setup (hd ?) <-- what should i type?

Emerson 04-16-2006 07:56 AM

GRUB is chose to install at "first boot partition", not MBR.

How your computer boots: BIOS initializes the hardware and last thing it does is to execute MBR (Master Boot Record) from your first HDD. Now, if you had GRUB there it would present you with a menu and continue executing bootup files of your OS of choice. You installed GRUB to first bootable partition. In other words, there is still Windows code on the MBR which does nothing about multi-boot and tries to boot Windows - but finds GRUB instead. GRUB in turn does not know what to do because it's installed to wrong partition ...

You are not first one with such a problem, search these forums, it is handled here many (many-many) times.

syseeker 04-16-2006 08:29 AM

Thanks Emerson for your explanation.
I got the solution step from http://www.fedoraforum.org/forum/sho...5&page=1&pp=15, but however I have no luck in getting that run ...

Following the steps, I did

grub> find /boot/grub/stage1
(hd1,5)

grub> root (hd1,5)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)

I got this -->
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded
succeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd1,5)/boot/grub/stage2 /boot/grub/grub.conf.......

succeded
Done.

grub> quit

sh-3.00# nano /boot/grub/grub.conf



According to the FedoraForum threads,
10) Finally, you'll have to edit your /boot/grub/grub.conf, for example whith nano:

OK, I didnt notice any different between this grub.conf with the previous one. What should i EDIT??

I tried to sh-3.00# shutdown -h 1 ,
but the system seems does not recognize this command, it said
"init: /dev/initctl: No such file or directory"

I press button to reboot, and What I got is still a "GRUB _" ...:(

syseeker 04-16-2006 08:39 AM

recheck with

grub> find /boot/grub/stage1

i still got (hd1,5), does it means my grub is not yet at MBR?

Emerson 04-16-2006 08:43 AM

Something is wrong here. You have only one HDD so it cannot be "root (hd1,5)". I would start with fdisk -l to see how HDD is connected and partitioned, then mount your Linux root partition and look at GRUB device.map file to see if GRUB has mapped your HDD correctly. Finally, edit your grub.conf file to make entries reflect the real setup and run 'grub-install /dev/hda'.

syseeker 04-16-2006 08:49 AM

Bad Bad... I check with

shell prompt> grub-install --recheck /dev/hda

I got -->
This file boot/grub/stage2 not read correctly

syseeker 04-16-2006 09:01 AM

sh-3.00# fdisk -l

Disk /dev/sda: 40.0GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 Dell Utility
/dev/sda2 * HPFS/NTFS
/dev/sda3 W95 Ent's (LBA)
/dev/sda5 HPFS/NTFS
/dev/sda6 Linux
/dev/sda7 Linux swap

Disk /dev/hda: 515MB, 515375104 bytes
...

Device Boot Start End Blocks Id System
/dev/hda1 * FAT16

-------------------------------------------------------

Very strange, I wonder why "/dev/hda1 * FAT16" exists
I check /boot/grub/device.map, and found
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda



Would you mind to point out how should i edit grub.conf file ?

Emerson 04-16-2006 09:05 AM

hda is your CD. You need to edit device.map

(fd0) /dev/fd0
(hd0) /dev/sda

syseeker 04-16-2006 09:11 AM

1. nothing to change in /boot/grub/grub.conf before 'grub-install /dev/hda'?
2. In this case, should I type 'grub-install /dev/hda' , or 'grub-install /dev/sda'?? Since /dev/sda is the hard disk...

Emerson 04-16-2006 09:15 AM

1. You need to change hd1,5 to hd0,5 and so on.
2. Yes, /dev/sda is correct.

syseeker 04-16-2006 10:54 AM

Doesn't seems to cure the problem...

> grub-install /dev/sda
Output: The file /boot/grub/stage2 not read correctly.

Notice at #4,
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd1,5)/boot/grub/stage2 /boot/grub/grub.conf


I redo the following, and found out

grub> find /boot/grub/stage1
(hd1,5)

grub> root (hd1,5)
Filesystem type is ext2fs, partition type 0x83

grub> root (hd0,5)
Error 22: No such partition


Also, since hda is CDROM drive, if I remove it from device.map, possibly the CDROM will not be able to boot from CD anymore for the next hard reboot(i just guess), so in device.map, I change

(hd1) /dev/hda

Emerson 04-16-2006 01:05 PM

You do not need CD drive in device.map. CD is booted by BIOS, not GRUB. You need probably to chroot to make grub-install work correctly. Or use --root-directory=/path_to_mounted_Fedora_root, see 'man grub'.

syseeker 04-16-2006 08:07 PM

OK, I did it :)


grub --device-map=/dev/null

device (hd0) /dev/sda
root (hd0,5)
setup (hd0)

Also, I change winxp configuration in grub.conf to root(hd0,1).
(hd0,0) is dell utility.

Thank you very much for your kind help.

syseeker 04-16-2006 09:32 PM

Curious to ask,
1) Why installing GRUB to first boot partition will lead to invalid device.map configuration?
2) Why the hard disk label is /dev/sda, but not /dev/hda ?


All times are GMT -5. The time now is 12:14 PM.