mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
nixos/bcache: Installer test for / on bcache
This commit is contained in:
parent
08444aa09b
commit
f6e9deee3c
@ -651,6 +651,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 New Issue
Block a user