Skip to content

Instantly share code, notes, and snippets.

@pmartycz
Last active December 20, 2019 18:51
Show Gist options
  • Save pmartycz/8e3879e79a0f1d01e536f97e7248c78b to your computer and use it in GitHub Desktop.
Save pmartycz/8e3879e79a0f1d01e536f97e7248c78b to your computer and use it in GitHub Desktop.
Making Ubuntu Live USB persistent
sudo -i
mount -o remount,rw /cdrom
truncate -s $((4*2**30-1)) /cdrom/casper-rw
mkfs.ext4 -L casper-rw -O ^has_journal /cdrom/casper-rw
sed -i '/casper\/vmlinuz/ s/ ---/ persistent\0/' /cdrom/boot/grub/grub.cfg
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment