💾 Archived View for callistix.srht.site › projects › minimal_rpi › pages › 003_sdcardimage.gmi captured on 2024-08-25 at 00:00:34. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
First we download and install the Raspberry Pi Imager for Ubuntu [1], luckily it works with Debian without any hassle. We choose to install the `Raspberry Pi OS (other)` -> `Raspberry Pi OS Lite (64-bit)` image as it seems the most light weight. Done that, the Raspberry is booted once from the SD card to do some pre-configuration, i.e. creating a user, etc.
The partitioning that comes with the image looks like this:
Label: dos
Partition 1:
Size: 512 MB
Type: W95 FAT32 (LBA)
FS: vfat
Partition 2:
Size: remaining space
Type: Linux
FS: ext4
I've added `fstab` entries on my local PC to make it easier to mount the SD card partitions as a user:
grep sde /etc/fstab /dev/sde1 /media/sdcard0 auto noatime,nodiratime,noauto,user 0 0 /dev/sde2 /media/sdcard1 auto noatime,nodiratime,noauto,user 0 0
I'm copying an image of the SD card to my hard disk to be able to fall back to a working configuration whenever needed:
cat /dev/sde >rpi.img
We can then later mount the partitions from the image like this:
# set up loop device, the loop device number will most likely differ for you losetup --partscan --find --show rpi.img /dev/loop3 # mount partitions mount /dev/loop3p1 /media/loop0 mount /dev/loop3p2 /media/loop1 # unmount when finished umount /media/loop0 umount /media/loop1 # free up the loop device losetup -d /dev/loop3
➡ 4. EEPROM update and configuration
⬆ The minimal Raspberry 4 project
Created: 6/Jan/2024
Modified: 21/Jan/2024