Skip to content

Instantly share code, notes, and snippets.

@rbo
Created February 5, 2022 18:51
Show Gist options
  • Save rbo/470e6e72b1c8403a725c4de6ae11b7b7 to your computer and use it in GitHub Desktop.
Save rbo/470e6e72b1c8403a725c4de6ae11b7b7 to your computer and use it in GitHub Desktop.
Fedora IoT, NVME & Raspbarry Pi4

Install Fedora IoT

$ sudo arm-image-installer --target=rpi4 --image Downloads/Fedora-IoT-35-20220101.0.aarch64.raw.xz --addkey=$HOME/.ssh/id_ed25519.pub --media=/dev/sda --resizefs

=====================================================
= Selected Image:
= Downloads/Fedora-IoT-35-20220101.0.aarch64.raw.xz
= Selected Media : /dev/sda
= U-Boot Target : rpi4
= Root partition will be resized
= SSH Public Key /var/home/rbohne/.ssh/id_ed25519.pub will be added.
=====================================================

*****************************************************
*****************************************************
******** WARNING! ALL DATA WILL BE DESTROYED ********
*****************************************************
*****************************************************

 Type 'YES' to proceed, anything else to exit now

= Proceed? YES
= Writing:
= Downloads/Fedora-IoT-35-20220101.0.aarch64.raw.xz
= To: /dev/sda ....
3972775936 bytes (4.0 GB, 3.7 GiB) copied, 23 s, 173 MB/s
0+521688 records in
0+521688 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 27.5848 s, 156 MB/s
= Writing image complete!
= Resizing /dev/sda ....
Checking that no-one is using this disk right now ... OK

Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model:
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x92cbbbaa

Old situation:

Device     Boot   Start     End Sectors  Size Id Type
/dev/sda1  *       2048 1028095 1026048  501M  6 FAT16
/dev/sda2       1028096 3125247 2097152    1G 83 Linux
/dev/sda3       3125248 8386559 5261312  2.5G 83 Linux

/dev/sda3:
New situation:
Disklabel type: dos
Disk identifier: 0x92cbbbaa

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048   1028095   1026048   501M  6 FAT16
/dev/sda2       1028096   3125247   2097152     1G 83 Linux
/dev/sda3       3125248 976773167 973647920 464.3G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
e2fsck 1.46.3 (27-Jul-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda3: 29915/164640 files (0.9% non-contiguous), 405720/657664 blocks
resize2fs 1.46.3 (27-Jul-2021)
Resizing the filesystem on /dev/sda3 to 121705990 (4k) blocks.
The filesystem on /dev/sda3 is now 121705990 (4k) blocks long.

= Raspberry Pi 4 Uboot is already in place, no changes needed.
= Adding SSH key to authorized keys.

= Installation Complete! Insert into the rpi4 and boot.
$ sudo mount /dev/sda1 /mnt/sda1/
$ cd /mnt/sda1/
# Download from https://github.com/pftf/RPi4/releases/ - pick the latest release
# curl -L -O https://github.com/pftf/RPi4/releases/download/v1.32/RPi4_UEFI_Firmware_v1.32.zip
$ sudo unzip /home/rbohne/Downloads/RPi4_UEFI_Firmware_v1.32.zip
Archive:  /home/rbohne/Downloads/RPi4_UEFI_Firmware_v1.32.zip
  inflating: RPI_EFI.fd
replace bcm2711-rpi-4-b.dtb? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
  inflating: bcm2711-rpi-4-b.dtb
  inflating: bcm2711-rpi-400.dtb
  inflating: bcm2711-rpi-cm4.dtb
  inflating: config.txt
  inflating: fixup4.dat
  inflating: start4.elf
  inflating: overlays/miniuart-bt.dtbo
  inflating: Readme.md
   creating: firmware/
   creating: firmware/brcm/
  inflating: firmware/brcm/brcmfmac43455-sdio.txt
  inflating: firmware/brcm/brcmfmac43455-sdio.bin
  inflating: firmware/brcm/brcmfmac43455-sdio.clm_blob
  inflating: firmware/brcm/brcmfmac43455-sdio.Raspberry
  inflating: firmware/Readme.txt
  inflating: firmware/LICENCE.txt
$ cd
$ sudo umount /dev/sda1

Enable more than 3 GB of RAM

https://github.com/pftf/RPi4#initial-notice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment