[SOLVED] UUID booting: tune2fs cannot set uuid of flash thumb? creates virtual box issue
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
UUID booting: tune2fs cannot set uuid of flash thumb? creates virtual box issue
sdb2 is ext3 fs on a 16G flash stick, very typical kind, made with fdisk
when i use "tune2fs -U foo /dev/sdb2" it says nothing, light flashes. after that, dumpe2fs says UUID is <none>
history: I want to use UUID= in my /etc/fstab because VirtualBox doesn't support disk LABELsetting or /dev/sdb2 setting. i'm using .vmdk which means the image is a softlink (per say) to a real device. VirtualBox assigns same UUID to all .vmdk, then one has to set the "right / different" UUID i guess if one expects to boot using the same UUID as real (also vb refuses to add 2nd disk unless UUID is changed in one). Perhaps the VIrtualBox UUID and UUID scored on the device don't have to match, of that i'm unsure it's not documented to such an extent i can learn - i think.
Last edited by X-LFS-2010; 06-20-2018 at 01:28 PM.
I'm struggling to understand what sort of setup you have here, to be honest, and where VirtualBox fits into it. However, for the tune2fs -U command, could you try:
Code:
tune2fs -U random /dev/sdb2
and see if that sticks. If it does, your -U parameter may not be a valid UUID string.
thank you. but tune2fs doesn't allow "non-standard" numbers: it complains immediately and exits.
for example, given the hex code: 1-1-1-1-1, tune2fs won't even backfill zeros ! (it's doesn't even get fscanf() treatment of numbers)
(00000001-0001-0001-0001-000000000001)
i used a simple uuid, yes. but it passed as a uuid. as far as beign unique within the universe i don't care. it's just for a home lan and because PC are so "unattached" i need a ID i can remember off the top of my head.
virtualbox doesn't use or support LABEL, so i'm stuck using UUID
I'm told UUID is a 128 bit number represented as HEX. Perhaps that's not true. Perhaps if UUID isn't what tune2fs's internal "picker" would choose, then it refuses to write to disk? (if so, that's a security problem, not that i care)
Last edited by X-LFS-2010; 06-20-2018 at 02:08 PM.
Ok, so if you won't take my advice on trying -U random, please try setting any other superblock value with tune2fs, e.g. -c max-mount-counts, and see if it sticks.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
I don't think a UUID you can remember off the top of your head is a worthwhile goal here. Maybe you could just type out a valid UUID to assign to the drive, and then make an alias that echos that UUID to the terminal so you don't need to remember the whole thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.