Unable to change UUID - Bad magic number in super-block
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Unable to change UUID - Bad magic number in super-block
I used clonezilla to clone an entire drive. My end goal is to run updates on this drive, boot from it, and migrate the updates over to the "original" drive. To keep the computer from getting confused when I boot with two identical drives, I need to change the UUID but I'm running into trouble.
Code:
# uuid
dc0e45c0-fada-11e2-8e97-2fa4191f2c28
# tune2fs /dev/sda2 -U 'dc0e45c0-fada-11e2-8e97-2fa4191f2c28'
tune2fs 1.41.12 (17-May-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/sda2
Couldn't find valid filesystem superblock.
This is an LVM member if that makes any difference.
Code:
# fdisk -l
Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00097d75
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 30395 243627008 8e Linux LVM
You cannot use tune2fs (or any other file system tool) on an LVM Physical Volume, simply because the file system isn't written directly to that volume. The file system is written to a Logical Volume, which exists inside a Volume Group, which consists of on one or more Physical Volumes.
Find the true identity of the device (the Logical Volume) the file system is on, and run tune2fs on that device instead.
It does, an LVM partition is a container for logical volumes which are the actual filesystems. What linux distribution/version are you running?
You can change the UUIDs with the pvchange command but you also need to change the volume group name in order to mount the clone on the same system. You will need to boot from a rescue disk in order to rename your / logical volume.
You cannot use tune2fs (or any other file system tool) on an LVM Physical Volume, simply because the file system isn't written directly to that volume. The file system is written to a Logical Volume, which exists inside a Volume Group, which consists of on one or more Physical Volumes.
Find the true identity of the device (the Logical Volume) the file system is on, and run tune2fs on that device instead.
/dev/sda1 is my boot partition and /dev/sda2 is the LVM. Are you saying the 'true' UUID is on sda1?
Quote:
Originally Posted by michaelk
It does, an LVM partition is a container for logical volumes which are the actual filesystems. What linux distribution/version are you running?
You can change the UUIDs with the pvchange command but you also need to change the volume group name in order to mount the clone on the same system. You will need to boot from a rescue disk in order to rename your / logical volume.
I'm on RHEL 6. I was afraid of needing a rescue disk to change the volume group name and was hoping there was a way of avoiding that, oh well.
Clearly, your root device is /dev/mapper/vg_hallen4brxrc1-lv_root. That's the device with the file system which UUID you wish to change.
LVM Physical Volumes also have UUIDs, but they are not related to the file system at all. They are only used by the LVM subsystem, and have nothing to do with the UUID you can pass to the mount command or put in /etc/fstab as a device reference.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.