You are not logged in.

#1 2012-04-04 18:24:41

permnoob
Member
Registered: 2012-03-04
Posts: 7

Issue with grub boot partitions

Ok so I installed arch linux on my desktop pc with a single SATA hard drive, and got it up and running.  I then added a second SATA hard drive and it stopped booting.  I assumed it was renaming sda vs sdb, so i swapped the cables around on hte mother board and it came back to life.  I then added the second SATA drive to fstab list and swapped the cables back, and it still wouldn't boot.  now I edited the grub boot commands so that hd0,0 was now hd1,0, assuming the hard drive i wanted was just further down the list now, and it still didnt work.  HOWEVER when i said the boot partition was still on disk 0, but root was on drive B, it worked.  I edited my menu.lst to reflect this, but this makes no sense. 

ALL LINUX AND SYSTEM FILES ARE ON ONE PHYSICAL DRIVE.  doesn't the working menu.lst claim they are on seperate drives (hd0,0 for the /boot partition, and hd1,2 for the root partion)?

/etc/fstab

UUID=005fd3cb-6ddd-4c30-b9e8-d570de17b4e2 /home         ext3    defaults        0       2
UUID=12807f6d-9046-4e6c-8532-3b5a6e3c121a /boot         ext2    defaults        0       2
UUID=2558d2a9-4819-4eb5-a7ff-7e57a119bb98 swap          swap    defaults        0       0
UUID=c8dc783e-8b99-4a47-95ca-2b33fff5a212 /             ext3    defaults        0       1
MH720-500                                 /mnt/Media500 vfat    defaults        0       0

WORKING /boot/grub/menu.lst

*SNIP*
# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sdb3 ro vga=773
initrd /initramfs-linux.img
*SNIP*

output of blkid

/dev/sda1: LABEL="MH720-500" UUID="49FB-1F2A" TYPE="vfat" 
/dev/sdb1: LABEL="boot" UUID="12807f6d-9046-4e6c-8532-3b5a6e3c121a" TYPE="ext2" 
/dev/sdb2: LABEL="swap" UUID="2558d2a9-4819-4eb5-a7ff-7e57a119bb98" TYPE="swap" 
/dev/sdb3: LABEL="archPart" UUID="c8dc783e-8b99-4a47-95ca-2b33fff5a212" TYPE="ext3" 
/dev/sdb4: LABEL="archHome" UUID="005fd3cb-6ddd-4c30-b9e8-d570de17b4e2" TYPE="ext3" 

can someone explain to me what obvious fact I am missing is?  why does this work?  should it not be working, is there something I should change?

Offline

#2 2012-04-04 18:33:05

sleepwalkerbr1991
Member
From: Goiânia - Goiás - Brasil
Registered: 2012-01-06
Posts: 5
Website

Re: Issue with grub boot partitions

Man, did you set the BIOS to read the SDA ? (in bios case: SATA 0)

Did you let the BIOS know which SATA Driver is it supposed to be read first?
In your case you should set it to start through your old driver that is SATA 0.


Archlinux x86_64 // AMD FX4100 3.60Mhz // KINGSTON DDR3 1333Mhz 4GB em SINGLE CHANNEL // Gigabyte GA-78LMT-S2P // ATI RADEON 3000//  SEAGATE ST500DM0 500GB

Offline

#3 2012-04-04 18:53:38

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Issue with grub boot partitions

Say you have drives plugged into SATA ports 0 and 1 on your mobo, and your BIOS is set to boot from SATA 1.  It is quite possible for SATA 1 to be grub drive 0 (because boot order is grub's perspective) and then be "Linux drive" /dev/sdb.  Using by-uuid or by-label in the kernel line of the grub entry should fix things:

kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/c8dc783e-8b99-4a47-95ca-2b33fff5a212 ro

Note: I use by-label, and just modified my line based on your info.  A sanity check is advised.

Simply plugging the boot disk into SATA 0 (and ensuring BIOS is set to boot from SATA 0) would probably also solve the problem, but you should get away from using sdX anyway.

Edit: Also, adding and removing devices can cause the boot order of certain BIOSes to do unexpected things.  That was probably the cause of all the problems to begin with.

Last edited by alphaniner (2012-04-04 18:57:42)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2012-04-04 19:06:35

permnoob
Member
Registered: 2012-03-04
Posts: 7

Re: Issue with grub boot partitions

the cable solution is easy, but doesn't protect me from forgetting later when I swap thigns around, and I feel its the wrong way.
...oh and i can't physically plug it in that way w/ cables I have (took magic to even test it), so yeah, there is that too.

so you can confirm sda1 and hd0,0 are NOT translations of the same designation between two systems, but rather two seperate designations assined by different systems?  That would make sense to me.

As you can see I am using uuid for now as I was warned there are some minor but unexpected issues w/ using labels in certain cases, and whilst inconvenient I don't think i will need to touch UUIDs often enough to counter the risk.

Offline

#5 2012-04-04 19:20:26

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Issue with grub boot partitions

permnoob wrote:

As you can see I am using uuid for now...

I don't know if you understood or not, I'm suggesting you use uuid in menu.lst:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/disk/by-uuid/c8dc783e-8b99-4a47-95ca-2b33fff5a212 ro vga=773
initrd /initramfs-linux.img

But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2012-04-04 22:40:56

permnoob
Member
Registered: 2012-03-04
Posts: 7

Re: Issue with grub boot partitions

sorry, I meant in fstab.  and I also noticed I used labels incorrectly in the last fstab entry, fixed that now.

I plan on using labels in boot as well, I completly understand the fix your explianed to me, THANKS!  works fine

HOWEVER, an issue I have had ever since changing things is I always get an "Invalid system disk" error, says strike any key to try and continue, and as soon as I hit a key, it continues to boot fine.  there are no disks in the drive, and no external drives.  Why would suddenly get this error?

Offline

#7 2012-04-05 13:12:09

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Issue with grub boot partitions

permnoob wrote:

"Invalid system disk" error...

That's a BIOS issue, something to do with boot order.  If you do need to modify your boot order, you may also need to modify the grub entry as well.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB