On 2024-01-29 20:27:13+0000, Thorsten Glaser wrote: > Thomas Weißschuh dixit: > > > The device contains 'iso9660' signature and it will be removed by a > > write command. See fdisk(8) man page and --wipe option for more > > details. > > >I guess your version does the same, but maybe is not printing the > >warning. > > Hm, maybe it does, maybe it doesn’t, but even so, why should it? In the message you may or may not have seen there is a reference to the `--wipe` option that describes the reasoning and possibilities. Reproduced here for your convenience: https://manpages.debian.org/bookworm/fdisk/fdisk.8.en.html -w, --wipe when Wipe filesystem, RAID and partition-table signatures from the device, in order to avoid possible collisions. The argument when can be auto, never or always. When this option is not given, the default is auto, in which case signatures are wiped only when in interactive mode. In all cases detected signatures are reported by warning messages before a new partition table is created. See also wipefs(8) command. As for why: "in order to avoid possible collisions". > >So the disk gets converted to a normal MBR layout and the ISO signature > >get wiped. Which makes sense as the ISO image would need to be > >remastered. > > Totally not! First of, the ISO already contained an MBR with a > partition table in the first sector, which I extended, and second, > it’s fdisk’s task to precisely edit the MBR partition table (and, > if the 55h AAh magic is missing, create it), nothing else (okay, > extended partitions if someone uses them, but nothing else). This is your personal interpretation about what exactly fdisk is supposed to do. For convenience it even may have shown a prominent warning in bright red letters with helpful pointers. Or maybe it didn't. > >> Is there a way we can make it not corrupt such media? > > > >Did you look into grml2usb? > > I know that, but I wanted to keep the original ISO 9660 filesystem > so things don’t accidentally get changed on it. (And the original > EFI thingy, in case it’s needed.) Fair enough. > So, how do I get fdisk to not corrupt the ISO 9660 part? > MirBSD fdisk doesn’t do that, it sticks to the MBR. Try `--wipe never` as explained above. Thomas