I want to install Parabola on one of my machines, so I downloaded the .iso, checked the signature and hash, and then flashed the image to a USB thumb drive like so:
dd if=parabola-dual-openrc-cli-2020.01.18-netinstall.iso of=/dev/sde oflag=direct bs=1M status=progress
This seems to work as intended, as I can now boot from this drive, but I discovered something odd. fdisk reports two partitions on the drive now, the first is apparently of an unknown type, and the second one is nested inside it:
$ fdisk -l /dev/sde | grep -i dev
Disk /dev/sde: 7,5 GiB, 8086618112 bytes, 15794176 sectors
Device Boot Start End Sectors Size Id Type
/dev/sde1 * 0 1796095 1796096 877M 0 Empty
/dev/sde2 172 131243 131072 64M ef EFI (FAT-12/16/32)
parted doesn't even "see" sde1, it only shows the second partition.
$ parted /dev/sde -s print | tail -n +7
Number Start End Size Type File system Flags
2 88,1kB 67,2MB 67,1MB primary fat16 esp
GParted goes a step further and only shows the block device as one whole partition of type iso9660.
Now this makes a bit of sense, ISO9960 is apparently the standard defining how data is layed out on optical disks, so when writing an iso-image to a drive 1:1, this seems like a plausible result.
I can indeed mount both of those drives and see all their contents. Only sde1 is mounted read-only, even though optical discs would normally always be read-only.
$ cd /mnt; sudo mkdir new; sudo mkdir new2
$ sudo mount /dev/sde1 new
mount: /mnt/new: WARNING: device write-protected, mounted read-only.
$ sudo mount /dev/sde2 new2
It also seems like most files on sde2 - which only has the directory EFI on it - are also on sde1 in the same location:
$ paste <(tree /mnt/new2/EFI) <(tree /mnt/new/EFI) | column -s $'\t' -t
/mnt/new2/EFI /mnt/new/EFI
├── boot ├── boot
│ ├── bootx64.efi │ ├── bootx64.efi
│ ├── entries │ ├── entries
│ │ ├── parabolaiso-x86_64.conf │ │ ├── parabolaiso-x86_64.conf
│ │ └── uefi-shell-x86_64.conf │ │ └── uefi-shell-x86_64.conf
│ ├── HashTool.efi │ ├── HashTool.efi
│ ├── loader.efi │ ├── loader.efi
│ └── refind.conf │ └── refind.conf
├── parabolaiso ├── parabolaiso
│ ├── parabolaiso.img │ └── efiboot.img
│ └── vmlinuz.efi ├── shellx64_v1.efi
├── shellx64_v1.efi └── shellx64_v2.efi
└── shellx64_v2.efi 3 directories, 9 files
3 directories, 10 files
Going deeper, as these partitions are mounted now, I had a look what options were detected for them:
$ cat /proc/mounts | grep /dev/sde
/dev/sde1 /mnt/new iso9660 ro,relatime,nojoliet,check=s,map=n,blocksize=2048 0 0
/dev/sde2 /mnt/new2 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
So sde2 is not just some FAT that seems to be specifically optimised for EFI, but it also has the VFAT extension to allow for longer file names.
What the hell is going on here? Is this how burned iso-images always look, or is Parabola doing something weird and special here?
Is this maybe related to this image being bootable on both i686 and x86_64 architectures?
