/dev/sdX must not be *mounted* at all
If you mount e.g. /dev/sdX2 (persistance storage or whatever) to some place and try to use grml2usb it will fail during install_mbr().
...
2024-09-03 03:42:06,902 Installing default MBR
2024-09-03 03:42:06,903 executing: dd if='/dev/sdc' of='/tmp/tmpeszv6mt6' bs=512 count=1
2024-09-03 03:42:06,904 executing: dd if=/usr/share/grml2usb/mbr/mbrldr of=/tmp/tmpeszv6mt6 bs=439 count=1 conv=notrunc
2024-09-03 03:42:06,906 executing: dd if='/tmp/tmpeszv6mt6' of='/dev/sdc' bs=512 count=1 conv=notrunc,fsync
2024-09-03 03:42:06,909 Probing device via 'blockdev --rereadpt /dev/sdc'
blockdev: ioctl error on BLKRRPART: Device or resource busy
2024-09-03 03:42:06,911 Execution failed: ("Couldn't execute blockdev on '%s' (install util-linux?)", '/dev/sdc')
grml2usb --verbose --bootloader-only grml-sid-full_20240902.iso /dev/sdc1 5.30s user 4.51s system 18% cpu 51.726 total
The test if the device is mounted should make sure that it isn't in use at all or at least when the options for any commands are given/active that will fail otherwise.
cheers, Christopher
Hm, good point! Maybe we can look into the needs for mbr/mbrldr also while at it?
/cc @zeha + @jkirk :)
Hm, good point! Maybe we can look into the needs for
mbr/mbrldralso while at it?
This is of course a good question. For legacy PC boot we need -some- MBR. Maybe we can turn off a few things by default and simplify the options...
Hm, good point! Maybe we can look into the needs for
mbr/mbrldralso while at it?This is of course a good question. For legacy PC boot we need -some- MBR. Maybe we can turn off a few things by default and simplify the options...
I'd very much appreciate this if we could this done :)
Lets continue this part of the discussion in #60