GrUB help please...

Discuss Applications
User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

GrUB help please...

Post by Calum »

hello, i have nine partitions on my drive right now. the first two are primary (one vfat, one UFS), the third is extended, the fourth is linux swap and the fifth to the ninth are all ext3 partitions inside of the third one.

now.

i just installed windows on the vfat one (i know, i know, i had to do it so i could use FirstClass Client, The Worst Chat Software In The World Ever (TM) for my university course), and unsurprisingly, it overwrote my master boot record. now i was under the impression i could just use my mandrake boot floppy to boot into mandrake (it's on hda5) and run grub-install which is what i did after i installed lycoris desktop l/x. It does ask you before it overwrites your MBR, but i wasn't paying attention at the time. anyway, last time i did grub-install it worked fine, but this time i am seeing an error, and then no changes are made, presumably because the next time i boot, i just get winsux loading up, not the best since i don't really want to have to keep a stack of boot floppies next to the computer just to boot it.

the error message was something like (i am sorry, i'm not at home right now so i cannot remember it exactly) 'Sorry, /dev/...../...../...../...../part5 has no corresponding BIOS Drive'. Now i did look in the directory concerned within /dev and it has nine files all called part* where * is a number from one to nine. what are these, why does no 5 not have a corresponding BIOS drive (whatever that is) and how do i sort it out please?

thanks in advance for any help.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

no takers?

okay, well maybe if i post he grub.conf file. here it is (except it's called menu.lst in mandrake):
timeout 20
color black/cyan yellow/cyan
i18n (hd0,4)/boot/grub/messages
keytable (hd0,4)/boot/uk.klt
altconfigfile (hd0,4)/boot/grub/menu.once
default 0

title Mandrake Linux 9.0
kernel (hd0,4)/boot/vmlinuz root=/dev/hda5 devfs=mount hdd=ide-scsi quiet vga=788
initrd (hd0,4)/boot/initrd.img

title Lycoris Desktop/LX (Redmond Linux Personal)
kernel (hd0,7)/boot/vmlinuz-pc97-2.4.18-modular vga=274 quiet console=ttyS3,9600 acpi=no-idle root=/dev/hda8

title Peanut Linux 9.4
kernel (hd0,6)/boot/vmlinuz

title Debian GNU/Linux 3.0b
kernel (hd0,8)/vmlinuz hdd=ide-scsi root=/dev/hda9

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz root=/dev/hda5 devfs=mount hdd=ide-scsi
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz root=/dev/hda5 devfs=nomount hdd=ide-scsi failsafe
initrd (hd0,4)/boot/initrd.img

title Winsux
root (hd0,0)
makeactive
chainloader +1

title floppy
root (fd0)
chainloader +1
and for reference, here's the exact error message i get:
[root@localhost]:~# grub-install /dev/hda
/dev/ide/host0/bus0/target0/lun0/part5 does not have any corresponding BIOS drive.
Last edited by Calum on Sun Mar 02, 2003 12:40 pm, edited 1 time in total.

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux »

What does 'fdisk -l' say?

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

Code: Select all

Peanut-Linux:/home/calum# fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 1868 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       252   2024158+   b  Win95 FAT32
/dev/hda2           253       412   1285200   83  Linux
/dev/hda3           413      1808  11213370    5  Extended
/dev/hda4          1809      1868    481950   82  Linux swap
/dev/hda5           413       767   2851506   83  Linux
/dev/hda6           768      1122   2851506   83  Linux
/dev/hda7   *      1123      1339   1743021   83  Linux
/dev/hda8          1340      1594   2048256   83  Linux
/dev/hda9          1595      1808   1718923+  83  Linux

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

here's the part of 'grub-install' that is responsible for this message, can anybody tell me what it is doing and how to satisfy it?

Code: Select all

 tmp_drive="(hd0)"

    # If not found, print an error message and exit.
    if test "x$tmp_drive" = x; then
	echo "$1 does not have any corresponding BIOS drive." 1>&2
	exit 1
    fi
thanks

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Why do you have two partitions flagged as bootable/active? This should not be, you need to toggle one of them off as you should only have one active partition. It probably has nothing to do with your other problem but ya never know...

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

which one should it be? would i do that using fdisk? what does this bootable thing mean in real terms? hda1, hda5, hda7, hda8 and hda9 contain operating systems that i wish to be able to boot and hda2 will contain freeBSD once i format it again and install it.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

It should be whichever one that you want to boot from (the one containing the boot loader).

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

and the MBR would be in hda1?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

No, the MBR (Master Boot Record) is always at the beginning of the disk ("/dev/hda"). But you will have a partition boot record (512 byte boot sector) at the beginning of the active partition. You can install GRUB to either the MBR or the partition boot sector of the active partition. A default DOS MBR does nothing more than transfer control to the active partition's boot sector. I would certainly think that having two partitions marked active would cause problems.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

so then if i remove the bootable flag from all /dev/hda* partitions then i should be home and dry then? because my original grub boot stuff is still on the MBR, if my recent install of windows didn't overwrite it but instead just transferred bootability to hda1?

also, may i post my new output for 'fdisk -l /dev/hda'? The last one i did, i made the mistake of not doing it from within mandrake (the OS i am trying to run grub-install from) i was in peanut linux at the time and just did fdisk -l without thinking when asked. in mandrake, the output looks like this:

Code: Select all

Disk /dev/hda1: 255 heads, 63 sectors, 251 cylinders
Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
/dev/hda1p1   ?    120513    235786 925929529+  68  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(116, 100, 32) logical=(120512, 47, 32)
Partition 1 has different physical/logical endings:
     phys=(288, 101, 46) logical=(235785, 20, 46)
Partition 1 does not end on cylinder boundary:
     phys=(288, 101, 46) should be (288, 254, 63)
/dev/hda1p2   ?     82801    116350 269488144   79  Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(357, 32, 43) logical=(82800, 34, 51)
Partition 2 has different physical/logical endings:
     phys=(0, 13, 10) logical=(116349, 218, 61)
Partition 2 does not end on cylinder boundary:
     phys=(0, 13, 10) should be (0, 254, 63)
/dev/hda1p3   ?     33551    120595 699181456   53  OnTrack DM6 Aux3
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(345, 32, 19) logical=(33550, 137, 11)
Partition 3 has different physical/logical endings:
     phys=(324, 77, 19) logical=(120594, 153, 54)
Partition 3 does not end on cylinder boundary:
     phys=(324, 77, 19) should be (324, 254, 63)
/dev/hda1p4   ?     86812     86813     10668+  49  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(87, 1, 0) logical=(86811, 142, 3)
Partition 4 has different physical/logical endings:
     phys=(335, 78, 2) logical=(86812, 225, 45)
Partition 4 does not end on cylinder boundary:
     phys=(335, 78, 2) should be (335, 254, 63)

Partition table entries are not in disk order
which is a little more ominous.
These partitions with all the error messages (well maybe not errors, but...) were created with red hat fdisk, all except the first two which were recreated using diskdrake. I had all this stuff about cylinder boundaries last time i set up my partitions and i totally wiped my drive and started from scratch to fix it. i thought 'i'll use redhat fdisk so i know there will be no errors from flaky partitioning tools' and this partition table is what i got as a result.

and for information, hda1 is currently the only bootable one (according to cfdisk) and grub-install still gives me the same error :(

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Normally the partition containing the boot loader is set active, and only that partition. Normally this is the partition containing the /boot directory/partition.

As far as the Mandrake partition table wth?!?! It looks like you did an "fdisk -l /dev/hda1" instead of an "fdisk -l /dev/hda". You want to run the command on the disk, not a partition (do not put a partition number at the end of "hda").

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

weird! that's what i thought i did! but i am glad to hearthat because i was concerned about the large difference in outputs.

as for the /boot directory, each OS has its own. i have made no separate /boot partition and so i suppose grub would have to then toggle the 'bootable' option on and off by itself at each boot? is this on the right track? at the moment hda1 (winsux millenium) is bootable, but should that have bootable off too? i must say i didn't check before i installed windows what partitions were bootable and what weren't but i can safely say that i was able to install an OS on any of the partitions (remembering to check the 'leave my MBR alone!' or equivelant option) and then just edit the menu.lst file on the mandrake partition (usually using vi in the new OS i had just installed) and it would work like a charm.

before i installed winsux ME on there, i had MSDOS6.22 and before that FreeDOS 0.8b, now i know freedos doesn't change the MBR, but i'm not so sure about MSDOS, in any case, when i had MSDOS installed, grub worked fine too. it was just when i put winME on that this all started.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

One GRUB should be able to boot all the OSs in question. Just pick one to be the primary, set that partition active and add all the other boot options to the one grub config file.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum »

ok, so if mandrake is installed on /dev/hda5 (it is) and it contains the menu.lst (grub config) file i want to use (it does) then i should set /dev/hda5 and only /dev/hda5 to be bootable, or am i misunderstanding you?

Post Reply