summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-06-02 11:09:29 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-06-02 12:10:18 +0000
commit3a8c02eb8d9beac6ec6c0570c9a50de72b23fc52 (patch)
tree76408f3fd78b16f1e352988f7f68eec036a2bf18
parentdd380544e7c3a9f6c47e23639bb0a45958c3e446 (diff)
downloaddefinitions-3a8c02eb8d9beac6ec6c0570c9a50de72b23fc52.tar.gz
Add initramfs support to write extensions that produce disks
If INITRAMFS_PATH is specified and the file exists, then the produced kernel command line will use root=UUID=$uuid_of_created_disk rather than root=/dev/sda, which may be incorrect. Help files have been updated to mention the new option. This leads to an unfortunate duplication of the path to the initramfs, in both the location field of the nested deployment and the INITRAMFS_PATH of the disk image creation. However, an initramfs could be produced by a chunk and put in the same place, so it doesn't make sense to couple the rawdisk and initramfs write extensions to remove this duplication. Similarly, there may be multiple valid initramfs in the rootfs e.g. extlinux loads a hypervisor, which is Linux + initramfs, and the initramfs then boots a guest Linux system, which uses a different initramfs. This makes it important to explicitly let the rootfs write extensions know which to use, or not as the case may be. util-linux's blkid is required, since the busybox version ignores the options to filter its output, and parsing the output is undesirable. Because syslinux's btrfs subvolume support is limited to being able to use a non-0 default subvolume, the initramfs has to be copied out of the run-time rootfs subvolume and into the boot subvolume. This pushed the required disk space of a minimal system over the 512M threshold because we do not have the userland tooling support to be able to do a btrfs file contents clone.
-rw-r--r--kvm.write.help4
-rw-r--r--rawdisk.write.help4
-rw-r--r--virtualbox-ssh.write.help4
3 files changed, 12 insertions, 0 deletions
diff --git a/kvm.write.help b/kvm.write.help
new file mode 100644
index 00000000..8b5053a5
--- /dev/null
+++ b/kvm.write.help
@@ -0,0 +1,4 @@
+help: |
+ The INITRAMFS_PATH option can be used to specify the location of an
+ initramfs for syslinux to tell Linux to use, rather than booting
+ the rootfs directly.
diff --git a/rawdisk.write.help b/rawdisk.write.help
index a514a4e8..298d441c 100644
--- a/rawdisk.write.help
+++ b/rawdisk.write.help
@@ -5,3 +5,7 @@ help: |
The `location` argument is a pathname to the image to be
created or upgraded.
+
+ The INITRAMFS_PATH option can be used to specify the location of an
+ initramfs for syslinux to tell Linux to use, rather than booting
+ the rootfs directly.
diff --git a/virtualbox-ssh.write.help b/virtualbox-ssh.write.help
new file mode 100644
index 00000000..8b5053a5
--- /dev/null
+++ b/virtualbox-ssh.write.help
@@ -0,0 +1,4 @@
+help: |
+ The INITRAMFS_PATH option can be used to specify the location of an
+ initramfs for syslinux to tell Linux to use, rather than booting
+ the rootfs directly.