BTS

Issue1248

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

Created on 2013-03-23.12:04:28 by jkirk, last changed 2013-09-25.13:45:07 by mika.

Messages
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
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