Skip to contentSkip to conversation

Upcomming trouble with grub-mkrescue ISOs and libblkid

DISCUSSION Thomas Schmitt 2 participants 2 messages Dec 14, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

there is trouble at the horizon by

https://github.com/karelzak/util-linux/commit/7ef86a08914427d6486734614d7d3bbed1f108fe

which disables the recognition of ISO 9660 filesystems on the base device in favor of potential partitions which may or may not mark the range of the ISO filesystem.

This causes Fedora ISOs to fail booting from /dev/srN
https://bugzilla.redhat.com/show_bug.cgi?id=1783066
because the /dev/disk/by-label/ link is not created by udev.

The commit shall obviously heal a shortcomming of the old questionable udev rule

  # for partitions import parent information
  ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
when it meets a USB stick with an ISO on the base device and a partition
which has no own filesystem. The latter is a rare situation.

The effect on /dev/srN is obviously unintended.
To my theory, libblkid detects the partition table on the DVD and bets that the Linux kernel will create partition devices.
But with /dev/srN there will no partition devices be created.

I expect grub-mkrescue x86 ISOs to show no ISO 9660 at all, because they get a MBR partition starting at disk block 1 in the BIOS-only case, and a GPT with no ISO 9660 partition in the EFI-case.
The only way to access their ISO filesystems is via the base device.

This was a design decision by Vladimir Serbinenko about 10 years ago.

It has to be expected that payload operating systems of grub-mkrescue, which use the new blkid, will not find their origin device after start-up, similar to what happens to Fedora ISOs now.

Workarounds to let grub-mkrescue ISO 9660 filesystems show up for the new blkid could be the modifications made by
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/frontend/grub-mkrescue-sed.sh
MKRESCUE_SED_MODE "mbr_only", "mbr_hfs",
or "gpt_appended" with -partition_offset 16 will create partitions which mark the ISO 9660 filesystem. (All against Vladimir's idea of partition layout, of course.)

Best solution would be to convince util-linux to not ignore filesystems and to rather urge udev to fix its rule.
(Does anybody know why udev attributes the filesystem of the base device
to any partition which has no own filesystem ?)

Have a nice day :)

Thomas

#1 lore raw
Quoted 7 lines · Thomas Schmitt

there is trouble at the horizon by

https://github.com/karelzak/util-linux/commit/7ef86a08914427d6486734614d7d3bbed1f108fe

which disables the recognition of ISO 9660 filesystems on the base device in favor of potential partitions which may or may not mark the range of the ISO filesystem.

I'm on the util-linux mailing list and I haven't seen this reported there yet.

I would expect them to react to such rather problematic regressions if they are being reported.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913