LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB Bootloader not working properly (https://www.linuxquestions.org/questions/linux-newbie-8/grub-bootloader-not-working-properly-447192/)

tackiepro 05-21-2006 08:46 PM

GRUB Bootloader not working properly
 
I'm a novice linux user.

But I did have windoze XP pro and FC5 installed on my A drive. GRUB would see and launch either one just fine.

Then I added Suse 10.1 on my B drive, but after booting into GRUB FC5 disappeared as a boot choice. I did try to force Grub to attempt to boot FC5, but it doesn't boot. I presume some settings are wrong in GRUB, perhaps it's not possible to have XP Pro, FC5 and Suse 10.1 all available as boot options?

Thanks very much.

bigrigdriver 05-21-2006 09:27 PM

It should work with all three systems, if grub is setup correctly. It sounds like you installed SuSE and write grub to the MBR, overwriting the FC5 grub on the MBR.

To fix this, boot SuSE. Then mount the FC5 partition. From a console, su to root, then navigate to /mnt/FC5/boot/grub (or whatever the path is to FC). Use a text editor to open grub.conf and copy the menu entry for FC.

Go back to the SuSE /boot/grub and open menu.lst (same file as grub.conf under FC) and paste the FC entry into menu.lst.

Then try a reboot to test it. If it fails, come back here and post your /etc/fstab, FCs /boot/grub/grub.conf, and SuSEs /boot/grub/menu.lst. There should be enough info to get it sorted out (partition and device info from fstab; menu entries from grub.conf and menu.lst).

pixellany 05-22-2006 01:26 AM

If you installed GRUB during the SUSE install, that might account for what is happening. (I'm pretty sure that when grub is installed somewhere, it's code is tweaked to point to the correct config file. So it may still be in the mbr, but now is pointing the the SUSE /boot/grub, instead of to FC5 install.
As already mentioned, once you know what config file it is pointing to, then, you can edit it to do the right thing.

Emmanuel_uk 05-22-2006 03:17 AM

sometimes you can use the rescue mode of the install cd to reinstall
grub on the MBR, and sometimes it makes the effort to detect
all the working OS on the various HD (I think it does anyway, but not 100% sure,
it may depend on the distro)
You can indeed edit the /boot/grub/menu.lst of whichever distro grub is using.
You can also chain load one grub from the MBR to the grub of a given partition.
For now, I suggest you go with the previous posts

tackiepro 05-22-2006 09:22 AM

Thanks for the help.

"To fix this, boot SuSE. Then mount the FC5 partition. From a console, su to root, then navigate to /mnt/FC5/boot/grub (or whatever the path is to FC)."

I'm not sure how to mount the FC5 partition, or how to navigate from terminal window to the A drive from the B drive. Is there a tutorial?


I did take some screenshots of areas I was trying to figure out, would that help?

[I just tried to post a link to my site with the pics but it won't let me]

Thanks again.

pixellany 05-22-2006 02:38 PM

When you are running Linux, you can get to any partition as follows:

(First, you don't use drive letters in Linux. The partitions will all be of the form /dev/hdXY, where X is the drive letter, and Y is the partition number. For a normal IDE setup, /dev/hda1 is the first partition on the first drive)

as root, run fdisk -l to see where all you partitions are. Presumably, from this, you will be able to see the partition you are trying to get to. Let's assume it is /dev/hda3.

cd /mnt
mkdir <name> (Now you have a "mount point" to which you mount (connect) the partition

mount /dev/hda3 <name>
cd <name>
ls (Now you should be looking at the directory structure of the system that needs fixing)

When you are navigating the directories mounted at /mnt/something, do not make the mistake of getting out of some obscure place by typing--eg--cd /etc. This will take you all the way back to the /etc directory in the system you are running. If you ever get lost, type "pwd" to make sure where you are.

tackiepro 05-22-2006 05:20 PM

Everything worked as you said. And I got this:

-rw-r--r-- 1 root root 63896 2006-03-14 13:01 config-2.6.15-1.2054_FC5
drwxr-xr-x 2 root root 1024 2006-03-23 08:25 grub
-rw-r--r-- 1 root root 1685050 2006-03-23 08:11 initrd-2.6.15-1.2054_FC5.img
drwx------ 2 root root 12288 2006-03-22 23:59 lost+found
-rw-r--r-- 1 root root 811765 2006-03-14 13:01 System.map-2.6.15-1.2054_FC5
-rw-r--r-- 1 root root 1510257 2006-03-14 13:01 vmlinuz-2.6.15-1.2054_FC5
linux:/mnt/fc5 #

In /boot/grub menu.lst the entry for FC5 is:

title Core5
root (hd1,1)
kernel /boot/vmlinuz root=/dev/hda6 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts
initrd /boot/initrd

I think that's what needs to be changed?

pixellany 05-22-2006 05:27 PM

OK--my theory is that---when you installed SUSE---GRUB got installed pointing to the menu.lst **in the SUSE directories**. The way to test it is to note the options that GRUB gives you and then find which menu.lst has those options.

If you are booted up in SUSE, then ignore all the stuff about mounting the "other" install---just go to /boot/grub/menu.lst and see what's there.

tackiepro 05-22-2006 07:58 PM

I guess I didn't make myself clear. This IS booted in Suse [drive B] and this is what /boot/grub menu.lst shows for FC5:

title Core5
root (hd1,1)
kernel /boot/vmlinuz root=/dev/hda6 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts
initrd /boot/initrd

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

If I select that from the Suse Grub Bootloader, it never finishes booting, and I have to shut down and reboot.

[I can't find the rules regarding posting URL's. I did take 3 pics of relevant screens and posted them on my website. I thought that might help.]

bigrigdriver 05-22-2006 08:52 PM

The entry for FC5 is inconsistent.
The first line:
root (hd1,1) states that the root of the FC installation is on drive hdb, partition 2.
NOTE:
grub drive hd0 == Linux drive hda
grub drive hd1 == Linux drive hdb
grub partition 0 == Linux partition 1
grub partition 1 == Linux partition 2
therefore "root (hd1,1)" is grub-speak for drive/partition (hdb,2)

This line says that FC in on drive hda, partition 6.
kernel /boot/vmlinuz root=/dev/hda6 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts

So, which is it? Is FC on drive hda, partition 6, or drive hdb, partition 2?

Perhaps the entry from the SuSE /boot/grub/menu.lst should look like this:
root (hd0,5)
kernel /boot/vmlinuz root=/dev/hda6 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts

PS: still need to see the contents of /etc/fstab to be sure of what's going on.

pixellany 05-22-2006 09:32 PM

We need to know everything that is on this machine. In Linux, "fdisk -l" (run as root) to see all the partitions.

We also need to verify what disk grub is going to to get its config file. Mark one of them by changing the title of something to a random word. Re-boot and see if that is the file grub is using.

tackiepro 05-22-2006 10:54 PM

BigRigDriver-

"The entry for FC5 is inconsistent." --I'm sure I did that by mistake.

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

fdisk -l results:
linux:/home/suse # fdisk -l

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 9964 59552955 f W95 Ext'd (LBA)
/dev/hda5 2551 7633 40829166 7 HPFS/NTFS
/dev/hda6 9699 9964 2136613+ 7 HPFS/NTFS
/dev/hda7 7634 7646 104391 83 Linux
/dev/hda8 7647 9698 16482658+ 8e Linux LVM

Partition table entries are not in disk order

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 129 1036161 82 Linux swap / Solaris
/dev/hdb2 130 24792 198105547+ 83 Linux

Disk /dev/sda: 66 MB, 66060288 bytes
16 heads, 32 sectors/track, 252 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 251 64240 6 FAT16
linux:/home/suse #
--------------

And Grub is using the B drive Suse/boot/grub menu.lst, which is as follows[and the FCore5 entry is wrong since it doesn't work]:

# Modified by YaST2. Last modification on Fri May 12 08:33:16 PDT 2006

color white/blue black/light-gray
default
timeout 8
gfxmenu (hd1,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux 10.1
root (hd1,1)
kernel /boot/vmlinuz root=/dev/hdb2 vga=0x317 resume=/dev/hdb1 splash=silent showopts
initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
chainloader (hd0,0)+1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux 10.1
root (hd1,1)
kernel /boot/vmlinuz root=/dev/hdb2 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
initrd /boot/initrd


title FCore5
root (hd1,1)
kernel /boot/vmlinuz root=/dev/hda6 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts
initrd /boot/initrd

----------------
/etc/fstab:

linux:/etc # cat fstab
/dev/hdb2 / reiserfs acl,user_xattr 1 1
/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/sda1 /windows/D vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hda5 /windows/E ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hda6 /windows/F ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hdb1 swap swap defaults 0 0
/dev/VolGroup01/LogVol01 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/hda7 /data1 auto noauto,user 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
none /subdomain subdomainfs noauto 0 0
linux:/etc #

pixellany 05-23-2006 09:01 AM

Unless I have forgotten the question, the entry for "FCore5" needs to be corrected.

This looks like where your FC5 is:
/dev/hda7 7634 7646 104391 83 Linux
/dev/hda8 7647 9698 16482658+ 8e Linux LVM

(no swap for FC5?)

Assuming that hda7 is your /boot directory, then I think you need the FC5 section of menu.lst to look like this:

itle FCore5
root (hd0,6)
kernel /boot/vmlinuz root=/dev/hda7 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts
initrd /boot/initrd

tackiepro 05-23-2006 12:16 PM

Well, that's quite an improvement.

It tries to launch FCore5, but I get an error message "error 15: file not found - press any key to continue"

Suse and windozeXP both still work fine.

[Is Huntington Memorial Hospital still there in Pasadena?]

KarlosDaJackel 05-23-2006 12:38 PM

Change these, each distro has its own kernel but there both using a symlink to vmlinuz. Because suse was installed 2nd, your trying to boot fedora with the suse kernel. Also fix the typo on the title line

Title FCore5
root (hd1,1)
kernel /boot/vmlinuz-2.6.15-1.2054_FC5 root=/dev/hda7 vga=0x317 selinux=0 resume=/dev/hda5 splash=silent showopts
initrd /boot/initrd-2.6.15-1.2054_FC5.img

Be very careful of typo's


All times are GMT -5. The time now is 03:37 AM.