BTS

Issue1248

Title grml2usb: does not detect bootflag on second partition
Priority bug Status resolved
Superseder Nosy List evgeni, jkirk
Assigned To evgeni Topics

Created on 2013-03-23.12:04:28 by jkirk, last changed 2014-10-07.07:00:31 by mika.

Messages
msg4855 (view) Author: mika Date: 2014-10-07.07:00:31
We believe that your issue has been closed by the upload of
Version 0.14.9 of grml2usb from Michael Prokop <mika@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 07 Oct 2014 08:43:38 +0200
Source: grml2usb
Binary: grml2usb
Architecture: source amd64
Version: 0.14.9
Distribution: unstable
Urgency: medium
Maintainer: Grml Team <team@grml.org>
Changed-By: Michael Prokop <mika@grml.org>
Description:
 grml2usb   - install Grml system / ISO to usb device
Closes: 757993
Changes:
 grml2usb (0.14.9) unstable; urgency=medium
 .
   * [2b2c97a] Use pyparted to check for bootflag
     [Closes: issue1248] [Closes: #757993]
     Thanks to Evgeni Golov <evgeni@grml.org> for further
     improving my initial patch.
Checksums-Sha1:
 5ae6ffd1ec31665159d12c2811b8cdb20416fd38 1078 grml2usb_0.14.9.dsc
 c708f2c53fcbd683771060265bd59ad876e1bf9a 384568 grml2usb_0.14.9.tar.xz
 350e27378bb6d23673dc248953b4dbaff08252db 215802 grml2usb_0.14.9_amd64.deb
Checksums-Sha256:
 0b4698ff8aed865dc9e9fabee514ba4efaada8f4668fdf945b9861feb220735e 1078 grml2usb_0.14.9.dsc
 43e27181d46db35b226f51e8c9ec36c412fb14b2c2dc5896285d1775332df8db 384568 grml2usb_0.14.9.tar.xz
 f24a05f56e72e6e69305cf9ef42e17d70e00b9d3c189649ad25afb41952b1411 215802 grml2usb_0.14.9_amd64.deb
Files:
 ecb1a5ba6095ef96afc82809bc68e377 1078 admin optional grml2usb_0.14.9.dsc
 0198e563bdeb62cb2f85c6be846fb64a 384568 admin optional grml2usb_0.14.9.tar.xz
 4ed15fe8edc9674dcd5ae2faf18bf7b4 215802 admin optional grml2usb_0.14.9_amd64.deb

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

iEYEARECAAYFAlQzjUEACgkQ2N9T+zficugxnACfVc5grIDIddGyMJTYsf3LA1Oq
S4IAnjIhXi5V9DljEtXOcD0VxAEpNP1F
=VIvR
-----END PGP SIGNATURE-----
msg4631 (view) Author: mika Date: 2013-09-25.13:45:07
A possible fix is pending in: 
https://github.com/grml/grml2usb/commit/360632e096cbcd38d025d610cd64ce3fbb45c131

Needs review and on ACK merge to master + release, I don't consider this as release-stopper 
material for 2013.09 though.
msg4546 (view) Author: jkirk Date: 2013-03-23.12:04:28
Hi!

When using grml2usb I usually create two partitions on my USB-Key.
sdX1 is used for DATA und sdX2 should go for grml. (I use the first
primary partion for DATA because Windows only shows the first
partition on removable devices - at least on XP)...

This then looks like this

# sfdisk -l /dev/sdb -uB

Disk /dev/sdb: 1022 cylinders, 126 heads, 62 sectors/track
Units = blocks of 1024 bytes, counting from 0

   Device Boot   Start       End    #blocks   Id  System
/dev/sdb1           31   3124799    3124769    7  HPFS/NTFS/exFAT
/dev/sdb2   *  3124800   3991931     867132   83  Linux
/dev/sdb3            0         -          0    0  Empty
/dev/sdb4            0         -          0    0  Empty


When running grml2usb it complains "bootflag is NOT enabled":

# grml2usb ./grml96-full_2013.02-rc1.iso /dev/sdb2 --syslinux-mbr --bootloader-only --verbose
Debug: 2013-03-23 12:19:52,273 Executing grml2usb version 0.13.5
Debug: 2013-03-23 12:19:52,276 Using ISO ./grml96-full_2013.02-rc1.iso
Debug: 2013-03-23 12:19:52,276 mount ['-o', 'loop,ro', '-t', 'iso9660'] ./grml96-full_2013.02-rc1.iso /tmp/grml2usb4QBTjk
Debug: 2013-03-23 12:19:52,280 register_mountpoint(/tmp/grml2usb4QBTjk)
Debug: 2013-03-23 12:19:52,282 bootflag is NOT enabled
Debug: 2013-03-23 12:19:52,283 Fatal: Device /dev/sdb does not have the bootflag set. Please enable it to be able to boot.
Debug: 2013-03-23 12:19:52,283 umount [] /tmp/grml2usb4QBTjk
Debug: 2013-03-23 12:19:52,287 unregister_mountpoint(/tmp/grml2usb4QBTjk)
Traceback (most recent call last):
  File "/usr/sbin/grml2usb", line 1780, in <module>
    main()
  File "/usr/sbin/grml2usb", line 1757, in main
    install(iso, device)
  File "/usr/sbin/grml2usb", line 1485, in install
    install_grml(iso_mountpoint, device)
  File "/usr/sbin/grml2usb", line 1511, in install_grml
    check_boot_flag(device)
  File "/usr/sbin/grml2usb", line 328, in check_boot_flag
    "Please enable it to be able to boot." % boot_dev)
__main__.VerifyException: Device /dev/sdb does not have the bootflag set. Please enable it to be able to boot.

I then set the boot flag on the first partion rerun grml2usb and then
reset the boot flag back to the second partiton again.

Additional information: 
* I obviously had a "first run" without --bootloader-only.
* The same behaviour is also shown without --syslinux-mbr but in that
case the boot flag is not needed at all. The system boots even without
the bootflag and also if set on the wrong partition.

So we have three issues here:

* syslinux-mbr needs the boot flag
* (default) mbr does not need the boot flag
* the boot flag detection on other than the primary partition seems to
be broken.

and a question:

* is it possible to let grml2usb set the bootflag (if needed).

Regards,
 - Darsha
History
Date User Action Args
2014-10-07 07:00:31mikasetstatus: need-eg -> resolved
nosy: jkirk, evgeni
messages: + msg4855
2013-09-25 13:45:07mikasetstatus: unread -> need-eg
nosy: jkirk, evgeni
messages: + msg4631
2013-03-25 11:24:28mikasetassignedto: evgeni
nosy: + evgeni
2013-03-25 11:24:08mikasetpriority: bug
2013-03-23 12:04:28jkirkcreate