LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-20-2018, 01:01 PM   #1
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
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.
 
Old 06-20-2018, 01:29 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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.
 
Old 06-20-2018, 02:03 PM   #3
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
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.
 
Old 06-20-2018, 02:06 PM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Which version of tune2fs are you using? It should accept the -U random keyword as I suggested, as well as clear and time. Check man tune2fs.
 
Old 06-20-2018, 02:11 PM   #5
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Original Poster
Rep: Reputation: 58
your right, -U random is required, entering in the right format doesn't work

i know hex backwards and forwards. or the manpage is wrong (it says to use alnum hex format with hyphens).

because it was released continually without fixing and the problem is "SO OBVIOUS" i assume it's intentionally broken.

to make this more fun: virtualbox requires uuid of virtual disk template be exactly same as uuid "stored in the real disk", to let you know

Last edited by X-LFS-2010; 06-20-2018 at 05:14 PM.
 
Old 06-20-2018, 02:30 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
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.
 
Old 06-20-2018, 09:28 PM   #7
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /dev/disk/by-uuid/<uuid here> does not exist and initramfs shell Mitt Green Linux - Kernel 4 08-03-2015 11:56 AM
tune2fs -U in script does not change UUID tryitagain Linux - Server 11 09-30-2012 07:51 PM
Change UUID - Edit UUID using the dd command GMHilltop Linux - Newbie 10 10-28-2010 07:39 PM
Volume has problems including no uuid in /dev/disk/by-uuid abejarano Linux - Hardware 3 12-31-2008 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration