You are not logged in.

#1 2011-03-12 12:26:53

kelinu
Member
Registered: 2011-03-12
Posts: 10

Grub not reading my partitions

Hi all,
I'm trying to install Arch Linux alongside my Windows 7 partition.  Using gparted I created two partitions, one for the ext4 filesystem and the other for the swap.  In the installation, when I arrived to preparing the hard drive, I chose "Manually Configure block devices, filesystems and mountpoints".  I selected the partitions I needed and went along. 

My partition table (using sudo fdisk -l)

Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1       13757   110503071    7  HPFS/NTFS
/dev/sdb2   *       13758       15539    14313915   83  Linux
/dev/sdb3           15540       15669     1044225   82  Linux swap / Solaris
/dev/sdb4           15670       30401   118334790    7  HPFS/NTFS

sdb1 is my Windows 7 partition, sdb2 is Arch installation parition, sdb3 is swap, and sdb4 is a data partition for Windows.

Then I installed Grub to /dev/sdb, following the documentation advice and not installing to sdb#.

When I came to reboot, the Grub menu loaded but when I hit Arch Linux or Arch Linux Fallback, I get this error:

"root (hd1,1)
 error 22: No such partition"

I don't get it, root (hd1,1) means sdb2, right?

Here's the contents of my menu.lst grub file:

# (0) Arch Linux
title  Arch Linux
root   (hd1,1)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/12bc8088-7ccd-4449-88e1-9e848862f9f8 ro
initrd /boot/kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd1,1)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/12bc8088-7ccd-4449-88e1-9e848862f9f8 ro
initrd /boot/kernel26-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1

(windows is commented out for now)

And this is the contents of my fstab file:

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0

UUID=12bc8088-7ccd-4449-88e1-9e848862f9f8 / ext4 defaults 0 1
UUID=c559a08d-2440-4149-95cb-928202048338 swap swap defaults 0 0

I reinstalled Arch yesterday using UUID to see if I'd still get the error, and yes, I did still get it.  I should say that the Arch partition (sdb2) has the boot flag on it...might have something to do with it, I dunno.

Anyone know anything about this?  I read through the documentation and I couldn't find anything that helped me out apart from arranging the order of the partition table with fdisk. 

Thanks,
Mike

Last edited by kelinu (2011-03-12 12:30:14)

Offline

#2 2011-03-12 13:33:16

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: Grub not reading my partitions

maybe it's becouse it's hdb and the bios is on it .

so it becomes hd0 instead of hd1.

try it first by edit the grub entry (by pressing the e key)

and if it works change menu.lst .

also try windows to see if it says the same.

ezik

Offline

#3 2011-03-12 13:34:57

kelinu
Member
Registered: 2011-03-12
Posts: 10

Re: Grub not reading my partitions

hdb?  During partitioning it always said sdb.  So you're saying I should edit grub entry to hdb instead of sdb for all the drives?

Offline

#4 2011-03-12 13:39:22

kelinu
Member
Registered: 2011-03-12
Posts: 10

Re: Grub not reading my partitions

Maybe I should change menu.lst so that it's root (sd1,1) instead of (hd1,1)?  What do you think?  Not sure on this.  In menu.lst the following appears in comments:

#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,1)
#  /dev/sda3       (hd0,2)

so I doubt that I should change it to (sd1,1).

Offline

#5 2011-03-12 13:50:53

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: Grub not reading my partitions

So while your first post doesn't tell so you have a second hard drive. Have you tried to disable it in BIOS just to make sure it's not BIOS that change order of the drives?

Offline

#6 2011-03-12 13:55:22

kelinu
Member
Registered: 2011-03-12
Posts: 10

Re: Grub not reading my partitions

I do have a second hard drive but I think it's not interfering because there's no OS that boots from it.  I left it untouched.

I think I have a temporary fix though.  Just now I rebooted and pressed e in the Grub screen to change the boot options.  I changed the partition to (hd0,1) instead of (hd1,1) and it worked and booted Arch!  I don't know why that works though and I would like to know :S  Arch is installed on sdb2 so it makes sense if it's (hd1,1), doesn't it?  To me, (hd0,1) means sda2.  What's going on?

Offline

#7 2011-03-12 16:24:05

jocheem67
Member
Registered: 2009-11-09
Posts: 243

Re: Grub not reading my partitions

I think that the naming "sda, sdb, sdc etc" does not imply a static order what linux is concerned.
You can install an os on sdX and still it'll be your first drive...That's what happened here I think.

I'm no expert here, but remember that I have been fiddling around quite a lot with this subject. Did you search for error 22 ?
Did you indeed try to change bios-settings?

Finally, of course you can just edit your menu.lst, problem solved..

Offline

#8 2011-03-12 19:37:26

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: Grub not reading my partitions

i think that like in windows that the booted partition becomes drive c:

the booted dev becomes hd0.

and this is from experience.

ezik

Offline

#9 2011-03-15 16:38:17

cory.schwartz
Member
Registered: 2010-06-13
Posts: 11

Re: Grub not reading my partitions

I agree that hd# is from grub's perspective. So hd0 is the name of whichever drive on which grub is installed.


I am still suprised you were able to boot it, however, because grub(1) does not support booting from ext4 filesystems.
http://kernelnewbies.org/Ext4#head-6344 … d2237f2910

Offline

#10 2011-03-15 16:47:19

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Grub not reading my partitions

cory.schwartz wrote:

I am still suprised you were able to boot it, however, because grub(1) does not support booting from ext4 filesystems.
http://kernelnewbies.org/Ext4#head-6344 … d2237f2910

Luckily, the arch package of grub includes the ext4 patch https://wiki.archlinux.org/index.php/Ext4#Prerequisites

Online

Board footer

Powered by FluxBB