How to make a UUID for a new hard drive

Steven Yap syap at shaw.ca
Mon Apr 23 01:07:52 UTC 2007


On Mon, 2007-23-04 at 09:46 +0900, Craig Hagerman wrote:
> 
> A bit more searching lead me to the tune2fs command. This gives a lot
> of information, but doesn't SET the UUID. This is an bit of what it
> gives in my case

It does! Use the -U option:

       -U UUID
              Set the universally unique identifier  (UUID)  of
              the  filesystem  to UUID.  The format of the UUID
              is a series of hex digits separated  by  hyphens,
              like                                        this:
              "c1b9d5a2-f162-11cf-9ece-0020afc76f16".  The UUID
              parameter may also be one of the following:

                   clear  clear the filesystem UUID

                   random generate   a  new  randomly-generated
                          UUID

                   time   generate a new time-based UUID

              The UUID may be used by  mount(8),  fsck(8),  and
              /etc/fstab(5) (and possibly others) by specifying
              UUID=uuid instead of a block special device  name
              like /dev/hda1.

              See uuidgen(8) for more information.  If the sys‐
              tem does not have a good random number  generator
              such as /dev/random or /dev/urandom, tune2fs will
              automatically use a time-based UUID instead of  a
              randomly-generated UUID.








More information about the ubuntu-users mailing list