What is the Fedora 34 RAW Image. Part one

I was able to boot my Raspberry Pi using the Pi Imager and the Fedora AARCH64 Raw Image. While this makes me happy, I don’t really understand what these pieces are. So, I want to take a little more look at them.

The Fedora Raw image comes in compressed form as Fedora-Workstation-34-1.2.aarch64.raw.xz. To uncompress, I ran unxz, which uncompressed it in place. What remained was Fedora-Workstation-34-1.2.aarch64.raw

 file /home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw
/home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw: DOS/MBR boot sector; partition 1 : ID=0x6, active, start-CHS (0x4,4,1), end-CHS (0x3ff,254,2), startsector 2048, 1228800 sectors; partition 2 : ID=0x83, start-CHS (0x3ff,254,2), end-CHS (0x3ff,254,2), startsector 1230848, 2097152 sectors; partition 3 : ID=0x83, start-CHS (0x3ff,254,2), end-CHS (0x3ff,254,2), startsector 3328000, 19740672 sectors

This is a big file:

$ ls -lah  /home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw 
-rw-r--r--. 1 ayoung ayoung 11G May 21 17:37 /home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw

Since it is designed to become a block device, we can look at it with fdisk

$ fdisk -l /home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw
Disk /home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw: 11 GiB, 11811160064 bytes, 23068672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x327db5c6
 
Device                                                        Boot   Start      End  Sectors  Size Id Type
/home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw1 *       2048  1230847  1228800  600M  6 FAT16
/home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw2      1230848  3327999  2097152    1G 83 Linux
/home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw3      3328000 23068671 19740672  9.4G 83 Linux

It is designed to become three partitions. The first, the fat16, is designed to be the boot sector.

The Sector size is 512,
the off set is 2048
512 * 2048 = 1048576

So the mount command is:

sudo mount -o loop,offset=1048576 /home/ayoung/Downloads/Fedora-Workstation-34-1.2.aarch64.raw /mnt/disk/

With this partition mounted, we can see the layout of this sector:

 ls /mnt/disk/
bcm2709-rpi-2-b.dtb  bcm2710-rpi-3-b.dtb       bcm2710-rpi-cm3.dtb  bcm2711-rpi-4-b.dtb  bootcode.bin  EFI           fixup4.dat    fixup4x.dat   fixup.dat     fixup_x.dat  rpi3-u-boot.bin  start4cd.elf  start4.elf   start_cd.elf  start.elf
bcm2710-rpi-2-b.dtb  bcm2710-rpi-3-b-plus.dtb  bcm2711-rpi-400.dtb  bcm2711-rpi-cm4.dtb  config.txt    fixup4cd.dat  fixup4db.dat  fixup_cd.dat  fixup_db.dat  overlays     rpi4-u-boot.bin  start4db.elf  start4x.elf  start_db.elf  start_x.elf

Before we go into what is on this partition, I notice one thing that is not: the Linux Kernel.

find /mnt/disk/ -print | grep -i linu
[ayoung@ayoungP40 fedora]$

If it is, it has some other name.
The files on the this partition have a fairly regular set of extensions. Most files end in dbt or dbto.

file /mnt/disk/overlays/adau7002-simple.dtbo
/mnt/disk/overlays/adau7002-simple.dtbo: Device Tree Blob version 17, size=1587, boot CPU=0, string block size=299, DT structure block size=1232
$ file /mnt/disk/bcm2710-rpi-cm3.dtb
/mnt/disk/bcm2710-rpi-cm3.dtb: Device Tree Blob version 17, size=26890, boot CPU=0, string block size=2594, DT structure block size=24224

These are Device Tree Files in their binary form. So, one question i now have is “Where are the corresponding source files?” I’ll keep digging.

My eye is drawn to the EFI directory, which contains both a BOOT nd a fedora subdirectory.

$ find  EFI/ -print
EFI/
EFI/BOOT
EFI/BOOT/BOOTAA64.EFI
EFI/BOOT/fbaa64.efi
EFI/fedora
EFI/fedora/fonts
EFI/fedora/grub.cfg
EFI/fedora/grubaa64.efi
EFI/fedora/BOOTAA64.CSV
EFI/fedora/mmaa64.efi
EFI/fedora/shim.efi
EFI/fedora/shimaa64.efi
$ file   /mnt/disk/EFI/BOOT/BOOTAA64.EFI 
/mnt/disk/EFI/BOOT/BOOTAA64.EFI: MS-DOS executable PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows

DOS really made a lasting impression on the computer world.

The only other directory in here is “overalys” and that has more dtbo files.

I’m going to post this now, but I have a lot more exploring to do.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.