You are not logged in.
I have a DellXPS 13 that I recently installed Arch Linux on. I installed linux with LVM and an encrypted hard drive such that I have the following partitions
nvme0n1p1, nvme0n1p2, nvme0n1p3
Where the p3 partition contains the operating system.
I just ran the rsync command shown below to backup my entire system. NOTE: the command came directly from the Arch Wiki. Although to be fair, I did forget to exclude my swapfile as stated in the instructions.
rsync -aAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /run/media/username/backupdrive
After I ran the command I noticed that my wireless stopped working, so I decided to reboot my computer. Unfortunately the computer will not longer boot, so I booted into BIOS. Unfortunately it appears that I no longer have a EUFI boot device. I am not sure how doing an rsync command would have deleted by boot device but it seemed to. While somehow this rsync command affected my current install, I do believe it did correctly copy my installation to my backup. If I am correct, how do I restore my installation from backup? I found a video on YouTube that walks through the process, but the video create is walking through the process for a virtual machine that only has one partition. How do I restore Fromm a backup when I have three partitions, or am I going to have to wipe the drive and manually reinstall everything? In the video he uses a usb drive with an arch iso installed on it to enter a command line interface. He mounts the system mount /dev/sda1 to /mnt/system and the backup to mount /mnt/usb, which are directories he creates. However, when I try to mount /dev/nvme0n1p3 I get an error stating unknown filesystem type 'crypto_LUKS', indicating that something from luks is missing.
So in summary, my first question is, why would having run the above rsync command disabled or destroyed by boot drive, and second; can I use my backup to restore my system and if so how?
Last edited by webbja123 (2021-04-09 17:49:34)
Offline
I see nothing wrong with the rsync command so I suspect that the error lies elsewhere. Did you double-check your mount points with e.g. lsblk before running the command?
Where is your UEFI system partition? Try to mount it and check if the files are still there. Hold off on trying to sync files back from the backup until you understand what the issue is. Otherwise you may just end up propagating the problem further.
Just to clarify, have you booted this system before? You mentioned that you recently installed Linux on the machine so I just want to confirm that this wasn't the first time that you tried booting into it. If it is then it may be an error in how you set up the UEFI system partition (e.g. by trying to put it on LUKS/LVM).
As for the unrecognized LUKS filesystem type, is that an error from trying to mount the encrypted partition directly with mount? What happens if you try to open it with cryptsetup?
Also check the output of dmesg for indications of disk IO errors and run a full disk check with smartctl to see if the disk is ok.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I see nothing wrong with the rsync command so I suspect that the error lies elsewhere. Did you double-check your mount points with e.g. lsblk before running the command?
Where is your UEFI system partition? Try to mount it and check if the files are still there. Hold off on trying to sync files back from the backup until you understand what the issue is. Otherwise you may just end up propagating the problem further.
Just to clarify, have you booted this system before? You mentioned that you recently installed Linux on the machine so I just want to confirm that this wasn't the first time that you tried booting into it. If it is then it may be an error in how you set up the UEFI system partition (e.g. by trying to put it on LUKS/LVM).
As for the unrecognized LUKS filesystem type, is that an error from trying to mount the encrypted partition directly with mount? What happens if you try to open it with cryptsetup?
Also check the output of dmesg for indications of disk IO errors and run a full disk check with smartctl to see if the disk is ok.
This is mega important. This honestly sounds like a much bigger problem than the rsync. If the rsync worked propperly you should be able to see that the backup drive is all good to.
Restore A Backup
If you wish to restore a backup, use the same rsync command that was executed but with the source and destination reversed.
Boot into one of the following things:
A recovery partition; The live CD (or live usb etc) you installed with; The Newest Arch Live ISO; The System Backup that you created.
Mount the partition /sdx (your root partition) that you are recovering to:
# mount /dev/root_partition /mount_pointThen as the wiki says, run the exact same command that you backed up with but in reverse:
# rsync [options] --exclude={/your_exclusions} /path/to/backup /mount_pointDitch the youtube video. If you need to format the drive see the partitioning guide from the Installation Guide
Ensure that the Partitioning you are Formatting is NOT mounted, then run:
# mkfs.ext4 /dev/root_partitionHope this helps.
Last edited by Padsworth (2021-04-10 01:41:52)
Take Care of Your Shoes
Dots
Offline
Thank you both for your responses, I was literally about to wipe the hard drive and reload everything from scratch; however, now I will wait to see if this dialog can figure out what happened.
@Xyne, my layout involves a 500 MB nvme0n1p1 partition which is the EFI system, a 500 MB nvme0n1p3 partition which is a Linux filesystem, and a 952.9 GB nvme0n1p3 partition which is a Linux LVM filesystem that is also encrypted. I did successfully run the command
cryptsetup open --type luks /dev/nvme0n1p3 lvm
to unlock the partition. Next I created a new mount directory mkdir /mnt/bak, then I tried to mount the partition by typing mount /dev/mapper/lvm /mnt/bak and I got the error
mount: /mnt/bak: unknown filesystem type 'LVM2_member'
@Padsworth, I am not bent on restoring from the backup, in fact I am not sure it is a good idea to do so yet. If there is a way to fix this without restoring from the attempt at a backup I would prefer that route.
Last edited by webbja123 (2021-04-10 02:14:05)
Offline
I don't know much about LUKS, but your /dev/mapper/lvm looks like you only have a volume group but no logical volumes.
ls /dev/mapper, plz.
Offline
@AWebb, when I type ls -l /dev/mapper I get the following results
crw---------------1 root root 10, 236 Apr 10 12:04 control
lrwxrwxrwx 1 root root 7 Apr 10 12:04 -> ../dm-0
lrwxrwxrwx 1 root root 7 Apr 10 12:04 volgroup0- lv_home -> ../dm-2
lrwxrwxrwx 1 root root 7 Apr 10 12:04 volgroup0- lv_root -> ../dm-1
Offline