From e64e9719e01369a4761eb0112bec5790010d3735 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Tue, 12 Jan 2016 19:40:55 +0000 Subject: Refer to size units consistently Martin Michlmayr http://lists.alioth.debian.org/pipermail/vmdebootstrap-devel/Week-of-Mon-20160111/000396.html --- bin/vmdebootstrap | 6 +++--- doc/overview.rst | 12 ++++++------ vmdebootstrap/base.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 277600b..af9b0f6 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -79,7 +79,7 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth 'requires use-uefi', default='5mib') self.settings.string(['part-type'], 'Partition type to use for this image', default='msdos') self.settings.string(['roottype'], 'specify file system type for /', default='ext4') - self.settings.bytesize(['swap'], 'create swap space of size SIZE (min 256Mb)') + self.settings.bytesize(['swap'], 'create swap space of size SIZE (min 256MB)') self.settings.string(['foreign'], 'set up foreign debootstrap environment ' 'using provided program (ie binfmt handler)') self.settings.string_list(['debootstrapopts'], 'pass additional options to debootstrap') @@ -371,10 +371,10 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth bootsize = self.settings['bootsize'] / (1024 * 1024) bootsize += partoffset base.message("Using bootsize %smib: %s bytes" % (bootsize, self.settings['bootsize'])) - logging.debug("Starting boot partition at %sMb", bootsize) + logging.debug("Starting boot partition at %sMB", bootsize) runcmd(['parted', '-s', self.settings['image'], 'mkpart', 'primary', 'fat16', str(partoffset), str(bootsize)]) - logging.debug("Starting root partition at %sMb", partoffset) + logging.debug("Starting root partition at %sMB", partoffset) runcmd(['parted', '-s', self.settings['image'], 'mkpart', 'primary', str(bootsize), extent]) diff --git a/doc/overview.rst b/doc/overview.rst index 2935e11..04c8395 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -103,8 +103,8 @@ Options size within the image. Debootstrapping will fail if this results in a root partition which is too small for the selected packages. The minimum swap - space is 256Mb as the default memory allocation - of QEMU is 128Mb. A default 1Gb image is not likely + space is 256MB as the default memory allocation + of QEMU is 128MB. A default 1GB image is not likely to have enough space for a swap partition as well. --foreign=PATH Path to the binfmt_handler to enable foreign support in debootstrap. e.g. :file:`/usr/bin/qemu-arm-static` @@ -262,11 +262,11 @@ in the vmdebootstrap log file, if enabled with the ``--log`` option. :file:`vmdebootstrap` also supports **EFI**. See :ref:`uefi`. Use ``--use-uefi`` to use ``grub-efi`` instead of ``grub-pc``. If the -default 5Mb is not enough space, use the ``--esp-size`` option to +default 5MB is not enough space, use the ``--esp-size`` option to specify a different size for the EFI partition. Registered firmware is not supported as it would need to be done after boot. If the system you are creating is for more than just a VM or live image, you will likely -need a larger ESP, up to 500Mb. +need a larger ESP, up to 500MB. .. index: uefi @@ -371,7 +371,7 @@ Example To create an image for the stable release of Debian:: - sudo vmdebootstrap --image test.img --size 1g \ + sudo vmdebootstrap --image test.img --size 1G \ --log test.log --log-level debug --verbose \ --mirror http://mirror.lan/debian/ @@ -476,7 +476,7 @@ If no arguments are given, the full test suite will be executed:: .. warning:: Do not run the full test suite if your connection to a Debian mirror is limited or metered. Each build requires a minimum - of 2Gb free space in tmpfs. A full test takes at least 10 minutes. + of 2GB free space in tmpfs. A full test takes at least 10 minutes. When limiting the run to specific tests, each ``--env`` option needs to be specified separately:: diff --git a/vmdebootstrap/base.py b/vmdebootstrap/base.py index 43d5a3e..b68f463 100644 --- a/vmdebootstrap/base.py +++ b/vmdebootstrap/base.py @@ -182,8 +182,8 @@ class Base(object): if self.settings['swap'] > swap: swap = self.settings['swap'] else: - # minimum 256Mb as default qemu ram is 128Mb - logging.debug("Setting minimum 256Mb swap space") + # minimum 256MB as default qemu ram is 128MB + logging.debug("Setting minimum 256MB swap space") extent = "%s%%" % int(100 * (self.settings['size'] - swap) / self.settings['size']) return extent -- cgit v1.2.1