blu.org  wiki

Identifying Volumes: /dev/sdxn vs. UUID

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

Identifying Volumes: /dev/sdxn vs. UUID

by Kent Borg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A while back I noticed that these days Linux (or at least Ubuntu) likes
to find volumes by UUID instead of what /dev file it falls under.  A
UUID is not very memorable, so I have been known to edit fstab and
menu.lst to use the traditional naming.

But I am now a fan.  The cause is my external disk again.

I had Ubuntu install on my external disk.  Mostly to get grub set up
right and prove to myself that it was possible.  Then I copied my entire
/ partition from the internal to the external disk.  Oh, I went back and
put the correct UUIDs in fstab to find the new /home and /boot
partitions on the external disk.  I also edited menu.lst UUIDs to point
to the correct external / partition.

It works!

On my W2 (in testing before sending it off) the external USB disk
appears as /dev/sda, but on the other machines I have booted with this
disk the external disk is /dev/sdb.  By using UUIDs I can find the
partitions no matter what traditional name they land under.

Yes, I have to use (hd0,1) or (hd1,1) in menu.lst for grub to find the
kernel in the two cases, but after that it finds everything.

So if any ornery old cusses out there hate this new fangled UUID thing,
you might reconsider...


-kb, the Kent who tries to keep his ornery old cussedness under control.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Identifying Volumes: /dev/sdxn vs. UUID

by Jarod Wilson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2008-07-02 at 10:14 -0400, Kent Borg wrote:

> A while back I noticed that these days Linux (or at least Ubuntu) likes
> to find volumes by UUID instead of what /dev file it falls under.  A
> UUID is not very memorable, so I have been known to edit fstab and
> menu.lst to use the traditional naming.
>
> But I am now a fan.  The cause is my external disk again.
>
> I had Ubuntu install on my external disk.  Mostly to get grub set up
> right and prove to myself that it was possible.  Then I copied my entire
> / partition from the internal to the external disk.  Oh, I went back and
> put the correct UUIDs in fstab to find the new /home and /boot
> partitions on the external disk.  I also edited menu.lst UUIDs to point
> to the correct external / partition.
>
> It works!
>
> On my W2 (in testing before sending it off) the external USB disk
> appears as /dev/sda, but on the other machines I have booted with this
> disk the external disk is /dev/sdb.  By using UUIDs I can find the
> partitions no matter what traditional name they land under.
>
> Yes, I have to use (hd0,1) or (hd1,1) in menu.lst for grub to find the
> kernel in the two cases, but after that it finds everything.
>
> So if any ornery old cusses out there hate this new fangled UUID thing,
> you might reconsider...

What if you're not quite an ornery old cuss, but still dislike UUID? :)

(at least, I'm assuming 30 isn't ornery old cuss territory yet...)

I completely and totally understand the reason for using UUID, and I'm
generally for it for most people (Fedora uses 'em by default now too).
And mounting via /dev entry is also stupid. Fedora hasn't done that for
several years now -- before UUID it was 'mount by label'. Mount by label
is my preferred method to mount stuff -- yes, you can still have name
collisions (consider someone mounting the system drive from one machine
into another machine, where they have similar partitions and labels,
which is why Fedora switched to UUID), but if you know what you're doing
and you want something you can actually remember, labels work rather
nicely.


--
Jarod Wilson
jarod@...


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Identifying Volumes: /dev/sdxn vs. UUID

by Kent Borg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jarod Wilson wrote:
> Mount by label is my preferred method to mount stuff

I didn't know that was possible.  Cool!  Can grub find the kernel that
way too?


-kb, the Kent who wishes gnome were better at letting him manipulate labels.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Identifying Volumes: /dev/sdxn vs. UUID

by Jarod Wilson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2008-07-02 at 11:09 -0400, Kent Borg wrote:
> Jarod Wilson wrote:
> > Mount by label is my preferred method to mount stuff
>
> I didn't know that was possible.  Cool!  Can grub find the kernel that
> way too?

Yep. Typical default used to be 'root=LABEL=/'. Since my laptop actually
has 3 different installs on it, I have one set of entries with
'root=LABEL=fedora', one set with 'root=LABEL=rhel5' and one with
'root=LABEL=rawhide'.

Example stanza:

title Fedora (2.6.25.9-76.fc9.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.25.9-76.fc9.x86_64 ro root=LABEL=fedora
        initrd /initrd-2.6.25.9-76.fc9.x86_64.img



--
Jarod Wilson
jarod@...


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: Identifying Volumes: /dev/sdxn vs. UUID

by Kent Borg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jarod Wilson wrote:
> Yep. Typical default used to be 'root=LABEL=/'.

Very cool.  Thanks.

-kb

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss
LightInTheBox - Buy quality products at wholesale price