You are not logged in.

#1 2010-03-06 15:38:02

r_j_h
Member
From: Bletchley, UK
Registered: 2010-03-06
Posts: 19

Drives swapping [solved]

I have been running arch completely reliably on my desktop for about 18months. It's a superb distro - well done - this is what slackware should have been!

The existing hard drive (SATA) is partitioned:

sda1 ntfs/xp
sda2 swap
sda3 ext3/xarch

and all was working well...

I recently added space by dropping a spare IDE drive in - with one big ntfs partition. Now the drive order at boot seems random:

Grub ALWAYS sees: hd(0,0), (hd0,1), (hd0,2) and (hd1,0), so I can boot the kernel from (hd0,2) as normal. The problem comes with the kernel line, sometimes the line

kernel /boot/vmlinuz26 root=/dev/sda3

will boot and sometimes it will hang with a 'waiting 10 secs for sda3' error. In these cases the kernel is seeing the drives swapped - so it actually wanted a root partition in /dev/sdb3.

The workaround I have in place at the moment is to have two grub entries, one with

root=/dev/sda3

and the other

root=/dev/sdb3

. Whichever one I choose has a 50% chance of being correct so I can usually boot within 2 or 3 tries. But this is a workaround rather than a solution.

I have searched the forums and wiki but could not find anything relevant. Surely there must be something that I am overlooking? What could be causing this and how could I solve the problem?

Thanks in advance, Richard.

Last edited by r_j_h (2010-03-06 20:42:39)

Offline

#2 2010-03-06 18:30:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Drives swapping [solved]

You should name the drives by UUID:

Arch Wiki wrote:

If your machine has more than one SATA, SCSI or IDE disk controller, the order in which their corresponding device nodes are added is random. This may result in device names like /dev/sdX and /dev/sdY switching around randomly on each boot, culminating in an unbootable system or kernel panic. Persistent naming solves these issues.

http://wiki.archlinux.org/index.php/UUID#by-uuid


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2010-03-06 19:20:56

r_j_h
Member
From: Bletchley, UK
Registered: 2010-03-06
Posts: 19

Re: Drives swapping [solved]

Thanks - I'm using UUIDS in fstab but  was not aware that it could also be used that early in the boot process. I'll play with that later and mark as solved if I get it working.

R.

Offline

#4 2010-03-06 19:24:53

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: Drives swapping [solved]

I like labels better (http://wiki.archlinux.org/index.php/Per … g#by-label); "root" and "home" are more descriptive than "61fe7c7d-e76e-429d-8e5b-46a132a3012d" I find.

Offline

#5 2010-03-06 20:40:32

r_j_h
Member
From: Bletchley, UK
Registered: 2010-03-06
Posts: 19

Re: Drives swapping [solved]

Worked like a charm - although I did decide to use labels instead.

Thanks.

smile

Offline

Board footer

Powered by FluxBB