An Interesting GRUB Issue
Here's a little background for everyone...
I am running Slackware as my primary operating system and Arch as my secondary (backup) operating system on my main computer (ericsbane05). I also have installations of MS Windows XP, CentOS, and Debian on a separate hard drive. SATA looks like this on my system: SATA0 channel = /dev/sda, /dev/sdb SATA1 channel = /dev/sdc, /dev/sr1 SATA2 channel = vacant, vacant Originally, these drives were in ericsbane03 and 04 with one exception. I only had two SATA drives and one EIDE drive then. The EIDE drive was removed when building this new system and replaced with the drive /dev/sdc that you see above on the SATA1 channel (/dev/sr1 is a DVD R/W, by the way). Arch Linux's GRUB controls /dev/sda's MBR and is the main bootloader for all operating systems on this system. Here's what my menu.lst looks like: Code:
<snip># IMPORTANT --> Arch GRUB sees /dev/sda as hd0, but /dev/sdb as hd2 (should be hd1). 1) I manually edited /boot/grub/device.map to look like this: Code:
(fd0) /dev/fd0 I then deleted all files from the /boot/grub directory and used pacman to uninstall GRUB completely. I then reinstalled GRUB and created a new menu.lst with the correct /dev to (hd) conversions. It looks like this now: Code:
<snip> Code:
# grub-install /dev/sda Thanks, ~Eric |
It sounds like you are saying
/dev/sda is hd0 /dev/sdb is hd2 /dev/sdc is hd1 is that what you are saying? maybe it is a udev problem look in /etc/udev/rules.d or where your udev rules are it sounds like udev might have permanently mapped specific drives to specific sd[x] drives correct me if I'm wrong but back in the day dos use to see the disks as follows 1st disk on bus1 was C 1st disk on bus2 was D 2nd disk on bus1 was E 2nd disk on bus2 was F I'm pretty sure that the bios was the actual cause of the order. and I'm thinking sata might be giving the disks in that order. It could be that grub is correct and your OS is mixing up the dive letters (/dev/sd[x]) You may also want to look at your bios to see if you can change how it presents the order of the disks. It could also be that linux has a different ordering of disks that grub maybe grub sees the disks the way that old dos does |
Nah, Jeff... I'm not saying that. That is what GRUB sees the drives as. The correct map is sda = hd0, sdb = hd1, sdc = hd2. I know this because I can boot with a recovery CD (RIP, SuperGRUBDisk, etc.) using the proper identifications for the partitions and I can boot anything on any drive with it. It's only Arch's GRUB that seems to be confused. That being said, though... udev, that might not be a bad idea to check that. Thanks for that tip! :)
I'll be back... ;) |
grub doesn't often get confused. Grub users get confused. Sometimes "users" include distro devs.
The init scripts determine what populates /dev, so udev is a good start. Remember grub-install runs after the init scripts, so you are seeing the "Arch" view of things, not necessarily the BIOS view of things. From the boot menu, look at the geometry of each disk - should get you the real ("correct" to use your terminology) view of things. |
syg00... you are absolutely correct on your assessment that I'm getting the "Arch view of things". I was trying to explain that earlier today to someone on another forum. It's when GRUB is installed/initialized within the distribution that it takes on whatever characteristics or flaws. I'm sure this is an Arch issue because for many years Debian was my secondary OS/bootloader on all my systems, and it never had this issue with pure SATA or hybrid setups.
I didn't see anything that jumped out at me when looking through Arch's udev rules or config. I'll keep checking in there, though. Anymore hints to lead me in the right direction would not go unappreciated. Thanks, ~Eric P.S. Here's a copy of my fdisk -l with notations. It might also be helpful: Code:
Disk /dev/sdb: 250.0 GB, 250000000000 bytes |
Just a matter of legwork - you'll have to work through it.
Interestingly I've had similar where Ubuntu couldn't manage (E)IDE and SATA mixed. But Arch could. I kept all Debian based distros off that machine, and use Arch to boot it. Now has F14 on it as well - no problems with any of it; or Vista for that matter. Haven't seen any issues on SATA only. Did you check the geometries - from the grub boot menu, not from grub command ?. |
Not yet, syg00, but I'm headed into the GRUB menu in a bit. I'll ckeck and see.
Thanks. :) |
Very interesting.
I had previously checked GRUB geometry using the grub command from within Arch. All was well: Code:
grub> geometry (hd0) (fd0) /dev/fd0 (hd0) /dev/sda (hd1) /dev/sdb (hd2) /dev/sdc Now here is what geometry looked like from the grub command at bootup (menu): Code:
grub> geometry (hd0) Thanks again for the tip, syg00. :) Now what? |
Well, after spending two solid days on this, I have a headache. I know how to work around this issue, so I think I'll just leave it alone for a while.
Thanks for the tips, folks. I still come here everyday and I have email notices set up... just in case someone has an idea to toss in here. Later... ~Eric |
Not sure if my post will be relevant. If not just ignore me. I did not have a problem with grub device mapping because I use grub4dos in mbr to boot into whatever distros grub is using in root folder of installed distro. grub4dos just points to wherever grub pbs is loaded in /
I did have a problem with conflicting device mapping though in /etc/fstab between 2 different kernels I have installed in the same Distro AntiX 11 testing. The 2.6.32 kernel would show in /etc/fstab all /dev as /dev/hdx. My 2.6.38 liqourix kernel would show in /etc/fstab all /dev as /dev/sdx. Same for fdisk -l depending on what kernel I was in. I only noticed this as I have multiple distros and wanted their partitions to automount in thunar file manager and rox file manager at boot and folders in /mnt were hd1,hd6,etc... So in 2.6.38 kernel. Of course the boot messages (I run no splash screen) would be warning /dev/hdx does not exist. And of course in Thunar. /mnt/hd1 folder would be empty. It was confusing the heck out of me. I got around all this by going with UUID instead of /dev/hd or /dev/sd. My /etc/fstab as my example. Code:
# Pluggable devices are handled by uDev, they are not in fstab It fixed my automount problems and read and write access to those partitions. I use UUID in the kernel lines in AntiX /boot/grub/menu.lst also. Code:
title Debian GNU/Linux, kernel 2.6.38-3.dmz.1-liquorix-686 |
Hi rokytnji! :)
Of course, you did NOT waste my time. The information you provided might not help me with my issue, but it may help others. And about the diff in the fstab naming of devices after the 2.6.32.x kernel, yes... I was definitely aware of that, although I don't think it's an issue with my troubles. That all being said, though... I could probably resolve (or more accurately, work around) this annoying trival issue I'm dealing with my just using UUID. I've been avoiding it. Us older folks don't like change too much. The /dev/sdx identifiers were always fine for me. Why'd things have to change? Progress. That's why. ;) Thanks for you input. ~Eric :) |
All times are GMT -5. The time now is 07:30 AM. |