diff options
author | Daniel Watkins <daniel.watkins@canonical.com> | 2016-11-22 09:58:55 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-11-22 12:25:30 -0500 |
commit | 18203bf101dc04c28b53a92cd95c8be88959c428 (patch) | |
tree | 09be8cbe558050df5488659bc882982618925bbb /cloudinit/sources | |
parent | 9e904bbc3336b96475bfd00fb3bf1262ae4de49f (diff) | |
download | vyos-cloud-init-18203bf101dc04c28b53a92cd95c8be88959c428.tar.gz vyos-cloud-init-18203bf101dc04c28b53a92cd95c8be88959c428.zip |
disk_setup: Use sectors as unit when formatting MBR disks with sfdisk.
The version of sfdisk in wily (and onwards) only accepts sectors as a
valid disk size. As such, this refactors the MBR code path in
cc_disk_setup to use sectors.
- use --unit=S: while newer versions of sfdisk assume --unit=S, older
versions do not so we specifically pass it in. Versions of sfdisk
found in supported OSes such as centos6 wont assume --unit=S.
- add --force: this exists back to centos 6 (2.17.2), so it should
be fine, and is what we ultimately want.
"do what I say, even if it is stupid"
- keep --Linux. Even though this has been deprecated for quite some
time, we keep it until versions that want it are unsupported.
If necessary at some point we could check for util linux version
and if it had --Linux and use it in those cases.
Additionally, improve usefulness of some log messages.
LP: #1460715
Diffstat (limited to 'cloudinit/sources')
0 files changed, 0 insertions, 0 deletions