Your message dated Sun, 16 Nov 2014 15:48:43 +0000
with message-id <[email protected]>
and subject line Bug#767913: fixed in vmdebootstrap 0.5-1
has caused the Debian Bug report #767913,
regarding vmdebootstrap: Make room for grub on disk also when --bootsize is used
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
767913: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767913
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vmdebootstrap
Version: 0.4-3
Severity: important
Tags: patch

At the moment it is impossible to combine the --grub and --bootsize
options in vmdebootstrap:

root@tjener:~# vmdebootstrap --distribution=jessie --image=test.img --verbose 
--grub --bootsize=256M
Creating disk image
Creating partitions
Creating filesystem ext4
Mounting /dev/mapper/loop0p2 on /tmp/user/0/tmpMlrrJq
Creating filesystem ext2
Mounting /dev/mapper/loop0p1 on /tmp/user/0/tmpMlrrJq/boot/
Debootstrapping
Give root an empty password
Removing udev persistent cd and net rules
Setting up networking
Updating the initramfs
Configuring grub2
Failed. Is grub2-common installed? Using extlinux.
Installing extlinux
Cleaning up
root@tjener:~# 

Dropping --bootsize work:

root@tjener:~# vmdebootstrap --distribution=jessie --image=test.img --verbose 
--grub 
Creating disk image
Creating partitions
Creating filesystem ext4
Mounting /dev/mapper/loop0p1 on /tmp/user/0/tmppsKvPT
Debootstrapping
Give root an empty password
Removing udev persistent cd and net rules
Setting up networking
Updating the initramfs
Configuring grub2
Installing extlinux
Cleaning up
root@tjener:~#

The reason is that --bootsize causes the /boot partition to start on
sector 0 on the disk, not leaving any space for grub to use.  I
discovered this while working on the btrfs patch, but submit this as a
separate bug report to make sure the fix is not lost even if no-one have
time to look at the btrfs issue.

This patch solve the issue by ensuring 1 MiB at the start of the disk is
reserved when --bootsize is used, to make sure it behave the same way
vmdebootstrap (and parted) is working when --bootsize isn't used.

--- vmdebootstrap.orig  2014-10-18 20:35:19.000000000 +0200
+++ vmdebootstrap       2014-11-03 05:34:47.319278095 +0100
@@ -243,13 +272,14 @@
         self.runcmd(['parted', '-s', self.settings['image'],
                      'mklabel', 'msdos'])
         if self.settings['bootsize'] and self.settings['bootsize'] is not '0%':
-            bootsize = str(self.settings['bootsize'] / (1024 * 1024))
+            reserved = 1 # MiB space for boot loader / grub
+            bootend = str(reserved + (self.settings['bootsize'] / (1024 * 
1024)))
             self.runcmd(['parted', '-s', self.settings['image'],
-                         'mkpart', 'primary', 'fat16', '0', bootsize])
+                         'mkpart', 'primary', 'fat16', str(reserved), bootend])
         else:
-            bootsize = '0%'
+            bootend = '0%'
         self.runcmd(['parted', '-s', self.settings['image'],
-                     'mkpart', 'primary', bootsize, '100%'])
+                     'mkpart', 'primary', bootend, '100%'])
         self.runcmd(['parted', '-s', self.settings['image'],
                      'set', '1', 'boot', 'on'])
 
-- 
Happy hacking
Petter Reinholdtsen

--- End Message ---
--- Begin Message ---
Source: vmdebootstrap
Source-Version: 0.5-1

We believe that the bug you reported is fixed in the latest version of
vmdebootstrap, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Neil Williams <[email protected]> (supplier of updated vmdebootstrap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 16 Nov 2014 15:11:34 +0000
Source: vmdebootstrap
Binary: vmdebootstrap
Architecture: source amd64
Version: 0.5-1
Distribution: unstable
Urgency: medium
Maintainer: VMDebootstrap List <[email protected]>
Changed-By: Neil Williams <[email protected]>
Description:
 vmdebootstrap - Bootstrap Debian into a (virtual machine) disk image
Closes: 767196 767913
Changes:
 vmdebootstrap (0.5-1) unstable; urgency=medium
 .
   * New upstream bug fix release for Jessie.
   * Allow parted to reserve space for grub2 on disk when
     also using --bootsize option. (Closes: #767913)
   * Move grub2-common to Recommends. (Closes: #767196)
   * Add section on bootloaders to manpage.
Checksums-Sha1:
 eb24df9844488e125138f3cdae2031382fddced9 2107 vmdebootstrap_0.5-1.dsc
 4935ff2539f2463ec970d8a65ca1f2c9185c3e5c 24489 vmdebootstrap_0.5.orig.tar.gz
 c4829b146858091391eb1c5b085c059bab4a8aa1 3076 vmdebootstrap_0.5-1.debian.tar.xz
 e9c38565a8829f9b386d645c55cb6ed89b89dd55 16154 vmdebootstrap_0.5-1_amd64.deb
Checksums-Sha256:
 1df973d6e1913f6bc93d8034497f77d2a50cc5fcc08893b2f4bb0b3db7daf00d 2107 
vmdebootstrap_0.5-1.dsc
 a85ecdb81382e3023dd6a496b96b742b71127385cb093d73e47d18b726949274 24489 
vmdebootstrap_0.5.orig.tar.gz
 f7e7b9db7018cb903862c17c14865d1eb47bd2e8f3b6e281d185f9f737aef4b3 3076 
vmdebootstrap_0.5-1.debian.tar.xz
 6e9f1bb1bdf4287621588fedd672b1c296fd653f3c121d9aa35d6d52c3e0e0c6 16154 
vmdebootstrap_0.5-1_amd64.deb
Files:
 fcdfb8984d6907d48bc22304d35ef317 2107 admin extra vmdebootstrap_0.5-1.dsc
 4a6ca9ac18e9a9b906e74620c3993d16 24489 admin extra 
vmdebootstrap_0.5.orig.tar.gz
 20e38bb736c6b807b9ff6c82f9445577 3076 admin extra 
vmdebootstrap_0.5-1.debian.tar.xz
 8afee257a6b8292f94a2b9edb5259995 16154 admin extra 
vmdebootstrap_0.5-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJUaMOLAAoJEPFn5DyBQ7aCa1IP+wScg3awD556AYSVabA5gkuF
eXqyAOaR3kK5xIhBfP0SYpjmk792Ny6STsVFh3BIA8fuijZ4ODiPhSg/CqiUz8vI
Okm4ksVWExDt5+9iacN+9hRW07Paa4OEA0DCeRfwqUAY0srqLNCJJ2v8Q4XjJpM/
BOughjirBq88PU/avZfWCUtXh8SrYwoHlqeRK9DEXG85GI1u79MK54X5Amor/LJV
d/9oCMYe4jWqesPEkxDnq+j+V9Htt/YodWEMHL5ICXcqYYE897G61YEcNSOzMjCz
RX3gzQgf+3hBGIaLCxXrOp5L6bV6rd2glI2uPxvOLzaTsM8F2iTdPTjc8EjjEH/M
nF+NfSKQpmgNVI52TrQ3hRDjjxESqyG1eW3GuJgJveATdJVaqPes8RY6J/f+rogQ
l/sY7HkqltfaSDwrC2dttheabZE3KRmxayTMbymx5Oh8sTH6e99rFuGsczwvjX5N
V3r21vBOrCc5CJrfgoYHSJZluRECjXSh/JHHxWlDKzQ3r0DKAtHrET8CBnlADymB
r+4giKfe1YXVVXFbrcDWdBgZfQWGWCFxZPlQwWVG8kRcXX98ENSBSn5xNkOsuZZZ
1UB/asMZs2Dam6XM2WtsdPTPNB9Dx/fxnGuX22wk2WTUt/bPBSYWpzPRYfxFvoEi
YmZtwOptNAfZjDUJHKvJ
=t2nL
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to