Adding Persistent Storage to Live-Boot Images
Hardware Configuration
- Memory: Assigned as needed
- Hard Disk: Add an extra hard disk to the live-boot VM, sized as needd
- CD / DVD: Live Boot
.isofile - NIC: Select desired network / VLAN
Boot Order
.isofile- Hard disk
- NIC
- Etc.
Procedure
Partition and Format Disk
Assumes disk is mapped to /dev/sda
- Log into live-boot session
- Run
lsblkto find dev mapping of disk (e.g./dev/sda) - Run
sudo fdisk /dev/sdato partition the disk- Press
n>p> enter > enter > enter >wto create the primary partition
- Press
- Run
sudo mkfs.ext4 -L persistence /dev/sda1to format asext4and assign the label "persistence" - Finally, make the storage congruent with the live-boot overlay
sudo mount /dev/sda1 /mnt
echo "/ union" | sudo tee /mnt/persistence.conf
sudo umount /mnt
sudo poweroff
Edit Grub
- Power on the VM and boot from
.isoimage - Select the LIVE environment and press the TAB key to edit Grub
- Edit so that
quietreadspersistence quiet - Press Enter to boot into live session