forked from mirrors/nixpkgs
* Apparantly GRUB 2 cannot boot from a software RAID partition, so use
a separate /boot. svn path=/nixos/branches/boot-order/; revision=22344
This commit is contained in:
parent
20a88efffa
commit
1371f4e6c8
|
@ -291,21 +291,25 @@ in {
|
|||
''
|
||||
$machine->mustSucceed(
|
||||
"parted /dev/vda mklabel msdos",
|
||||
"parted /dev/vda -- mkpart primary 1M 1000M", # md0 (root), first device
|
||||
"parted /dev/vda -- mkpart primary 1024M 2024M", # md0 (root), second device
|
||||
"parted /dev/vda -- mkpart primary 2048M 2548M", # md1 (swap), first device
|
||||
"parted /dev/vda -- mkpart primary 2560M 3060M", # md1 (swap), second device
|
||||
"parted /dev/vda -- mkpart primary ext2 1M 30MB", # /boot
|
||||
"parted /dev/vda -- mkpart extended 30M -1s", # extended partition
|
||||
"parted /dev/vda -- mkpart logical 30M 1000M", # md0 (root), first device
|
||||
"parted /dev/vda -- mkpart logical 1024M 2000M", # md0 (root), second device
|
||||
"parted /dev/vda -- mkpart logical 2048M 2548M", # md1 (swap), first device
|
||||
"parted /dev/vda -- mkpart logical 2560M 3060M", # md1 (swap), second device
|
||||
"udevadm settle",
|
||||
# Note that GRUB2 doesn't work with version 1.2 metadata.
|
||||
"mdadm --create --force /dev/md0 --metadata 0.90 --level=raid1 --raid-devices=2 /dev/vda1 /dev/vda2",
|
||||
"mdadm --create --force /dev/md1 --metadata 1.2 --level=raid1 --raid-devices=2 /dev/vda3 /dev/vda4",
|
||||
"mdadm --create --force /dev/md0 --metadata 1.2 --level=raid1 --raid-devices=2 /dev/vda5 /dev/vda6",
|
||||
"mdadm --create --force /dev/md1 --metadata 1.2 --level=raid1 --raid-devices=2 /dev/vda7 /dev/vda8",
|
||||
"mkswap -f /dev/md1 -L swap",
|
||||
"swapon -L swap",
|
||||
"mkfs.ext3 -L nixos /dev/md0",
|
||||
"mount LABEL=nixos /mnt",
|
||||
"mkfs.ext3 -L boot /dev/vda1",
|
||||
"mkdir /mnt/boot",
|
||||
"mount LABEL=boot /mnt/boot",
|
||||
);
|
||||
'';
|
||||
fileSystems = rootFS;
|
||||
fileSystems = rootFS + bootFS;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue