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

Enable UUID mount support in berryboot.img busybox #582

Open
wants to merge 1 commit into
base: berryboot2018
Choose a base branch
from

Conversation

macmpi
Copy link
Contributor

@macmpi macmpi commented Jul 5, 2019

Makes it consistent with busybox-static to similarly allow boot partition mount by UUID if need be, as available from bootdev statement in cmdline.txt.
Particularly useful if bbloader.img is not used (hence /boot not mounted) and berryboot-init needs to mount /boot at some point; since cmdline.txt may refer UUID, we just need to be able to use it.
...and anyhow consistency is good :)

Note: this busybox.config still comes from legacy 0.28.x, although actual distribution used is 0.29.x: one would need to line them-up too.

Makes it consistent with busybox-static (to similarly allow boot partition mount by UUID if need be, as available from bootdev statement in cmdline.txt)

Note, this busibox.config still comes from legacy 0.28.x, although actual distribution used is 0.29.x: would need to line them-up too
@maxnet
Copy link
Owner

maxnet commented Jul 5, 2019

Doesn't already work?
There is code somewhere to resolve the reference using libblkid.

@macmpi
Copy link
Contributor Author

macmpi commented Jul 5, 2019

Did not have a chance to check yet, but anyway thought would make sense to just have same for consistency.

@macmpi
Copy link
Contributor Author

macmpi commented Jul 7, 2019

Here are my tests mounting from berryboot console:

# mount -U 0720-C5A4 /toto
mount: invalid option -- U

# mount 0720-C5A4 /toto
mount: mounting 0720-C5A4 on /toto failed: No such file or directory

# mount UUID="0720-C5A4" /toto
mount: mounting UUID=0720-C5A4 on /toto failed: No such file or directory

# mount UUID=0720-C5A4 /toto
mount: mounting UUID=0720-C5A4 on /toto failed: No such file or directory

# mount --uuid 0720-C5A4 /toto
mount: mounting 0720-C5A4 on /toto failed: No such file or directory

# mount /dev/disk/by-uuid/0720-C5A4 /toto

Only the last (cumbersome) one worked.
According to this busybox patch:

Summary:                    PATH: Mounting by volume UUID and label
Description: 
This patch adds support of -L and -U mount switches and also specification
of device in command line in one of the form UUID=... and LABEL=...
Requires libuuid and libblkid.

So I assume setting the option for that berryboot.img busybox is desirable.
Thanks.

@macmpi
Copy link
Contributor Author

macmpi commented Sep 2, 2019

To further clarify: the point of this PR is to allow easy & consistent mount by UUID from either console (helps debugging) or berryboot-init scripts.
Indeed mount UUID=XXX /mntpoint is the expected syntax, now bbloader also supports that convention using cmdline.txt parameter.

(obviously berryboot2 app internally figures-out how to mount by UUID without this, leveraging libblkid.... but not obvious at console or berryboot-init scripts levels)

Thanks for consideration.

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

Successfully merging this pull request may close these issues.

2 participants