IDE Drive is Listed as SATA with Feisty Live CD and install causes GRUB to be improperly configured (Error 15 on boot)

Bug #107798 reported by Jonathan Salkoff
14
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: grub

The install from the Feisty Live CD (beta) went very smoothly.

When I tried the next boot (from the hard drive), I received "Error 15" File Not Found. I was able to reboot the machine with the Live CD, and I had to edit the /boot/grub/device.map and /boot/grub/menu.lst to reflect the actual configuration of my hard drives:
The Live CD recognized my hda as sda and my sda as sdb, so the device map looked like this:

hd(0)=sda
hd(1)=sdb

I have an IDE drive as hda, so I edited the device map to be this:

hd(0)=hda
hd(1)=sda

Then I also had to manually edit the menu.lst file to reflect the proper location of the boot files.

Tags: live-cd
Revision history for this message
Dan O'Huiginn (daniel-ohuiginn) wrote :

Thanks for taking the time to report this bug. Unfortunately we can't fix it, because your description doesn't yet have enough information.

Please include the following additional information, if you have not already done so (please pay attention to lspci's additional options), as required by the Ubuntu Kernel Team:
1. Please include the output of the command "uname -a" in your next response. It should be one, long line of text which includes the exact kernel version you're running, as well as the CPU architecture.
2. Please run the command "dmesg > dmesg.log" and attach the resulting file "dmesg.log" to this bug report.
3. Please run the command "lspci -vvnn > lspci-vvnn.log" and attach the resulting file "lspci-vvnn.log" to this bug report.

For your reference, the full description of procedures for kernel-related bug reports is available at [WWW] http://wiki.ubuntu.com/KernelTeamBugPolicies. Thanks in advance!

Changed in grub:
assignee: nobody → daniel-ohuiginn
status: Unconfirmed → Needs Info
Revision history for this message
Jonathan Salkoff (salkoff) wrote :

Linux ubuntu 2.6.20-12-generic #2 SMP Wed Mar 21 20:55:46 UTC 2007 i686 GNU/Linux

Revision history for this message
Jonathan Salkoff (salkoff) wrote :
Revision history for this message
Nanley Chery (nanoman) wrote :

Do you still have this problem in Feisty Final?

Revision history for this message
Jonathan Salkoff (salkoff) wrote :

Yes, I fixed the problem (as I described above), so now I can boot without any problems. I have not tried to re-install the operating system, so I don't know if the install process would still find the drives and names them the same way. I have not tried to recreate the initial problem, since it would require me to reinstall Ubuntu.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

I am not sure if it is the same bug, but I believe so. I have recently installed Feisty on a Dell Optiplex 745. It only has one SATA drive, and no IDE drives.

LiveCD started without any problems, and I was able to install Kubuntu on the system easily. However, after that the installed system did not boot. It would just hang for ~3 seconds, and then stop, and bring me to the ash shell. I tried to start it with acpi=off, and other changes I found on the net, but to no avail.

At last, however, I realized that the problem was that the grub entry was incorrect: the root was set to /dev/hda1, while the correct root is, obviously /dev/sda1. After changing it in menu.lst, I was able to boot into the system. However, this is still a problem since when I installed the 2.6.20-16 linux image, it also set the root to /dev/hda1, and again I had to set it to /dev/sda1 manually.

Revision history for this message
Matthias (m-kaeppler) wrote :

I can confirm this bug for Gutsy final, 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686 GNU/Linux.

GRUB incorrectly mapped my root partition to hd(1,0), when it should be hd(0,0). This is because for some strange reason, Ubuntu Gutsy mapped my first IDE drive to /dev/sdb and not to /dev/sda.

You can fix this issue by setting the "groot" variable in /boot/grub/menu.lst to the proper value.

This is an absolute show stopper for Linux/computer newbies. Demands a fix for next release!

Revision history for this message
Matthias (m-kaeppler) wrote :

Just realized this bug was reported for Feisty Live CD and not yet accepted.

I say it again, the bug is still there in 7.10 (Gutsy Gibbon) final, and it's a major flaw because it breaks your installation.

This bug should get more attention and a higher priority!

Nanley Chery (nanoman)
Changed in grub:
status: Incomplete → Confirmed
Revision history for this message
David Nemeskey (nemeskeyd) wrote :

It is still there in Gutsy, AND not just at install time. Any time the kernel is updated, it messes up the grub record, setting the root back to /dev/hda1. This is very stupid, I have to correct it after every linux image update. Also, kernel updates do not honor the previous settings at all, I removed quiet from the grub line and now it is back.

Please fix this, because it is an annoyance to everyone affected and a real showstopper for newbies.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Actually, there was a little mistake in the last comment. The automagic section is written at install time, and it contained the hda1 part, so that is why every new kernel release uses it. My mistake...

Still, the install-time problem is a bug, and it should be fixed.

Revision history for this message
Benjamin Lee Solosy (aethereal) wrote :

This is a HUGE bug, which has now rendered my machine completely unbootable/usable.

I have Windows XP on my IDE hard drive, which I now cannot boot into. And I have Ubuntu on my USB drive, which I also now cannot boot into. I am composing this message only by booting with my LiveCD.

Would anybody who is a Linux *expert* please care to tell me how I can salvage my machine?

Note: There are actually several bugs/issues involved here, including the fact that the Ubuntu install to my USB drive actually wrote GRUB to my *hard disk* Master Boot Record (which it never should have done!), so this is neither a small nor a simple issue.

So if somebody could please help me salvage my machine from its currently unusable state, I would greatly appreciate it.

P.S. Ironically, there is also a very serious Windows XP Recovery Console bug, which prevents me from simply restoring my MBR for Windows. (If a machine comes pre-installed with WinXP via Sysprep (e.g. Dell Computer), the local Administrator password is not recognized, which prevents entering Recovery Console.)

So, in summary: I am now very screwed due to these multiple, major, overlapping bugs. Please help. Thanks.

Revision history for this message
Matthias (m-kaeppler) wrote :

Hi Benjamin,

to fix this, you will have to either boot using your live-cd and mount the partition that contains your GRUB config or manually edit the boot options for GRUB via the boot loader to boot correctly once and then do the same change in your GRUB config as well. In any case, you will have to alter the 'groot' variable in /boot/grub/menu.lst to point to the correct root device (the partition where the linux kernel resides). In my case, I had to set 'groot' to '(hd0,0)', which is the first partition on my first disk. For e.g. the 1st partition on your second drive, it would be 'groot=(hd1,0)' and so on.

HTH.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Hi Benjamin,

just as Matthias said. To manually edit the GRUB option, just select the system to boot (Ubuntu or Windows), and instead of Enter, press 'E'. If I remember correctly, 'E' again, scroll left, and change the path to the right /dev entry (for Windows, I guess it would be /dev/hda1, if it is IDE). Enter, 'B', and there you go. Just don't forget to update the files in /boot/grub.

Revision history for this message
Benjamin Lee Solosy (aethereal) wrote :

Nope. Doesn't work.

Even when I attempt to manually select/edit my WinXP partition at boot-time, Grub indicates: Error 12: Invalid device requested.

So, here's what I have:
root@ubuntu:/home/ubuntu# fdisk -l

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9dc96e9e

   Device Boot Start End Blocks Id System
/dev/sda1 1 5 40131 de Dell Utility
/dev/sda2 * 6 2077 16643340 7 HPFS/NTFS
/dev/sda3 2078 9726 61440592+ f W95 Ext'd (LBA)
/dev/sda5 2078 4626 20474811 7 HPFS/NTFS
/dev/sda6 4627 7187 20571201 7 HPFS/NTFS
/dev/sda7 7188 9726 20394486 7 HPFS/NTFS

Disk /dev/sdb: 4126 MB, 4126670848 bytes
255 heads, 63 sectors/track, 501 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b2e6d

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 473 3799341 83 Linux
/dev/sdb2 474 501 224910 5 Extended
/dev/sdb5 474 501 224878+ 82 Linux swap / Solaris
------------------------------------------------------------------------------------------------
My device.map is as follows:
(hd0) /dev/sda
(hd1) /dev/sdb
-------------------------------------------------------------------------------------------------
My menu.lst is as follows:
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=2f59bebe-c4c8-4d2b-a989-4bd9182241f2 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=2f59bebe-c4c8-4d2b-a989-4bd9182241f2 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1
------------------------------------------------------------------------------------------------------

Still can't boot to either OS. But especially want to boot to WinXP.

All ideas are welcome. Thanks.

Revision history for this message
Matthias (m-kaeppler) wrote :

Benjamin,

your post doesn't make any indication of the 'groot' variable of which I was speaking. The source of the problems summarized in this bug report is that the GRUB root partition (the partition where the boot loader program is installed) is sometimes set incorrectly by the Ubuntu installer. You will have to set this very variable to the proper partition. In particular, note that 'groot' != 'root'. Search your menu.lst file for an entry like 'groot=(hdX,Y)' and adjust it properly.

Setting groot to an invalid value will break bootstrapping the boot loader itself.

Revision history for this message
Gary Snow (gary-snow) wrote :

I have the same problem, I have a parrallel IDE drive and two SATA drives in RAID. Ubuntu server 8.04 AMD 64 loaded correctly but I decided to change to Desktop 8.04 amd 64 and the IDE reported in as a SATA drive. Alt -i386 faulted also. The BETA edition of 8.04 Desktop reports correctly. I have a temp. workround by installing Edubuntu 7.10 and updating but was hopping for a clean install of ubuntu and upgrading to Edubuntu to run a small home network.

Revision history for this message
Dan O'Huiginn (daniel-ohuiginn) wrote :

Oops! looks like I forgot to unassign myself from this bug after getting details from Jonathan last year (!). I'm so sorry.

Changed in grub:
assignee: daniel-ohuiginn → nobody
Revision history for this message
lcbn (lecban-onet) wrote :

I am getting the same error on first boot after completing fresh install of 8.04.

My configuration is:
 - one IDE primary drive on which I put only /boot,
 - one SCSI drive (attached to 'bios-less' controller) on which I put remaing filesystems.

I was unable to fix the issue using standard recovery procedures and by manually editing several files like:menu.lst, mtab, fstab.

I was able to fix this misconfiguration only with Auto Super Grub Disk.

I would like to add that I didn't encounter such issue with OpenSuSE 11 in exact the same configuration.

Revision history for this message
Phillip Susi (psusi) wrote :

This has been fixed in grub2 by doing away with device.map and locating drives by their uuid.

Changed in grub (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.