Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
42
rated 0 times [  42] [ 0]  / answers: 1 / hits: 119911  / 2 Years ago, sun, december 19, 2021, 6:19:32

I have an unique situation where I need to change UUID of usb flash drive to previous UUID. I formatted it and obviously number changed...



I've ubuntu server setup with 1TB hdd, and 4GB usb flash drive to boot from. Grub on hdd is configured for UUID which changed when I formated usb drive and reinstalled ubuntu server. I've no external monitor, so I attach usb to laptop and install server there... than I move it to server hardware.



As I mentioned my problem is that I need usb to go back to previous UUID, otherwise server won't boot. And I cannot get external monitor till monday! :)



I know I need these files changed afterwards:



The files for which UUID is most critical:



/boot/grub/menu.lst

/etc/fstab

/etc/initramfs-tools/conf.d/resume


But I cannot find anywhere on the net info about customizing UUID.



Anyone?


More From » filesystem

 Answers
0

If you used ext for it:



tune2fs /dev/{device} -U {uuid}


From man tune2fs




-U UUID



Set the universally unique identifier (UUID) of the filesystem to UUID. The format of the UUID is a series of hex digits separated by hyphens, like this: c1b9d5a2-f162-11cf-9ece-0020afc76f16. The UUID parameter may also be one of the following:




clear  clear the filesystem UUID
random generate a new randomly-generated UUID
time generate a new time-based UUID



The UUID may be used by mount(8), fsck(8), and /etc/fstab(5) (and possibly others) by specifying UUID=uuid instead of a block special device name like /dev/hda1.



[#38727] Sunday, December 19, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ronicod

Total Points: 71
Total Questions: 111
Total Answers: 111

Location: Montenegro
Member since Fri, Dec 10, 2021
2 Years ago
;