Merge pull request #79966 from chkno/bcache
nixos/bcache: Installer test for / on bcache
This commit is contained in:
commit
11f49fb94d
|
@ -650,6 +650,32 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
bcache = makeInstallerTest "bcache" {
|
||||
createPartitions = ''
|
||||
machine.succeed(
|
||||
"flock /dev/vda parted --script /dev/vda --"
|
||||
+ " mklabel msdos"
|
||||
+ " mkpart primary ext2 1M 50MB" # /boot
|
||||
+ " mkpart primary 50MB 512MB " # swap
|
||||
+ " mkpart primary 512MB 1024MB" # Cache (typically SSD)
|
||||
+ " mkpart primary 1024MB -1s ", # Backing device (typically HDD)
|
||||
"modprobe bcache",
|
||||
"udevadm settle",
|
||||
"make-bcache -B /dev/vda4 -C /dev/vda3",
|
||||
"echo /dev/vda3 > /sys/fs/bcache/register",
|
||||
"echo /dev/vda4 > /sys/fs/bcache/register",
|
||||
"udevadm settle",
|
||||
"mkfs.ext3 -L nixos /dev/bcache0",
|
||||
"mount LABEL=nixos /mnt",
|
||||
"mkfs.ext3 -L boot /dev/vda1",
|
||||
"mkdir /mnt/boot",
|
||||
"mount LABEL=boot /mnt/boot",
|
||||
"mkswap -f /dev/vda2 -L swap",
|
||||
"swapon -L swap",
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
# Test a basic install using GRUB 1.
|
||||
grub1 = makeInstallerTest "grub1" {
|
||||
createPartitions = ''
|
||||
|
|
Loading…
Reference in a new issue