Skip to content
  • Mike Fleetwood's avatar
    Stop clearing FAT16/32 label when setting a new UUID (!104) · b7ef1688
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    Now fix the error with GParted clearing the label when setting a new
    UUID on a FAT16/32 file system.  Reproduce the issue on the command
    line:
        # mkfs.fat -F 16 -v -I -n TEST_LABEL /dev/sdb1
        # mdir -f -i /dev/sdb1 ::/
         Volume in drive : is TEST_LABEL
         Volume Serial Number is 5D4C-6E6E
        ...
        # mlabel -n -i /dev/sdb1 ::
        # mdir -f -i /dev/sdb1 ::/
         Volume in drive : has no label
         Volume Serial Number is 77BB-A883
        ...
    
    This was broken by commit "Fix writing FAT16/32 FS UUID on Alpine Linux
    (!104)" earlier in this patchset, which included this comment:
        "...  Also drop the '-s' option
        as showing the current label is unrelated to writing a new UUID."
    
    It is not mentioned in the mlabel[1] manual page that option -s is
    needed in order to avoid clearing the label when assigning a new UUID.
    Anyway add the option back.
    
    [1] mlabel(1)
        https://linux.die.net/man/1/mlabel
        "s     Shows the existing label, without prompting the user.
        n      Assigns a new (random) serial number to the disk
        "
    
    Closes !104 - Add Alpine Linux CI jobs and resolve label and UUID issues
                  with FAT16/32
    b7ef1688