tune2fs

I use this command to change the UUID of a volume to a defined value, so I can easily mount external drives.

UUID can be something like: 77777777-3333-3333-3333-bbbbbbbbbbbb

blkid | grep UUID

umount /dev/sdb1

tune2fs -U "{UUID}"  /dev/sdb1

From the tune2fs man pages:

-U UUID
  Set  the  universally unique identifier (UUID) of the filesystem
  to UUID.  The format of the UUID is a series of hex digits sepa-
  rated          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.

linux command disks

Back