tech-install archive

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

Re: [Feature Request] UUID in fstab.




30.03.2018, 15:27, "S.P.Zeidler" <spz%netbsd.org@localhost>:
> Hello Utkarsh,
>
> Thus wrote Utkarsh Anand (utkarsh009%yandex.com@localhost):
>
>>  As, I already mentioned, those are to be added while installation just
>>  like linux does. That's what I'm asking for. When /etc/fstab is
>>  generated at the end of installation, instead of putting in, say,
>>  /dev/wd0a, put the UUID (automatically, by default, just like linux).
>>  As for the specifics of how to accomplish this, or the problems that we
>>  might encounter, as I said, I still haven't looked into it, although, it
>>  appears to be fairly simple.
>
> I pointed out what a PITA UUIDs instead of human readable name labels
> are on Linux.
>
> While this is tech-install, for most systems there is a purpose after
> installation, and that purpose may entail changes.
>
> We should not set up any element of the OS such that the only sane method,
> when you need to do a trivial change like add a partition, is to reinstall
> it from scratch.
>
> regards,
>         spz

You can use anything you like while making manual entries in /etc/fstab.
For specifying UUID, you need to make an entry like:
UUID=xxxxxxx    /         ext4        rw          0 1
You can always use /dev/sdX instead of UUID=xxxxxx.
Also, I just checked that the UUID for external/new devices don't change
even upon multiple reboots.
Here's an output of blkid:
/dev/sda1: UUID="6C94D94594D91286" TYPE="ntfs" PARTUUID="743ab083-01"
/dev/sda2: UUID="5CEAE2B8EAE28E18" TYPE="ntfs" PARTUUID="743ab083-02"
/dev/sda3: UUID="ad07fa5f-1572-4b82-b88f-70a6eacebdca" TYPE="ext4" PARTUUID="743ab083-03"
/dev/sdb1: LABEL="New Volume" UUID="94907F19907F0152" TYPE="ntfs" PARTUUID="174de9e1-01"
/dev/sdb2: UUID="4fa7a5d1-0670-4c56-90d2-c4c41139194b" TYPE="ext4" PARTUUID="174de9e1-02"
/dev/sdc1: LABEL="Seagate BUP" UUID="5A81-3203" TYPE="exfat" PARTUUID="5fd41ce2-01"

Here /dev/sdc is an external hard disk. Even on multiple reboots or 
changing the order of adding external drives, its UUID doesn't change. 
Here's what happened when I added it after another drive:
/dev/sda1: UUID="6C94D94594D91286" TYPE="ntfs" PARTUUID="743ab083-01"
/dev/sda2: UUID="5CEAE2B8EAE28E18" TYPE="ntfs" PARTUUID="743ab083-02"
/dev/sda3: UUID="ad07fa5f-1572-4b82-b88f-70a6eacebdca" TYPE="ext4" PARTUUID="743ab083-03"
/dev/sdb1: LABEL="New Volume" UUID="94907F19907F0152" TYPE="ntfs" PARTUUID="174de9e1-01"
/dev/sdb2: UUID="4fa7a5d1-0670-4c56-90d2-c4c41139194b" TYPE="ext4" PARTUUID="174de9e1-02"
/dev/sdc1: UUID="408E-FDEE" TYPE="vfat" PARTUUID="6ee92bf8-01"
/dev/sdd1: LABEL="Seagate BUP" UUID="5A81-3203" TYPE="exfat" PARTUUID="5fd41ce2-01"

As you can see, the device changed to /dev/sdd but UUID stayed the same.


Home | Main Index | Thread Index | Old Index