I had Ubuntu installed and I installed XP. I tried to be able to dual boot them by running an Ubuntu live cd and running

~ $ sudo grub
grub> root (hd0,0)
grub> setup (hd0)

But now when I restart I get a black screen that says

'Boot device
Selected Boot Device and press any key

No matter what key I press it shows this error

This is what my system looks like:

/dev/sda1 - Ubuntu - ext3 - 73 GiB
/dev/sda2 - Ubuntu - extended - 3.16 GiB
/dev/sda5 - Ubuntu - linux-swap - 3.16 GiB

/dev/sdb1 - Windows XP - ntfs - 76 GiB

/dev/sdc1 - Stuff - ext3 - Code/Documents

/dev/sdd2 - Stuff - ext3 - Movies/Music

  • duplicate of this: superuser.com/questions/25168/… – quack quixote Oct 15 '09 at 23:21
  • note /dev/sda is a drive, not a partition -- /dev/sda1 is the first partition on that drive – quack quixote Oct 15 '09 at 23:25
  • 1
    @quack: I have already seen this question and followed the steps outlined in the Ubuntu wiki but I can't seem to resolve the problem. Also, I know it is the drive, but I didnt think I'd need to clearly label each partition in the drives. But I will edit it to do so anyways if it helps. – RyanScottLewis Oct 15 '09 at 23:35
  • clearly label please, so we don't misunderstand or second-guess you. it also helps knowing you've tried to follow the question i linked to. – quack quixote Oct 15 '09 at 23:41
  • It can be that Windows needs to be on the first partition of the first hdd...meaning /dev/sda1...you can edit the menu.lst and add a map command to achieve this. map (hd1,0) (hd0,0) – Bobby Oct 16 '09 at 7:03

You could be running into a couple of issues here. Your system BIOS may be confused about which drive it's supposed to boot from. It might be easiest to disconnect all but your Ubuntu boot drive, then run through the Grub recovery again.

If you want to try again without pulling drives, make sure you're installing to the right drive by using Grub's tab-completion (type this out and press TAB where indicated):

grub> root (hd<TAB>

Grub will spit out what drives it sees:

grub> root (hd
 Possible disks are:  hd0 hd1 hd2 hd3

Now we're assuming it's drive 0, so type that in, and hit TAB again (yours will look different):

grub> root (hd0<TAB>
 Possible partitions are:
   Partition num: 0,  Filesystem type unknown, partition type 0x7
   Partition num: 1,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 2,  Filesystem type unknown, partition type 0x82
   Partition num: 3,  Filesystem type is ext2fs, partition type 0x83

If it only shows one partition, you've got the wrong drive; try again with drives 1,2,3 to make sure you install to the right drive.

  • I was able to change the boot sequence in my BIOS and I can now boot XP up by changing it's HDD to the first in the boot sequence. I can do the same for Ubuntu (I guess it was trying to boot from sdc). When I boot up ubuntu though, I don't see GRUB. Instead I see a bunch of cryptic letters and then it just boots up Ubuntu. – RyanScottLewis Oct 16 '09 at 0:08
  • if the BIOS was trying to boot drive sdc when you ran the grub-recovery steps earlier, grub was probably seeing sdc as (hd0,0). you should run through the grub-recovery process again, be sure to use the tab-completion to get the right (hdX,Y) parameter for the root and setup commands. – quack quixote Oct 16 '09 at 0:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.