You are not logged in.

#1 2010-11-04 06:30:33

JruASAP
Member
From: USA
Registered: 2010-11-04
Posts: 5

grub no such device

Hello everyone,  I am making the jump from Ubuntu 10.04 to Arch Linux.  I am very excited to get started, and I think I installed everything correctly, but I cannot boot into either Windows 7 (professional x64) or Arch Linux.

Before installing I deleted my ubuntu and linux swap partitions with Gparted on the Ubuntu live CD and created a new ext4 for Arch Linux and a swap partition.

I installed Arch Linux and Grub, but I did already have Grub installed from my Ubuntu installation.  Once I completed the Arch Linux install I attempted to boot into either OS, but I am getting sent to the Grub rescue command line with the error "no such device". 

I have tried to uninstall and reinstall grub from the ubuntu live cd, but to no avail, grub said that it "cannot be installed to this disk" and even when I ran a  "purge grub-common grub-pc" command that I saw from a possible solution on the Ubuntu forums grub still appears to be there because it gives me the same error.  I have tried to use super grub and the windows 7 recovery options as well, but nothing seems to work.

I would really appreciate it if anyone knows a possible solution to this problem.  I have a LOT of stuff on my windows partition so backing up and reinstalling everything really isn't an option unless there is absolutely no way to fix this.  I am really excited to start using Arch Linux, and Grub seems like it's just really being a pain.

thank you in advance for anyone who reads this and/or tries to help me!

Last edited by JruASAP (2010-11-04 06:36:14)

Offline

#2 2010-11-04 14:22:14

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: grub no such device

Did you install grub legacy (v0.97) or grub 2 (v1.98) ? I'm not sure about 10.04 or 10.10 but if I remember correctly Ubuntu always used legacy, in which case you're going to have to edit /boot/grub/menu.lst from the partition where you installed Arch (since that's where you installed GRUB, right?).

sudo nano /boot/grub/menu.lst

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2010-11-04 17:37:38

JruASAP
Member
From: USA
Registered: 2010-11-04
Posts: 5

Re: grub no such device

Ubuntu installed Grub 2 for me.

Offline

#4 2010-11-04 18:11:31

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: grub no such device

First, don't panic and reformat.   Everything is still there.   

If Grub2 is still there from Ubuntu, then I recommend following their guide to updating the grub2 menu, as the Ubuntu Grub2 has been patched and operates slightly differently from the Arch package. 

https://help.ubuntu.com/community/Grub2 … 0Structure
https://help.ubuntu.com/community/Grub2 … %20Entries

Basically it will amount to something like this:

On your Ubuntu partition navigate to /etc/grub.d and find the file called 40_custom.

Add your custom menu entries to this file.   For Arch it would look like this:

# (1) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,2)
linux /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img
}

Make sure the "set root" line is pointed to the correct partition for both of these entries.  Also for the Arch entry, you'll want to make sure your vmlinuz26 root path is correct. 

for Windows 7 the entry will look like this:

# (2) Win7
menuentry "Windows 7" {
insmod ntfs
set root=(hd0,1)
chainloader +1
}

Now in Ubuntu run

sudo update-grub

Now when you reboot, the new entries should be there and they should work, as long as the partitions for root are set correctly.  If you need help with the naming convention just look up the grub articles in the wiki.

Last edited by Beelzebud (2010-11-04 18:13:33)

Offline

#5 2010-11-04 18:17:44

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: grub no such device

It means they've must've switched to it. About frigging time...

First of all you should find out the UUIDs for your partitions. I read that working with them is much more specific than using labels or paths (at least until you format the drive. Then the UUID changes).

sudo fdisk -l
blkid

Then replace the ones from my working grub.cfg. It's from a Windows XP install on another drive but it should work for Windows 7 too since "chainloader +1" is the most important part.

sudo nano /boot/grub/grub.cfg
# Config file for GRUB2 - The GNU GRand Unified Bootloader
# /boot/grub/grub.cfg

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,2)
#  /dev/sda3       (hd0,3)
#

# Timeout for menu
set timeout=5

# Set default boot entry as Entry 0
# set default=0

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,1)
linux /boot/vmlinuz26 root=/dev/disk/by-uuid/978e3f81-8048-4ae1-8a16-ab787258e8ff rootfstype=ext4 ro
initrd /boot/kernel26.img
}

# (1) Windows
menuentry "Windows XP" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 5CAXFC11ARFBK384
drivemap -s (hd0) ${root}
chainloader +1
}

Give it a shot. But remember to change "set root=(hd0,1)" according to what fdisk -l returned. And you should be fine.

I think you'll also need to run sudo grub-mkconfig to update it, I'm not sure. I think it's best not mess with GRUB once it's properly set up.


Edit: I mentioned sudo grub-mkconfig because I found this post that read:

As far as I know this command was supposed to replace update-grub in Karmic Koala and later versions of Ubuntu.

Last edited by DSpider (2010-11-04 18:43:37)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#6 2010-11-04 18:41:49

JruASAP
Member
From: USA
Registered: 2010-11-04
Posts: 5

Re: grub no such device

@Beelzebud I don't have a ubuntu partition anymore because I erased it in order to use the space for Arch Linux.  I tried to find the file you were talking about on my Arch Partition, but it isn't there.  I am booted into the Ubuntu Live CD right now.

@DSpider here are my UUIDs.

/dev/loop0: TYPE="squashfs"
/dev/sde1: UUID="247517DF54785913" TYPE="ntfs"
/dev/sdf1: LABEL="System Reserved" UUID="0CE27A8EE27A7BB0" TYPE="ntfs"
/dev/sdf2: UUID="BE5481F95481B525" TYPE="ntfs"
/dev/sdf3: UUID="f171d940-aebf-4aaa-8405-ed47914ed86b" TYPE="ext4"
/dev/sdf4: UUID="14574f27-abe5-467d-972b-648d2a286874" TYPE="swap"

I really don't wanna mess anything up more than it already is, so would you mind assisting me in editing your grub.cfg to match my setup?  I don't know where to put the UUIDs or dev labels exactly.

Offline

#7 2010-11-04 18:50:34

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: grub no such device

Do you have a separate /boot partition ? Post the output from:

sudo fdisk -l

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#8 2010-11-04 18:53:35

JruASAP
Member
From: USA
Registered: 2010-11-04
Posts: 5

Re: grub no such device

Disk /dev/sde: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cb210

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *           1        7297    58613121    7  HPFS/NTFS

Disk /dev/sdf: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4f0f49a2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdf2   *          13      118207   949394303+   7  HPFS/NTFS
/dev/sdf3          118208      121470    26210047+  83  Linux
/dev/sdf4          121471      121601     1052257+  82  Linux swap / Solaris

Offline

#9 2010-11-04 20:37:08

JruASAP
Member
From: USA
Registered: 2010-11-04
Posts: 5

Re: grub no such device

I also asked this same question on the ubuntu forums just in case anyone there knew how to fix this.  I was attempting to chroot into my arch partition from the ubuntu live cd to reinstall grub because they said grub isn't installed on my system but it didn't work.  They said it might not be possible to chroot into arch from the ubuntu cd.

here's a link to the thread if it would help anyone help me

http://ubuntuforums.org/showthread.php?t=1613464

thanks again for everyone's help!

Offline

#10 2010-11-04 21:35:13

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: grub no such device

You didn't have to reinstall GRUB. If you closely followed the Beginners' Guide (as in installed GRUB 2, set the mount point accordingly, etc) you should've arrived at the most basic command-line from which to build Arch in your own way.


From my understanding it boots GRUB 1.98 (as in "GRUB 2") but it won't start neither Arch nor Windows 7. Then it's clearly a misconfigured GRUB entry. I'm guessing Windows 7 is installed on "sde1", being the first drive, first partition and Arch is installed on "sdf3", being the only ext4 partition you have (sde1 and sdf3 is what the Live CD sees, they're probably sda1 and sdb3 for Arch). Like I said, try replacing the UUIDs from my grub.cfg and see if it works.

Here. I even edited for you:

# Config file for GRUB2 - The GNU GRand Unified Bootloader
# /boot/grub/grub.cfg

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,2)
#  /dev/sda3       (hd0,3)
#

# Timeout for menu
set timeout=5

# Set default boot entry as Entry 0
# set default=0

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,3)
linux /boot/vmlinuz26 root=/dev/disk/by-uuid/f171d940-aebf-4aaa-8405-ed47914ed86b rootfstype=ext4 ro
initrd /boot/kernel26.img
}

# (1) Windows
menuentry "Windows XP" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 247517DF54785913
drivemap -s (hd0) ${root}
chainloader +1
}

I think "set root=(hd0,3)" for the Arch Linux entry is ok. They are based on UUIDs after all... But you can try it with "set root=(hd0,1)" as well, for both Arch and Windows entries.

Last edited by DSpider (2010-11-04 21:39:54)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB