Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
crpb opened this issue Sep 3, 2024 · 5 comments
Open

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

crpb opened this issue Sep 3, 2024 · 5 comments

Comments

@crpb
Copy link
Contributor

crpb commented Sep 3, 2024

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

@mika
Copy link
Member

mika commented Nov 23, 2024

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

@mika
Copy link
Member

mika commented Nov 23, 2024

/cc @zeha + @jkirk :)

@zeha
Copy link
Member

zeha commented Nov 23, 2024

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

@mika
Copy link
Member

mika commented Nov 23, 2024

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 :)

@zeha
Copy link
Member

zeha commented Nov 25, 2024

Lets continue this part of the discussion in #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants