[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub-mkrescue: The blkid LABELs of its ISO 9660, HFS+, FAT filesyste
From: |
Daniel Kiper |
Subject: |
Re: grub-mkrescue: The blkid LABELs of its ISO 9660, HFS+, FAT filesystems |
Date: |
Fri, 17 Jan 2020 14:25:47 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Hi,
CC-ing Vladimir...
On Wed, Dec 18, 2019 at 07:24:45PM +0100, Thomas Schmitt wrote:
> Hi,
>
> during tests about the changes in blkid which are still discussed in
> https://github.com/karelzak/util-linux/pull/913
> i noted that a grub-mkrescue ISO for x86 BIOS and EFI shows the same
> filesystem label with its ISO 9660 and HFS+ filesystem superblocks.
>
> # lsblk -o NAME,FSTYPE,LABEL /dev/sdd
> NAME FSTYPE LABEL
> sdd iso9660 ISOIMAGE
> ├─sdd1
> ├─sdd2 vfat
> ├─sdd3 hfsplus ISOIMAGE
> └─sdd4
>
> On Linux this causes a name collision when udev creates /dev/disk/by-label
> links. Usually HFS+ wins. But that's not guaranteed.
>
> The label identity is currently hardcoded in libisofs. The code stems from
> Vladimir Serbinenko. I am in charge of maintaining it, though.
> See
> https://sources.debian.org/src/libisofs/1.5.2-1/libisofs/hfsplus.c/#L1632
>
> ret = set_hfsplus_name (target, target->image->volume_id,
> &target->hfsp_leafs[target->hfsp_curleaf]);
>
> It looks like the Volume Id from the libisofs ISO 9660 model is set as
> name of HFS+ node target->hfsp_leafs[0]. I guess this is the root node.
>
> Whatever, it is the only occurence of volume_id in Vladimir's code.
> Thus this line must be the gateway of "LABEL" between libisofs settings
> and HFS+ metadata production. ("ISOIMAGE" is the default Volume Id of
> xorriso.)
>
> --------------------------------------------------------------------------
>
> So what to do ?
>
> [ ] Leave both labels identical and continue to confuse users via udev.
It does not seem like reasonable idea.
> [ ] Change HFS+ LABEL automatically by adding "_HFSPLUS" to the upto 32
> characters of Volume Id.
Where this automatic change should happen? grub-mkrescue or libisofs?
> [ ] Have independent setting and default of HFS+ LABEL in libisofs.
> This is most flexible but also creates new duties for the users of
> grub-mkrescue, if both LABELs have to be unique in comparison to other
> filesystems on other devices.
What kind of duties do you think about?
> I would vote for the middle alternative, if i had any experience with HFS+
> beyond hosting Vladimir's code in libisofs.
>
> Vladimir ? Anybody else with HFS+ experience ?
>
> --------------------------------------------------------------------------
>
> Further:
>
> Should grub-mkrescue give the EFI FAT filesystem a LABEL, too ?
>
> man mformat says about option -v
> v Specifies the volume label. A volume label identifies the disk
> and can be a maximum of 11 characters. If you omit the -v
> switch, mformat will assign no label to the disk.
>
> "GRUBMKR_EFI" ?
>
> On the other hand, no LABEL means no label problems.
I do not see any reason to have labels for EFI FAT filesystem. Do you?
Daniel
- Re: grub-mkrescue: The blkid LABELs of its ISO 9660, HFS+, FAT filesystems,
Daniel Kiper <=