From 615f75d32eace577bf73c8dc14813db6aae338a7 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 13 Mar 2016 14:51:47 +0000 Subject: Create boot partition with proper fs type - All Linux filesystems should take the type 'Linux' for which the argument to parted is 'ext2'. - vfat and msdos file systems should have 'fat16' or 'fat32' type. Choose 'fat16' which is the earlier default. Sunil Mohan Adapa Bug: #815256 --- bin/vmdebootstrap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 2971260..b65a282 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -370,6 +370,9 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth # /boot creation - move into base but keep the check # needs extent, partoffset, bootsize: no return if self.settings['bootsize'] and self.settings['bootsize'] is not '0%': + boot_fs_type = 'ext2' + if self.settings['boottype'] in ('vfat', 'msdos'): + boot_fs_type = 'fat16' if self.settings['grub'] and not partoffset: partoffset = 1 bootsize = self.settings['bootsize'] / (1024 * 1024) @@ -377,7 +380,8 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth base.message("Using bootsize %smib: %s bytes" % (bootsize, self.settings['bootsize'])) logging.debug("Starting boot partition at %sMB", bootsize) runcmd(['parted', '-s', self.settings['image'], - 'mkpart', 'primary', 'fat16', str(partoffset), str(bootsize)]) + 'mkpart', 'primary', boot_fs_type, str(partoffset), + str(bootsize)]) logging.debug("Starting root partition at %sMB", partoffset) runcmd(['parted', '-s', self.settings['image'], 'mkpart', 'primary', str(bootsize), extent]) -- cgit v1.2.1