Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #54381

Re: mounting disks by label instead of UUID

From "J.O. Aho" <user@example.net>
Newsgroups alt.os.linux
Subject Re: mounting disks by label instead of UUID
Date 2019-03-11 22:12 +0100
Message-ID <geo19aF4ipcU1@mid.individual.net> (permalink)
References <d3e5603c-4550-4b5b-917c-544cc006efce@googlegroups.com> <gehlteFmto9U1@mid.individual.net> <q66hni$194l$1@saria.nerim.net>

Show all headers | View raw


On 3/11/19 9:50 PM, Pascal Hambourg wrote:
> Le 09/03/2019 à 12:21, J.O. Aho a écrit :
>>
>> So why not change the UUID on the clone?
> 
> Because this is not always possible or easy.
> 
>> After you cloned the partition just run
>>
>> tune2fs /dev/sdYX -U random
> 
> How do you do with a FAT or btrfs filesystem ?

btrfs: btrfstune -u /dev/sdYX

but on the other hand, btrfs has an excellent way to sync data to 
another device, so you rarely would need to regenerate the UUID.

vfat is a bit more complicated, but still possible to change the serial 
number:

UUID="1234-ABCD"
printf "\x${UUID:7:2}\x${UUID:5:2}\x${UUID:2:2}\x${UUID:0:2}" \
| dd bs=1 seek=67 count=4 conv=notrunc of=/dev/sdYX


> The only available option is GRUB_DISABLE_LINUX_UUID which allows to 
> disable use of UUIDs and use device names instead in the root= kernel 
> command line parameter only. There is no option to tell grub-mkconfig to 
> use labels instead of UUIDs.

As far as I can remember, grub2 do generate the UUID based on the root 
partition in fstab, so in normal cases no issue.

if need to use labels by default, then edit your grub-mkconfig_lib and 
change the --target=fs_uuid to --target=fs_label and next time you 
generate the new configuration you should have the label instead.

-- 

  //Aho

Back to alt.os.linux | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

mounting disks by label instead of UUID conrrrod@gmail.com - 2019-03-09 00:31 -0800
  Re: mounting disks by label instead of UUID Bit Twister <BitTwister@mouse-potato.com> - 2019-03-09 03:43 -0600
    Re: mounting disks by label instead of UUID Chris Elvidge <chris@mshome.net> - 2019-03-09 10:20 +0000
      Re: mounting disks by label instead of UUID Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-11 21:40 +0100
        Re: mounting disks by label instead of UUID "Carlos E.R." <robin_listas@es.invalid> - 2019-03-11 22:02 +0100
          Re: mounting disks by label instead of UUID Jasen Betts <jasen@xnet.co.nz> - 2019-03-12 08:14 +0000
        Re: mounting disks by label instead of UUID "J.O. Aho" <user@example.net> - 2019-03-11 22:17 +0100
          Re: mounting disks by label instead of UUID Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-11 22:39 +0100
            Re: mounting disks by label instead of UUID "J.O. Aho" <user@example.net> - 2019-03-11 23:26 +0100
        Re: mounting disks by label instead of UUID "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2019-03-11 18:45 -0400
  Re: mounting disks by label instead of UUID "J.O. Aho" <user@example.net> - 2019-03-09 12:21 +0100
    Re: mounting disks by label instead of UUID Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-03-11 21:50 +0100
      Re: mounting disks by label instead of UUID "J.O. Aho" <user@example.net> - 2019-03-11 22:12 +0100
        Re: mounting disks by label instead of UUID Eric Pozharski <whynot@pozharski.name> - 2019-03-12 13:30 +0200
  Re: mounting disks by label instead of UUID "Carlos E.R." <robin_listas@es.invalid> - 2019-03-09 13:11 +0100

csiph-web