Home partitions triple UUIDs

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Home partitions triple UUIDs

Postby Thebunyip » Jul 28th, '17, 11:59

Wow have I made a mess for myself.
Mageia 5 had started to be a problem. Always booting to UEFI screen not into grub. I suspected damage to the sda1 SSD. Once past UEFI via the boot menu all seemed ok
A replacement SSD arrived in time for Mageia6 launch.
Using clonezilla I backed up my home partition on sdb (Mageia -HOME-Bak and now renamed Mageia-HOME-OLD)
Replaced the defective SSD sda. Used Mageia6 live to partition the new SSD to provide root, swap and a home partition.
Used clonezilla to move the contents on my old home partition to the new sda3 partition.

Installed Mageia6 on sda1 with the Classic installer retaining my sda3 home partition. (I thought.)
All seemed OK but missing files saved since then prompted a closer look.

Mageia HOME on sda3 is not being used as the home partition for saving files. Files are being saved to Mageia-HOME-old on sdb3.
I do not know if the Desktop I see is on sda3 or elsewhere.
I guessed that I might need to set the Home partition to the correct sda3 partition. Searched and tried to follow what looked the correct advice.

Ran blkid to discover the UUID I should be using.

Code: Select all
[peter@localhost ~]$ su
Password:
[root@localhost peter]# blkid
/dev/sda1: LABEL="Mageia-Root" UUID="a7179ff3-c46a-4fff-b013-ec28dc060bc2" TYPE="ext4" PARTUUID="4993332f-01"
/dev/sda2: LABEL="LX-SWAP" UUID="30c42c59-2aa1-4c23-b393-6cdfc3d19673" TYPE="swap" PARTUUID="4993332f-02"
/dev/sda3: LABEL="Magiea-HOME" UUID="264f83c6-f30f-4a9a-903e-46971b1db5cd" TYPE="ext4" PARTUUID="4993332f-03"
/dev/sdb1: LABEL="M11SSD-Backup" UUID="f7efde75-b094-4622-80c0-2f89fcc6f06d" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="796422c2-4cb6-408c-ab0e-9f411519b8b3"
/dev/sdb2: LABEL="Carole-Lap-BAK" UUID="f3e13ed6-ce76-4aff-8ff0-f47ae0a418da" TYPE="ext4" PARTUUID="3f37828f-6850-47ef-a8ce-54fcd7009376"
/dev/sdb3: LABEL="Magiea-HOME-Bak" UUID="264f83c6-f30f-4a9a-903e-46971b1db5cd" TYPE="ext4" PARTUUID="98b900cf-700f-422d-8a2e-d720a23356c0"
/dev/sdb4: LABEL="Magiea-HOME-OLD" UUID="264f83c6-f30f-4a9a-903e-46971b1db5cd" TYPE="ext4" PARTUUID="0060ddfd-aa6c-4fd5-b8d0-99e95459d013"
[root@localhost peter]#


Opened fstab to see if I could work out what is wrong.

fstab contents =
Code: Select all
# Entry for /dev/sda1 :
UUID=a7179ff3-c46a-4fff-b013-ec28dc060bc2 / ext4 relatime,acl 1 1
# Entry for /dev/sda3 :
UUID=264f83c6-f30f-4a9a-903e-46971b1db5cd /home ext4 user,relatime,acl 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=30c42c59-2aa1-4c23-b393-6cdfc3d19673 swap swap defaults 0 0


Closer reading of the blkid output reveals that the three Mageia home partitions all share the same UUID. The PARTUUIDs are different and presumably identify the correct locations.
So I guess fstab will not be able to point to the correct home partition as things stand.

Please advise me how to use my sda3 home partition whilst (if possible) retaining access to my old home partition for backup use.

Would disconnecting sdb from the system and reinstalling on sda be a safe if cumbersome way to fix the problem? Alternatively is this a task for the System restore boot option?
Last edited by isadora on Jul 28th, '17, 12:36, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
User avatar
Thebunyip
 
Posts: 12
Joined: Apr 5th, '14, 15:21

Re: Home partitions triple UUIDs

Postby doktor5000 » Jul 28th, '17, 14:41

You can simply change to the label or to the device in fstab instead of the UUID.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Home partitions triple UUIDs

Postby Thebunyip » Jul 28th, '17, 15:51

Sorry doktor5000 your reply seem to suggest a simple fix. Unfortunately I do not understand what you are telling me.

As a point and click user the syntax of the command line instructions are a mystery to me. An example of what the required change looks like would help.

As you might expect I am afraid to make changes to an important file like fstab that I do not understand lest I brick the system.
User avatar
Thebunyip
 
Posts: 12
Joined: Apr 5th, '14, 15:21

Re: Home partitions triple UUIDs

Postby doktor5000 » Jul 28th, '17, 17:22

change this
Thebunyip wrote:fstab contents =
Code: Select all
UUID=264f83c6-f30f-4a9a-903e-46971b1db5cd /home ext4 user,relatime,acl 1 2



to this
Code: Select all
/dev/sda3 /home ext4 user,relatime,acl 1 2
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Home partitions triple UUIDs (Partial Success)

Postby Thebunyip » Jul 31st, '17, 11:06

Hi Doktor5000,

Once I figured out how to edit fstab ... that change now allows access to my new Home partition. Success. Thank you very much.

Unfortunately the cloned copies are still causing problems. My preferred printer driver TurboPrint installs a couple of icons on the correct desktop but they are non functional.The icons on the original desktop are still functional even after an uninstall and reinstall of TurboPrint from the new home Desktop. Both icons now added as 'launchers' to the correct home Desktop are OK.

After much google searching I decided to try changing the UUIDs for the duplicate partitions. Using Konsole as root (SU) I started using blkid to see what I have followed by uuid to generate replacement UUIDs and then tune2fs to apply the new UUID. This was followed by fsck to check that all was well. Everything seemed fine but the changes were not permanent and lost when rebooting. It should have worked according to several posts on a variety of distro forums.

I then tried using dd to copy one of the duplicate home partitions to a freshly created partition with its own unique UUID. Unfortunately dd also overwrites the UUID with the source UUID. Back where I started.

Now I will try to get my head around setting up and using a Backup and Restore option if I can find a user friendly GUI package. Initial searches show what can be done with scripts and low level commands which are probably perfect but just too complex for my aged brain to modify to suit my needs.

If I can achieve that I will then be able to delete the spare home partitions and get rid of the troublesome duplication of UUIDs that way.
User avatar
Thebunyip
 
Posts: 12
Joined: Apr 5th, '14, 15:21

Re: Home partitions triple UUIDs

Postby doktor5000 » Jul 31st, '17, 18:45

Well basically you can just cp everything into a new filesystem if you want that, or preferrably use a tarball for that.

For the backup and restore option, do you want this in general for your whole system, or only in this specific case to move the contents of filesystem A to filesystem B ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Home partitions triple UUIDs

Postby Thebunyip » Jul 31st, '17, 22:28

Hi doktor5000,
I should check out 'cp' to see if I can learn how to use it. Google could yet turn out to be my friend. :D

Like too many end users I know I should follow a backup discipline but never have, in spite of being caught out by a couple of hard disk crashes over the years.

As for for backup and restore, I should be happy if I can schedule incremental backups of /home (single user system) and add anything from /root that might be best to keep. (Once I find out what that might be.)

Reinstalling the OS in Linux/Mageia after any major failure is no big deal. I liked the look of Luckybackup but development is halted. So next to look at could be Déjà Dup unless you have any suggestions.

The next few days are hectic so I will have to wait a bit before seeing what google can turn up
User avatar
Thebunyip
 
Posts: 12
Joined: Apr 5th, '14, 15:21

Re: Home partitions triple UUIDs

Postby wintpe » Aug 1st, '17, 17:30

cp is simple in linux

in the terminal , locate the directory of files you want to copy.

type pwd to get the path.

now cd to the directory you want to copy to.

Code: Select all
cp -a /path/to/the/original .


dont miss that "space ." on the end

cp -a says copy everything from there down (archive), its similar to cp -r which can also be used, which

man anycommand has the full list of options available

-a, --archive
same as -dR --preserve=all


-R, -r, --recursive
copy directories recursively


alternatively move (which deletes the original)

Code: Select all
mv /path/to/the/original .


regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest