#778 closed enhancement (fixed)

mondorestore doesn't restore labelled vfat partitions

Reported by: bruno Owned by: bruno
Priority: high Milestone: 3.2.2
Component: mondo Version: 3.2.1
Severity: critical Keywords:
Cc:

Description

RHEL 7 seems to allow the usage of UUID references in /etc/fstab to mount vfat/uefi partitions. mondorestore needs to be fixed to support these (currently mondorestore skip vfat parititions). while keeping a compatible behaviour for other distributions which do not support that feature.

Change History (11)

comment:1 Changed 20 months ago by bruno

  • Status changed from new to assigned

Should be fixed with rev [3472]. Tests to be done.

comment:2 Changed 20 months ago by bruno

Nope. The modification allows the usage of a LABEL not a UUID !!

Last edited 20 months ago by bruno (previous) (diff)

comment:3 Changed 20 months ago by bruno

This is much more tricky than expected, as I'll need to do binary editing of the partition to make it work (using mlabel doesn't seem to work contrary to what is referenced).

Refs: http://ubuntuforums.org/showthread.php?t=1240146 http://schlemmersoft.de/en/node/180946 (mlabel not working for me)

comment:4 Changed 19 months ago by ddiaz

I tested mlabel on RHEL7 and I was able to modify the UUID of a VFAT partition.

[root@rhel7-efi mtools-test]# mdir d: Volume in drive D has no label Volume Serial Number is 1141-E481 Directory for D:/

[root@rhel7-efi mtools-test]# mlabel -N 1212E112 d:

[root@rhel7-efi mtools-test]# mdir d: Volume in drive D has no label Volume Serial Number is 1212-E112 <------- new UUID Directory for D:/

comment:5 Changed 18 months ago by bruno

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Type changed from defect to enhancement

Indeed mlable works for me on mageia 5 e.g. However, it forces to make modifictaions to /etc/mtools.conf which is not convenient.

I've made a small perl script (mr-label) which does the right thing for us hopefully.

Now available with rev [3488]

Do you want to test the mr-label command to verify it works in your use case ? Available here separately: http://trac.mondorescue.org/browser/branches/3.2/MondoRescue/bin/mr-label

comment:6 Changed 14 months ago by bruno

  • Resolution fixed deleted
  • Status changed from closed to reopened

It seems that using mkfs.vfat -F 32 voids the possibility to use correctly mr-label to update UUIDs

I thus changed the usage to remove the flag as the command should select itself the best option (from the man page) and that should fix the issue.

Part of rev [3531].

The beta version of mondo and perl-MondoRescue for RHEL7 should allow to test it (under test dated 20160318). ftp://ftp.mondorescue.org/test/rhel/7/x86_64/mondo-3.2.220160318015658-0.rhel7.x86_64.rpm ftp://ftp.mondorescue.org/test/rhel/7/x86_64/perl-MondoRescue-3.2.220160318015658-0.rhel7.noarch.rpm

Last edited 14 months ago by bruno (previous) (diff)

comment:7 Changed 14 months ago by bruno

  • Resolution set to fixed
  • Status changed from reopened to closed

I've now been able to completely restore a RHEL7 system which was using a UUID for the ESP, and was used in the fstab. So I think this is now fixed. Please reopen if not.

NOTE: when the mondorestore.log file is copied onto the HDD at the end of the restore, it doesn't include the labelling msgs, operation which is done afterwards. So you need to look at the messages on the restored system before rebooting it, or you'll loose these msgs.

comment:8 Changed 14 months ago by bruno

  • Resolution fixed deleted
  • Status changed from closed to reopened

Using blkid -p or file -s can allow to detect the size of the FAT table (12, 16 or 32):

# blkid -p /dev/sda1
/dev/sda1: SEC_TYPE="msdos" UUID="E571-B7B9" VERSION="FAT16" TYPE="vfat" USAGE="filesystem"

For now mr-label is able to re-initiate the UUID/Label of a FAT16 type but not of the 2 others

comment:9 Changed 14 months ago by bruno

This page has a good documentation on that aspect: https://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html

comment:10 Changed 14 months ago by bruno

ftp://ftp.mondorescue.org/test/rhel/7/x86_64/perl-MondoRescue-3.2.220160404170005-0.rhel7.noarch.rpm should fix the issue for good. Could you try again and report back please ?

comment:11 Changed 14 months ago by bruno

  • Resolution set to fixed
  • Status changed from reopened to closed
# blkid -p toto.fat*
toto.fat12: SEC_TYPE="msdos" UUID="18BB-B3AB" VERSION="FAT12" TYPE="vfat" USAGE="filesystem"
toto.fat16: SEC_TYPE="msdos" UUID="1771-3265" VERSION="FAT16" TYPE="vfat" USAGE="filesystem"
toto.fat32: UUID="F3E8-C1EE" VERSION="FAT32" TYPE="vfat" USAGE="filesystem"

# mr-label -U 345A-987B toto.fat12
# mr-label -U 345A-987B toto.fat16
# mr-label -U 345A-987B toto.fat32
# mr-label -L MONLABLE64 toto.fat12
# mr-label -L MONLABLE64 toto.fat16
# mr-label -L MONLABLE64 toto.fat32

# blkid -p toto.fat*
toto.fat12: SEC_TYPE="msdos" LABEL="MONLABLE64" UUID="345A-987B" VERSION="FAT12" TYPE="vfat" USAGE="filesystem"
toto.fat16: SEC_TYPE="msdos" LABEL="MONLABLE64" UUID="345A-987B" VERSION="FAT16" TYPE="vfat" USAGE="filesystem"
toto.fat32: LABEL="MONLABLE64" UUID="345A-987B" VERSION="FAT32" TYPE="vfat" USAGE="filesystem"

Part of rev [3550]

Note: See TracTickets for help on using tickets.