View Full Version : Problem Booting Linux
BKKHustle
2007-08-20, 05:21 PM CDT
Hello,
First I am a relatively new user to Fedora (Core 7) and I need a little help configuring GRUB. I looked around on google and this forum but I think most of the information was 1) not current (not sure if specs have changed or not) 2) too much jargon and I fail to understand what I am doing.
For my specific case:
1) I have a laptop that has 1 partition for Windows (I dont want to remove this partition if I dont have to.)
2) I installed Fedora Core 7 to an external usb hard drive on a 40GB space.
3) After the install when I reboot I get "GRUB Hard Disk Error"
What I do understand is I have changed the Master Boot Record (MBR) to GRUB. I have tried to manipulate the .conf file to get the option of BOTH Windows XP and Fedora. However, this is my first time to experience this problem so I am lost as to how to configure GRUB.
1) Do I install GRUB to the Laptop HDD or the external usb HDD? (I think I installed to my Laptop's HDD because I get the same error even when the external HDD isnt plugged in.)
2) How do I keep Windows as my primary OS?
3) Is my Windows Data lost?
I am not exactly sure of what my partition specs are. How do I check them? (i.e. hda/hd0 ...it is confusing for me... GRUB says one thing... Linux says another thing... DOS 6.22 says another thing) How am I suppose to know what my partitions are to correct them?
I appreciate your help!!!! Much thanks in advance. If anyone can help I will try to provide you with as much info as possible (just tell me what you need.)
BKKHustle
2007-08-20, 06:07 PM CDT
OK... I did a little more research to give more specific details.
These are my partitions according to Fedora Install CD
LVM Volume Groups
^Volume Group 00 -> 39840MB
LOGVol01 -> swap -> 1408MB
LOGVol00 -> ext3 -> 38432MB
/dev/sda (assume this is my Laptop's HDD)
/dev/sda1 -> NTFS -> 57232
/dev/sdb (assume this is my External HDD)
/dev/sdb2 -> /boot -> ext3 -> 102MB
/dev/sdb3 -> VolGroup00 LVM PV -> 39896MB
/dev/sdb1 -> extended -> 198467MB (open space for Windows backups and junk)
/dev/sdb5 -> NTFS -> 198467MB
Free -> Free -> 8MB
OK, when I messed around with GRUB this is what I have tried:
grub> root (hd1,0)
*Filesystem type is ext2fs, partition type 0x83*
grub> setup (hd1)
*Error 12: Invalid device requested*
Anyway, I'm a little nervous to do anything else at this point until someone can offer some sound advice on what my next step should be.
Dies
2007-08-20, 07:48 PM CDT
Start by restoring your Windows MBR, to do that just unplug the USB drive then pop in your Windows installation CD and choose the recovery console then type
fixmbr
fixboot
now when you reboot Windows should load normally.
If you don't have your Windows disk or even if you do you may want to DL this
http://supergrub.forjamari.linex.org/
Here's a thread on installing to USB drives, I'm sure there are others if you search the forum, it's a little old but should still apply except for filenames
http://forum.fedoraforum.org/forum/showthread.php?t=119764&highlight=USB+installation
Now since you already installed Fedora on your USB drive I would suggest that you open up your machine and unplug any internal hard drives then plug in the USB drive and put in the Fedora install disk and either type "linux rescue" without the quotes or choose the rescue option, follow along with the prompts it should find your Fedora install and tell you it mounted it under /mnt/sysimage - if it's successful then type at the prompt
chroot /mnt/sysimage
fdisk -ls
Now you should only have one drive showing up /dev/sda, if so type
grub-install --recheck /dev/sda
that should install grub to the USB drive, now type
ls /boot
now write down the "initrd" version, for example on my machine it's "initrd-2.6.21-1.3194.fc7.img " yours will be different but we'll use that as an example, so you would type
cd /boot
rm initrd-2.6.21-1.3194.fc7.img
mkinitrd --preload ehci-hcd --preload usb-storage --preload scsi_mod --preload sd_mod --force-lvm-probe /boot/initrd-2.6.21-1.3194.fc7.img 2.6.21-1.3194.fc7
exit
exit
make sure you get the initrd version right for your install - there should be no errors.
The machine should reboot, remove the Fedora disk and check that your machine is set to boot from removable drives first, then hopefully boot into Fedora, if it does then great plug your hard drive back in and see if it still works.
If it doesn't work out for you then sorry you wasted your time but you can always try re-installing and following that thread or any other you find in the forum.
stevea
2007-08-20, 09:06 PM CDT
STOP - I think Dies is sending you in the wrong direction !
If you are getting the grub command prompt then your grub MBR is fine.
I wouldn't remove it yet (but see next post).
[edit add]
These are my partitions according to Fedora Install CD
LVM Volume Groups
^Volume Group 00 -> 39840MB
LOGVol01 -> swap -> 1408MB
LOGVol00 -> ext3 -> 38432MB
/dev/sda (assume this is my Laptop's HDD)
/dev/sda1 -> NTFS -> 57232
/dev/sdb (assume this is my External HDD)
/dev/sdb2 -> /boot -> ext3 -> 102MB
/dev/sdb3 -> VolGroup00 LVM PV -> 39896MB
/dev/sdb1 -> extended -> 198467MB (open space for Windows backups and junk)
/dev/sdb5 -> NTFS -> 198467MB
Free -> Free -> 8MB
OK, when I messed around with GRUB this is what I have tried:
grub> root (hd1,0)
*Filesystem type is ext2fs, partition type 0x83*
grub> setup (hd1)
*Error 12: Invalid device requested*
This is good.
First you should examine the "device.map" file in addition to the grub.conf. I expect it tells you that hd0 is /dev/sda, and hd1 is /dev/sdb.
Note that your boot file system is at /dev/sdb2. Depending on device.map I think you'll find that the grub name for the boot directory is (hd1,1) since Linusx partition 2(/dev/sda2) is grub partition 1 (hd1,1).
Your root file system is at /dev/sdb3 (aka (hd1,2) to grub I think).
Armed with this you should try the grub command
configfile (hd1,1)/grub/grub.conf
and note that you can use <tab> for auto-completion.
If that works you should get (maybe) the splashscreen and the Linux version selection
for ~5 seconds.
It may or may not boot linux. If not then examine the Linux grub.conf file and fix the (hdN,M) parameters.
stevea
2007-08-20, 09:35 PM CDT
To boot Windows from grub, you need to add a few lines to the grub.conf file like
title Windoze
rootnoverify (hd0,0)
chainloader +1
but you need to edit the (hd0,0) in this examplte to point to your Windows boot partition.
---
Now when you install Linux a a second OS of a dual-boot and it's on a separate drive, then it should overwrite the first drive MBR with a grub block which understands where and how the /boot/grub/ is located. It pulls a few files from there including grub.conf which tells grub where the linux kernel (same partitiion), the linux root (often another partition) or Windows boot partition (C:) are located.
On a laptop or a removable drive arrangement you cannot have the /boot directory on the removable drive. If you unplug that external drive and boot, then the main drive MBR with grub starts and it attempts to access /boot/grub/... and it fails - so nothing can boot.
Instead I recommend that you resize the primary/internal drive and that you create a very small 150MB partition for use as /boot. Then when you install FEdora, do a custom config of partitions and tell Fedora to use the primary drive 150MB partition as boot.
This way the new grub MBR boots and accesses this little /boot directory which can boot the primary drive(Windows) even if the external drive is unplugged. If the external drive (Linux root "/") is plugged in then it can boot that too.
I hope that's clear. send me a message if not.
stevea
2007-08-20, 09:37 PM CDT
Oh yeah - you can burn a copy of gparted-live cd and boot it to change the primary disk partitions. It's like Partition Magic but better & free.
Dies
2007-08-21, 04:24 PM CDT
Interesting, if I installed Fedora to a USB drive I would want grub on that drive if possible rather then on my internal hard drive, but hey whatever works I guess.......
stevea
2007-08-21, 04:48 PM CDT
Interesting, if I installed Fedora to a USB drive I would want grub on that drive if possible rather then on my internal hard drive, but hey whatever works I guess.......
Yeah - let me think .... maybe that was a late-night mis-step on my part. First either method works. I strongly prefer grub or even lilo b/c you can see what they are doing. OTOH leaving your Win disk in a pristene state is a good thing. So yes if you can arrange to have the usb boot as the 1st boot disk when it's available and the internal disk second - that's preferable.
Apopogies to dies & bkkhustle - but I always reserve the right to be wrong, and revise my opinion.
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.