Hi, how essential is this? Could it be implemented with a sufficiently complicated customize script?
I ask because I would like to avoid adding any further features into vmdebootstrap, which is quite a complicated program already. Instead all my development work goes into vmdb2 (not yet in Debian), which is a much simpler program, thanks to a completely different architecture, and where it would be more feasible to add all sorts of customizability. I would like to make vmdebootstrap go into deep maintenance mode, where I only change things to fix problems that affect official Debian ISO image building, or when other vmdebootstrap users can't otherwise build their images and can't switch to vmdb2 either. On Sun, Jun 18, 2017 at 11:08:07PM +0200, martin schitter wrote: > the suggested vmdebootstrap patch by Michael doesn't set the customized boot > mount point in /etc/fstab of the generated images. > > i also think, the '--bootdirfmt' and its unusual "%s..." syntax doesn't look > very handy. therefore i used a simple '--bootdir' option in my fix. > > working patch attached. > diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap > index d9a697d..e4e7e60 100755 > --- a/bin/vmdebootstrap > +++ b/bin/vmdebootstrap > @@ -78,6 +78,7 @@ class VmDebootstrap(cliapp.Application): # pylint: > disable=too-many-public-meth > self.settings.string(['bootflag'], 'specify flag to set for /boot/', > default='') > self.settings.bytesize(['bootoffset'], 'Space to leave at start of > the ' > 'image for bootloader', default='0') > + self.settings.string(['bootdir'], 'Mount point of /boot partition', > default='/boot/') > self.settings.boolean(['use-uefi'], 'Setup image for UEFI boot', > default=False) > self.settings.bytesize(['esp-size'], 'Size of EFI System Partition - > ' > 'requires use-uefi', default='5mib') > @@ -248,9 +249,9 @@ class VmDebootstrap(cliapp.Application): # pylint: > disable=too-many-public-meth > elif bootdev: > boottype = self.settings['boottype'] > filesystem.mkfs(bootdev, fstype=boottype) > - self.bootdir = '%s/%s' % (rootdir, 'boot/') > + self.bootdir = '%s/%s' % (rootdir, self.settings['bootdir']) > filesystem.devices['bootdir'] = self.bootdir > - os.mkdir(self.bootdir) > + os.makedirs(self.bootdir) > self.mount(bootdev, self.bootdir) > > # set user-specified flags, e.g. lba > diff --git a/doc/overview.rst b/doc/overview.rst > index 43693f2..da0f236 100644 > --- a/doc/overview.rst > +++ b/doc/overview.rst > @@ -107,6 +107,8 @@ Options > --boottype=FSTYPE Filesystem to use for the /boot partition. (default > ext2) > --bootflag=FLAG Flag to set on the first partition. (default none) > --bootoffset=SIZE Space to leave at start of the image for bootloader > + --bootdir=PATH Mount point of /boot partition. > + Default is ``/boot/``. > --roottype=FSTYPE Filesystem to use for the / (root) partition. > (default ext4) > --part-type=PART-TYPE > Partition type to use for this image. (default msdos) > diff --git a/vmdebootstrap/filesystem.py b/vmdebootstrap/filesystem.py > index b911c05..d9241c9 100644 > --- a/vmdebootstrap/filesystem.py > +++ b/vmdebootstrap/filesystem.py > @@ -171,8 +171,8 @@ class Filesystem(Base): > fstab.write('%s / %s %s 0 1\n' % > (rootdevstr, roottype, > self.get_mount_flags(roottype))) > if bootdevstr: > - fstab.write('%s /boot %s %s 0 2\n' % > - (bootdevstr, boottype, > self.get_mount_flags(boottype))) > + fstab.write('%s %s %s %s 0 2\n' % > + (bootdevstr, self.settings['bootdir'], boottype, > self.get_mount_flags(boottype))) > if self.settings['swap'] > 0: > fstab.write("/dev/sda3 swap swap defaults 0 0\n") > elif self.settings['swap'] > 0: > _______________________________________________ > Vmdebootstrap-devel mailing list > vmdebootstrap-de...@lists.alioth.debian.org > https://lists.alioth.debian.org/mailman/listinfo/vmdebootstrap-devel -- I want to build worthwhile things that might last. --joeyh
signature.asc
Description: PGP signature