diff options
author | dann frazier <dann.frazier@canonical.com> | 2014-04-30 15:05:31 -0600 |
---|---|---|
committer | dann frazier <dann.frazier@canonical.com> | 2014-04-30 15:05:31 -0600 |
commit | 9f9b9b48b1cdc972e2aa3c2e3df4b629201a9ebe (patch) | |
tree | e98aefdfa2588c8de6bcde5e396dd27ab32832f9 /bin/virtualization | |
parent | 28cc1af35bb8f724050086b638fde7cf3e510064 (diff) |
Mount root by label
Instead of keeping a map of qemu disk types to /dev files, we can just mount by label and let the initramfs detect which device file to use. This avoids having to deal with differences between partitioned disks and unpartitioned disks, as well as not having to predict the order in which the seed and root disks get enumerated.
Diffstat (limited to 'bin/virtualization')
-rwxr-xr-x | bin/virtualization | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/virtualization b/bin/virtualization index 50dc685..ea54e7e 100755 --- a/bin/virtualization +++ b/bin/virtualization @@ -112,11 +112,13 @@ class QemuRunner(object): self.append = [] if self.config['cloudimg_type'] == CLOUD_IMAGE_TYPE.TAR: - self.append = self.append + ['console=ttyAMA0', 'earlyprintk=serial', 'ro', 'rootfstype=ext4'] - if self.config['qemu_disk_type'] == QEMU_DISK_TYPE.SD: - self.append = self.append + ['root=/dev/mmcblk0'] - elif self.config['qemu_disk_type'] == QEMU_DISK_TYPE.VIRTIO: - self.append = self.append + ['root=/dev/vda'] + self.append = self.append + [ + 'console=ttyAMA0', + 'earlyprintk=serial', + 'ro', + 'rootfstype=ext4', + 'root=LABEL=cloudimg-rootfs', + ] def add_boot_files(self, kernel=None, initrd=None, dtb=None): if kernel: |