You are not logged in.

#1 2012-02-10 11:28:09

sergs
Member
Registered: 2012-02-10
Posts: 3

inconsistent grub error 17, dual booting issues

Hello,
I've recently installed Arch as a second OS on my computer, but I'm having a bit of trouble when it comes to booting it. I'm a bit new to Linux in general, but I've tried to research the problem, and seem to have run into a wall. Any comments, insight, suggestions would be greatly appreciated. Preemptive apologies for being windy, I'm trying to give as much relevant info as possible here

****************Here are the details:******************

-1st hard drive (sda): Windows 7
-2nd hard drive (sdb): Arch

Partitioning scheme:
sdb1 = boot, about 100Mb, ext2
sdb2 = swap, ~2gig
sdb3 = root, ~20gig, ext3
sdb4 = home, the rest (HD is 500gb total), ext3

-grub is installed on the MBR of sdb
-windows has no problems booting independently (when i disconnect my second hard drive), so sda hasn't been touched at all

in grub's menu.lst:

arch has root set to (hd1,0)
windows 7 has rootnoverify set to (hd0,0), with chainloader +1 after.


**************The issue:********************

when choosing to boot arch from grub, (this is booting off of the second hard drive), i get an error 17, saying the filesystem is unrecognized and the partition type is 0x7.

if i then enter into the command line mode for grub, and try

 find /grub/stage1 

it spits out (hd0,0), which is incorrect. it should be (hd1,0) since my boot partition is the first partition on the second hard drive, and (hd0,0) is an entirely different hard drive with nothing but windows on it.

An interesting complication:
If I boot the USB iso image of arch I used to originally install it, and I highlight the option "boot existing OS", press tab to change hd0 0 to hd1 0, it loads up Grub, and from there on Grub boots perfectly fine to Arch - implying that at the very least Arch installed on the hard drive properly. Also, Grub run in this fashion seems to realize that (hd1,0) is ext2.

After booting arch as in the previous paragraph^ (note, this is arch as installed on the hard drive, not the liveCD version), i run:

grub
grub> find /grub/stage1

and it replies that stage1 is in hd(1,0), which is where it should be.



Googling suggests my partitions are somehow messed up, but I'm not completely sure of that. Booting from the USB image and running

 fdisk -l 

seems to give the right partition order and sizes.

However, there could be a problem stemming from how I partitioned the second hard drive in the first place: it's an Advanced Format drive, and using Western Digital's guidelines - http://wdc.custhelp.com/app/answers/detail/a_id/5655 - i ran:

 parted -a optimal /dev/sdb 

and created my partitions, then used the Arch installer to establish their file systems and do the rest.

I don't have any concrete ideas about what's going on, except that Grub is somehow having trouble mounting/recognizing the file system when I try to run it from the MBR directly.

Once again, sorry for such a long post, and any help at all is greatly appreciated.

Offline

#2 2012-02-10 19:11:34

sergs
Member
Registered: 2012-02-10
Posts: 3

Re: inconsistent grub error 17, dual booting issues

Also, windows does not boot from any configuration. I believe I get an error 13 when I try it...

Offline

#3 2012-02-10 20:34:50

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: inconsistent grub error 17, dual booting issues

Try using UUIDs or Labels instead of /dev/sdX schemes; what is likely happening is that your drives are getting switched at boot. There is information on doing both in the wiki.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#4 2012-02-12 01:15:09

sergs
Member
Registered: 2012-02-10
Posts: 3

Re: inconsistent grub error 17, dual booting issues

Ok, so I've tried to reconfigure my grub/menu.lst as described in https://wiki.archlinux.org/index.php/Pe … t_managers .
When I try to boot after that, it claims that the device /dev/disk/by-uuid/*the uuid i got for my boot partition* cannot be found.

This next paragraph might be a bit of a facepalm moment; in retrospect, it seems like it should be obvious that this would happen (like lifeafter2am is saying, my drives are getting switched at boot up):

After booting up grub in a bunch of different configurations, I've managed to determine that what my computer does is this:
- In the bios, I changed the boot order to be USB -> 2nd hard drive (the one with arch on it) -> first hard drive (since I use a USB for a liveCD, and the 2nd hard drive's MBR has grub on it, which i want to use to dual boot both arch and windows, windows being on the first hard drive).
So every time I insert the usb, it changes what grub perceives to be hd0 and hd1. When I insert the usb, the usb becomes hd0, and the other drives are renumbered. When I try to boot without the USB, having the BIOS boot from my second hard drive makes the second hard drive become hd0.

What with ^ going on, I simply went in to the grub/menu.lst and changed arch's (hd1,0) to (hd0,0), and now it recognizes that (hd0,0) is indeed an ext2 fs, partition type 0x83, etc.

The problem now is: no matter what I try to set the root in menu.lst to be, whether it's sdb1, sda1, some uuid label, grub starts booting and then says error: unable to mount the real root device, and dumps me into a shell with a good luck message.

Is there a way to figure out what i should set grub's root in menu.lst to be, from the arch iso on my USB, keeping in mind the fact that inserting the USB renumbers the hard drives?

I don't wanna make the analogy to quantum mechanics, but this almost seems like an observer disturbing the results type of thing >_<

Last edited by sergs (2012-02-12 01:18:54)

Offline

Board footer

Powered by FluxBB