Skip to content

Instantly share code, notes, and snippets.

@theironrobin
Last active June 12, 2023 22:29
Show Gist options
  • Save theironrobin/2d0a08845e3059f3fd34cbf1b8d57396 to your computer and use it in GitHub Desktop.
Save theironrobin/2d0a08845e3059f3fd34cbf1b8d57396 to your computer and use it in GitHub Desktop.
Instructions for creating a Fedora image for X13s
# do as root user
# Make a new working directory
mkdir ~/fedora-x13s
cd ~/fedora-x13s
# Download and extract Fedora Workstation For ARM® aarch64 systems, release 38
wget https://download.fedoraproject.org/pub/fedora/linux/releases/38/Workstation/aarch64/images/Fedora-Workstation-38-1.6.aarch64.raw.xz
unxz -dv Fedora-Workstation-38-1.6.aarch64.raw.xz
# mount the rootfs
mkdir fedora-root
mount -o loop,offset=1703936000 Fedora-Workstation-38-1.6.aarch64.raw fedora-root
# Copy x13s modules to Fedora image
rm -rf fedora-root/root/lib/modules/*
cp -pRv /lib/modules/6.3.5-3-x13s+ fedora-root/root/lib/modules/
# Copy x13s firmware to Fedora image
cp -pRv /lib/firmware fedora-root/root/lib
# Make initramfs (how??)
# compress the rootfs
tar -zcvf Fedora-Workstation-38-1.6-aarch64.tar.gz fedora-root/root
# Unmount the rootfs
umount fedora-root
# Make a root partition for Fedora
mkfs.ext4 /dev/nvm0n1p5
mount /dev/nvme0n1p5 /mnt
cp Fedora-Workstation-38-1.6-aarch64.tar.gz /mnt
cd /mnt
tar -zxvf Fedora-Workstation-38-1.6-aarch64.tar.gz --strip-components=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment