1.8 KiB
How to set up persistent storage on systemrescue
The instructions on the official documentation are, in my oppinion, incomplete, so here you'll find how to correctly set up persistent storage
Partitioning
Persistent storage requires an ext4, xfs or btrfs partition to write to, but the normal installation method does not provide this automatically, manual input is required
You must first use fdisk or any other disk partition tool to shrink the vfat partition to make space for the ext4/xfs/btrfs partition
Here's how to do it with fdisk:
- run
fdisk /dev/sdX
where X is the disk where systemrescue is installed at - delete the main partition with
d
- create a new partition with
n
, make it primary withp
, number 1 with1
, leave the starting sector as-is and give it at least+2G
end sector, make sure you don't remove the vfat signature when offered - change the partition type to "W95 vfat (LBA)" with
t
and then0c
- make this shrinked partition bootable with
a
- create another new partition with
n
, make it primary withp
, number 2 with2
and leave the start and end sectors as offered to make it take up the rest of the drive - write these changes with
w
Setting up the filesystem
run mkfs.ext4 /dev/sdX2
where X is the drive number where systemrescue is
installed at or the equivalent for xfs or btrfs if you're using those
Setting/changing the label name
You must give this persistent storage a label that you will later reference in a systemmrescue YAML configuration file, you can do it with tune2fs or similar tools
With tune2fs:
- run
tune2fs -L "YOURLABEL" /dev/sdX2
where X is the drive number where systemrescue is installed at
YAML file changes
You must add the following in the global scope of a .yaml file in systemrescue.d/:
global:
cow_label=YOURLABEL