[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to obtain UUID of drives (squeeze udev lacks vol_id)



>>>> Recent udev packges in squeeze/sid lack vol_id command since 22 Aug 2009
>>>> (146-1).  What is the best way to obtain UUID of partition?
>>>> I could read it like ...
>>>> $ ls -l /dev/disk/by-uuid|grep sda4
>>>> Is this the best way?  Any thoughts ?

>>> blkid

>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565124
>> man -k uuid
>> will *not* find the blkid man page )-:.

>> Also, how does one set the UUID of a currently in use swap partition (such
>> as one created before the mkswap command added a UUID by default) *without*
>> re-running mkswap?

> *You* should not need to set the UUID.  It should just magically be there.
> $ /sbin/blkid -t TYPE=swap
> /dev/sdb1: TYPE="swap" LABEL="swap1" \
> UUID="c69f59ff-b928-4232-b44c-8da0f12c52db"

You can cnahe the UUID of any ext partition with
tune2fs -U <uuid> /dev/...
but you then have to edit the fstab(s) that mount that partition with
a UUID and the menu.lst/grub.cfg that refers to that partition with a
UUID.


Reply to: