SlugOS 5.3, Memstick & HDD -- device name confusion (sda / sdb)

View: New views
4 Messages — Rating Filter:   Alert me  

SlugOS 5.3, Memstick & HDD -- device name confusion (sda / sdb)

by Jan-116 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello group!

I finally got around to trying SlugOS 5.3 on a new NSLU2 I bought off craigslist (didn't want to tamper with my existing SlugOS 3.10 NSLU2). So far so good, installation was a breeze, followed the tutorial on nslu2-linux.org and most everything seems to work well. I set it up to boot off a 4GB memory stick, which was initially recognized as /dev/sda. But when I plugged in an external hard drive, the device naming changed, and the HDD is now /dev/sda, while the memstick now is /dev/sdb. I am not really surprised by that, as I know that the storage device naming is non-deterministic on the NSLU2. Despite this effect, the slug has no problem booting off the memstick, and even though my fstab indicates that the root file system should be mounted as /dev/sda1 (which is now the HDD), it actually miraculously mounts /dev/sdb1 now (which is the new name of the memstick).

I guess this is good, but I'd like to know if there are any caveats I should know about. Should I change the fstab to reflect the new device name, or should I leave it as is, in case I ever decide to remove the HDD, to make sure it still continues to boot correctly of /dev/sda1 then.

Any opinions appreciated.

Jan


Re: SlugOS 5.3, Memstick & HDD -- device name confusion (sda / sdb)

by Mike Westerhof (mwester) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

obi_jan wrote:

> ...even though my fstab indicates that the root file system > should be mounted as /dev/sda1 (which is now the HDD), it
> actually miraculously mounts /dev/sdb1 now (which is the new name
> of the memstick).

Isn't it nice when things "just work"?  :-)  SlugOS does not store the
/dev/sd* device name for use during the boot process.  What really
happens when you do "turnup /dev/sda1" is that the turnup utility looks
up the UUID for that partition, and sets up the boot process to use that
UUID.  This avoids any problems caused by the device names moving about
for USB devices.

> I guess this is good, but I'd like to know if there are any caveats I
> should know about. Should I change the fstab to reflect the new device
> name, or should I leave it as is, in case I ever decide to remove
> the HDD, to make sure it still continues to boot correctly of
> /dev/sda1 then.

The /dev/sda1 noted in the fstab is not used by SlugOS, so you can just
leave it as-is.  (We should replace that with a UUID reference some day,
just to avoid confusing humans, though.)

The only thing you should know is that if you add any other disks, you
should:

a) blacklist them in the udev blacklist file (somewhere down below /etc).

b) add the other partitions using the UUID syntax to the fstab, which
will ensure that you avoid problems if that other device ever changes
its /dev/sd* identity.

Mike (mwester)

Re: SlugOS 5.3, Memstick & HDD -- device name confusion (sda / sdb)

by Jan-116 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Mike -- this is brilliant, true plug & play so to speak :)

There's another question I have on SlugOS 5.3, but I'll create a new post as it's for a different subject.

Thanks!
Jan

--- In nslu2-linux@..., "Mike Westerhof (mwester)" <mwester@...> wrote:
> Isn't it nice when things "just work"?  :-)  SlugOS does not store the
> /dev/sd* device name for use during the boot process.  What really
> happens when you do "turnup /dev/sda1" is that the turnup utility looks
> up the UUID for that partition, and sets up the boot process to use that
> UUID.  This avoids any problems caused by the device names moving about
> for USB devices.




Re: SlugOS 5.3, Memstick & HDD -- device name confusion (sda / sdb)

by Charles Lindsey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- In nslu2-linux@..., "Mike Westerhof (mwester)" <mwester@...> wrote:


> The /dev/sda1 noted in the fstab is not used by SlugOS, so you can just
> leave it as-is.  (We should replace that with a UUID reference some day,
> just to avoid confusing humans, though.)

OK, so it should be possible to mount the stick by uuid rather than knowing which /dev/sd[ab] is is on this week. It that correct? Presumably udev could be hacked thataway.

However, that might be difficult when NFS mounting from some other system. For example, my Solaris system doesn't seem to know about mounting things given their uuid, either locally or remotely.

So suggestions about  overcoming that? Currently, my [v[fstab entry 'guesses' at remote:/media/sda1. Which works fine so long as the guess it correct, but involves manual fiddling when it isn't :-( .