Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-11-2007, 05:51 PM
|
#1
|
LQ Newbie
Registered: Dec 2007
Location: Burke, VA, USA
Distribution: Fedora 7
Posts: 2
Rep:
|
Grub stopping with dual HD dual boot arrangement
I have a Dell laptop with an IDE internal 60 GB HD running Win XP. I just installed Fedora 7 on an external USB 320 GB HD. During the Fedora 7 install I chose to use my internal HD for booting. However, I now have two problems:
1. If my external HD is disconnected, my computer goes through BIOS then stops with just "GRUB_" displayed.
2. If my external HD is connected the startup also stops at "GRUB_", but if I turn the computer off and quickly back on, GRUB will proceed to load stage 2, and the rest of the startup is fine.
Other things of interest that have me really confused:
If I run "fdisk -l" in Linux, it shows my HDs as labelled the reverse from what I expected:
PHP Code:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 38913 312464250 8e Linux LVM
Disk /dev/sdb: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 6 48163+ de Dell Utility
/dev/sdb2 * 7 7294 58540860 7 HPFS/NTFS
Similarly for Grub:
PHP Code:
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ESC at any time exits.]
grub> find /grub/stage2
(hd0,0)
grub> find /grub/stage1
(hd0,0)
However, if I install the Fedora 7 distro DVD, reboot, select rescue mode, and then run Grub, I get the following:
PHP Code:
grub> find /grub/stage2
(hd1,0)
grub> find /grub/stage1
(hd1,0)
I am stumped! I thought about reinstalling Grub, but because I get different names for my HDs, I don't know how to go about it.
Thanks in advance for any divine guidance.
|
|
|
12-11-2007, 05:59 PM
|
#2
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
The best thing I've done is to put a small /boot partition on the hard disk, then Grub will continue to load (that's where it's stage 2 files will be stored).
As to the swapping of drives, you might check how your bios is set. If it's set to boot from USB before booting from HD, it might be seeing the usb drive first.
|
|
|
12-11-2007, 06:42 PM
|
#3
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187
|
The reordering of your drives is controlled by your BIOS. Some BIOSs let you specify the order, others don't. On my system, I have an AMI BIOS, and the HD / USB drive order is specified in the "Drive Order" sub-section of the Boot menu, but other BIOS will do it differently. (Also, my USB drive is only shown in the menu when it's connected.)
That being said, it's fairly easy to edit /boot/grub/grub.conf to have different entries for booting with and without the USB drive connected. Here's a snippet from my GRUB configuration file that show's how I have this system set up:
Code:
title Fedora (2.6.23.1-10.fc7)
root (hd1,0)
kernel (hd0,1)/boot/vmlinuz-2.6.23.1-10.fc7 ro root=/dev/FC7/Base rhgb quiet
initrd (hd0,1)/boot/initrd-2.6.23.1-10.fc7.img
title Fedora 8 (2.6.23.8-63.fc8) USB
root (hd4,0)
kernel (hd4,0)/vmlinuz-2.6.23.8-63.fc8 ro root=/dev/USB_Fedora/Base rhgb quiet
initrd (hd4,0)/initrd-2.6.23.8-63.fc8.img
Note that (HD0) is my boot drive, (HD1) my Fedora 7 drive, and (HD4) my USB drive. The other drives are (HD0) Kubuntu 6.10 and Fedora 8, (HD2) Windows XP, (HD3) Windows 98, Windows NT and Windows 2000.
|
|
|
12-11-2007, 08:36 PM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,285
|
I'd be betting that internal disk is P-ATA (aka IDE). I had similar issues with (internal) P-ATA and S-ATA changing names.
I just hacked the menu.lst to be "correct".
|
|
|
12-12-2007, 02:13 AM
|
#5
|
LQ Newbie
Registered: Jun 2007
Posts: 7
Rep:
|
Quote:
Please Backup your data before acting upon any suggestion given
|
Firstly I will tell you the cause of the problem and then suggest you a possible solution.
As you have said you have a disk in the laptop(60gb) and another external USB disk (320gb). You have installed Fedora7(F7) on the external disk.
Let's first understand how Linux boot loader (GRUB) works.
Grub has 3 stages. stage1, stage 1.5(optional) and stage2. stage1, also known as primary loader, is loaded in the very first sector(512b) of a disk. This area is called MBR. It also contains the partition table.
stage1 will be loaded 1st at the time of booting. stage1 will read stage2 (optionally stage1.5). stage2 is located in the /boot partition of the linux installation. stage2 is responsible for displaying the boot menu.
therefore when you disconnect the external disk, stage one unable to load the stage2 and hence you get the error.
------------------
Suggested solution.
1. remove grub stage1 from the 1st disk(60gb).
2. Install grub in the external disk
3. When you need to boot F7 connect the external disk before starting the laptop. Press f8 or f12 to prompt for boot device menu. select the external disk.
this way you will be able to work smoothly.
Last edited by prabhat3107; 12-12-2007 at 02:16 AM.
|
|
|
12-12-2007, 08:56 AM
|
#6
|
LQ Newbie
Registered: Dec 2007
Location: Burke, VA, USA
Distribution: Fedora 7
Posts: 2
Original Poster
Rep:
|
Thanks for the guidance. Yes, I have backed up all of my data. Just a couple more questions:
It makes sense that Grub Stage1 is loaded on my Win XP internal HD, but why don't I "see" it there? I doesn't show up on my C: drive when I look using Windows Explorer or the DOS "dir /A" command. Is there a way to see Grub files on my Win XP HD using Grub?
|
|
|
12-12-2007, 12:17 PM
|
#7
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
The grub files on your internal HD are only in the Master Boot Record (MBR), which is something like the first 512 byte section of the disk ( http://en.wikipedia.org/wiki/Master_Boot_Record), so it's not actually part of the Windows filesystem.
|
|
|
All times are GMT -5. The time now is 04:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|