LiNomad USB flash

Foreword

This method of transferring ISO data to USB media is more complicated than dd, but allows for persistent storage of user data.

The provided ISO is generated by Live-System. This is reflected in the partitioning scheme and other commands.

First installation on USB media

  1. Become root and select the USB install media - replace /dev/sdx with your real USB device name - see dmesg output if unsure; beware of data loss (device will be wiped):
sudo su
installdevice=/dev/sdx
  1. Partition the USB media - using 4 GiB for the live system and the rest is for user data (/home):
sgdisk -Z $installdevice
sgdisk -o -n 1:0:+4096M -t 1:0700  -n 2:0:0 $installdevice
partprobe $installdevice
  1. Format the USB media - LiveSystem and LiveData labels are hardcoded in the provided ISO:
mkfs.vfat -n LiveSystem $installdevice"1"
mkfs.ext4 -F -L LiveData -O ^has_journal $installdevice"2"
  1. Access ISO content:
mount --mkdir -o loop arch-xfce-*.iso /mnt/iso   #or arch-hyprland-*.iso
  1. Copy live-system files to USB media system (first) partition:
mount --mkdir $installdevice"1" /mnt/live
cp -r /mnt/iso/{efi,linomad} /mnt/live/
umount /mnt/live; rmdir /mnt/live
  1. Initialize user folder by copying the linomad user profile to USB media data (second) partition:
mount --mkdir -o loop /mnt/iso/linomad/modules/0-main /mnt/sys
mount --mkdir $installdevice"2" /mnt/data
cp -r /mnt/sys/home/linomad /mnt/data/
umount /mnt/{sys,data}; rmdir /mnt/{sys,data}
  1. Umount ISO:
umount /mnt/iso; rmdir /mnt/iso

USB media system update

To update the live system, just do steps 1, 4, 5 and 7. Do not partition nor format your USB media and keep your user files.