grml2usb icon indicating copy to clipboard operation
grml2usb copied to clipboard

/dev/sdX must not be *mounted* at all

Open crpb opened this issue 1 year ago • 5 comments

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

crpb avatar Sep 03 '24 01:09 crpb

Hm, good point! Maybe we can look into the needs for mbr/mbrldr also while at it?

mika avatar Nov 23 '24 09:11 mika

/cc @zeha + @jkirk :)

mika avatar Nov 23 '24 09:11 mika

Hm, good point! Maybe we can look into the needs for mbr/mbrldr also 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...

zeha avatar Nov 23 '24 11:11 zeha

Hm, good point! Maybe we can look into the needs for mbr/mbrldr also 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 :)

mika avatar Nov 23 '24 11:11 mika

Lets continue this part of the discussion in #60

zeha avatar Nov 25 '24 13:11 zeha