Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48678 - grub with HDD-1 as First Boot Device swaps hd0 and hd1
Summary: grub with HDD-1 as First Boot Device swaps hd0 and hd1
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 05:46 UTC by Evert
Modified: 2004-07-12 11:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evert 2004-04-22 05:46:17 UTC
hda1 = hd0,0 = redhat /boot
hda2 = hd0,1 = redhat /
hdb2 = hd1,1 = gentoo /boot
hdb3 = hd1,2 = gentoo /

Since I have redhat on hda and wanted to leave that one alone I installed gentoo on hdb.
In the BIOS, I changed the "First Boot Device" from HDD-0 (which is hda) to HDD-1 (which is hdb).

In gentoo I configured /boot/grub/grub.conf (hdb2) like this:
default 0
timeout 30
splashimage=(hd1,1)/grub/splash.xpm.gz
title Gentoo Linux (2.4.26)
root (hd1,1)
kernel /kernel-2.4.26 root=/dev/hdb3

After that, I setup grub like this:
grub> root (hd1,1)
grub> setup (hd1)

When booting, this gives me a garbage screen and grub does NOT work.
However, changing /boot/grub/grub.conf into this makes it working:
default 0
timeout 30
splashimage=(hd0,1)/grub/splash.xpm.gz
title Gentoo Linux (2.4.26)
root (hd0,1)
kernel /kernel-2.4.26 root=/dev/hdb3

So when the "First Boot Device" in the BIOS is HDD-1, grub swaps hd0 and hd1 which is not right.
After booting, and running grub, I can see HDD-0 (hda) is hd0 again and HDD-1 (hdb) is hd1 again. I checked this in grub using the following commands and looking at the number of partitions shown.
grub> root (hd0,<tab>
grub> root (hd1,<tab>


Reproducible: Always
Steps to Reproduce:
see above...

Actual Results:  
When "First Boot Device in BIOS is set to HDD-1, then at boottime:
HDD-0 (hda) = hd1
HDD-1 (hdb) = hd0


Expected Results:  
When "First Boot Device in BIOS is set to HDD-1, then at boottime:
HDD-0 (hda) = hd0
HDD-1 (hdb) = hd1


Gentoo Base System version 1.4.9
Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.26)
=================================================================
System uname: 2.4.26 i686 AMD Athlon(tm) XP 2600+
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
FEATURES="autoaddcvs buildpkg ccache sandbox"
MAKEOPTS="-j2"
USE="X apm arts avi berkdb bonobo cdr crypt cups directfb encode esd foomaticdb
gdbm gif gnome gpm gtk gtk2 imlib java jpeg ldap libg++ libwww mad mikmod motif
mozilla mpeg mysql ncurses oggvorbis opengl oss pam pdflib perl png python
quicktime readline ruby sdl slang ssl svga tcpd truetype x86 xml2 xmms xv zlib"
Comment 1 Robert Moss (RETIRED) gentoo-dev 2004-07-11 13:52:07 UTC
You've set up grub incorrectly. The BIOS is not the be-all and then end-all - you must also tell grub about it. See the following URI for information.

http://www.gnu.org/software/grub/grub-faq.en.html#TOCq10
Comment 2 Robert Moss (RETIRED) gentoo-dev 2004-07-11 23:10:11 UTC
In fact - please close this as RESOLVED INVALID. The BIOS setting *should* be ignored by grub, and changing this behaviour will break hundreds of installations.
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2004-07-12 11:31:06 UTC
closing, per robert's comment