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

Re: A Grub Boot Question about initrd



On Sun 06 Jun 2021 at 14:14:38 (+0300), Andrei POPESCU wrote:
> On Sb, 05 iun 21, 12:46:13, Martin McCormick wrote:
> > 
> > 	One should be able to write a program to get the
> > appropriate UUID's out of fstab on the working system
> > and translate them in to corresponding UUID's for the system on
> > the operating table.
> 
> Alternatively you might want to consider using standardized labels on 
> all your system, e.g. 'rootfs' is always the root partition, etc.

When you plug in another potential system disk, you now have two
partitions with LABEL=rootfs, which I would find even more confusing.
But then, I'm someone who believes in tying the label physically
written on the disk (eg magic marker) with the partition LABELs on
that disk.

> If all your devices have GPT partition tables you could also use 
> partition labels instead, as they will survive a re-format of the file 
> system.

Since their invention, I personally use PARTLABELs to tie together
the LABELs and the partitions' intended use. They can be quite long,
but for me, something like Toto-Home suffices, where toto is the disk
and /home is the use.

Again personally, I avoid using 16-byte UUIDs altogether, so any
grub-mkconfig is followed by my postprocessing to convert them all
to LABELs, thereby making grub.cfg comprehensible for humans.
(Wouldn't GRUB_ENABLE_LABEL be nice.)

The only UUIDs in my fstab are the FAT ones (which I set manually on
USB/SD devices if I'm doing the formatting) and any NTFS ones I'm
forced to use. And the only devices are /dev/sr0 and /dev/mmcblk0p1
as appropriate.

Cheers,
David.


Reply to: