Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 02-25-2009, 07:31 PM   #1
Leon W. Malinofsky
LQ Newbie
Registered: Aug 2007
Posts: 23

Rep: Reputation: 15
Lenny Dual Boot w/ Win7 - GRUB problems!

I have a system with two identical IDE drives, one with Windows 7, installed first on hda1, and one with Debian Lenny (installed second on hdb1 but failing to boot). It seems to me you used to be able to put the (boot record / loader?) on the drive you wanted to run Linux and just boot to it from the BIOS—that’s what I like to do. Now, I’m not sure whether the installers are dumbed down, or whether I have, but it seems if you have another OS like Win7 on the first hard drive and tell the installer to put Lenny on the second hard drive, it still regards the Win7 partition as the one to boot from (the one whose boot loader should be used). Therefore if you try to use the BIOS to boot to hdb1, say, it finds the GRUB record but is unable to boot the disk, probably because it misinterprets the instruction to boot to (hd1,0) and somehow references the “real” boot drive, hd0. Am I right? If this is the case I need to know what to put in GRUB (in menu.lst, I suppose) to REALLY boot hd1,0 when hdb is selected in the BIOS boot menu.

This is what my menu.lst says (this fails to work):

title Debian
root (hd1,0)
kernel /boot/vmlinuz-2.6-26-1-686 root= /dev/hdb1 ro quiet
initrd /boot/initrdimg-2.6.21-1-686

title Windows Vista (loader)
root (hd0,0)
chainloader +1

(The above was typed not cut-and-pasted so a typo may exist.)

What can I do that *will* work? Any suggestions much appreciated…


Leon Malinofsky

PS I should point out that the system also contains a third, SCSI, drive, sda1.
Old 02-25-2009, 07:44 PM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,464

Rep: Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860Reputation: 3860
If you want to do things like this, it is best to change the BIOS boot order prior to installing Linux. This ensures hd0 really is hd0 - all the time. If you don't, hd0 is the Windoze drive (in your case) during the (linux) install, but when you later change the BIOS boot order, and reboot, the Linux disk is now hd0.
Note this is not a grub problem - it's doing what you tell (or told) it.

Easiest might be to change the BIOS and reinstall - that way you'll get a clean MBR boot record, menu.lst and fstab. Else you'll have to adjust each of those.
Old 02-25-2009, 07:55 PM   #3
Leon W. Malinofsky
LQ Newbie
Registered: Aug 2007
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks sincerely for insight. Will try. Regards.
Old 02-25-2009, 09:35 PM   #4
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
You might also want to look at the GRUB map command for switching the logical order of (hd0) and (hd1) before booting.

Also, check your BIOS specifications: It may automatically set the boot drive (whichever one you select to boot from) to be (hd0) and the other to be (hd1).

If you can get GRUB to show you a boot menu, push <escape> and then an "e" to get to a command prompt and use the editor and tab-completion to verify which drives are (hd0) and (hd1). (I usually just open a blank line, type (hd0,<tab> which produces a list of the partitions on (hd0). Knowing the partitions is, for me, usually sufficient to identify which drive is which.)

You can also use the GRUB mini-editor to create stanzas that works to boot your two OS, but don't forget that changes made in the GRUB editor are only made to the in-memory copy of the GRUB configuration file, and they are not saved back to the file.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dual boot mbr grub problems Xris718 Linux - General 4 08-09-2006 06:52 PM
dual boot grub problems with redhat sfzombie13 Linux - General 5 07-17-2005 10:55 PM
Grub dual boot problems degraffenried13 Linux - General 3 12-08-2004 09:14 AM
Problems with GRUB on XP/FC2 dual-boot Ziklen Linux - Newbie 27 08-26-2004 12:40 AM
winXP / FC 2.4 GRUB Dual boot problems again jjisnow Linux - Newbie 4 03-23-2004 09:30 AM > Forums > Linux Forums > Linux - Distributions > Debian

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration