You are not logged in.

#1 2021-04-09 17:28:58

webbja123
Member
Registered: 2021-03-31
Posts: 23

rsync appears to have disabled my bootable drive. How do I fix this

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

#2 2021-04-10 00:38:28

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: rsync appears to have disabled my bootable drive. How do I fix this

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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2021-04-10 00:40:39

Padsworth
Member
Registered: 2021-02-23
Posts: 11

Re: rsync appears to have disabled my bootable drive. How do I fix this

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.

From the Arch WIKI:

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_point

Then 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_point

Ditch 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_partition

Hope this helps.

Last edited by Padsworth (2021-04-10 01:41:52)


Take Care of Your Shoes
Dots

Offline

#4 2021-04-10 01:56:01

webbja123
Member
Registered: 2021-03-31
Posts: 23

Re: rsync appears to have disabled my bootable drive. How do I fix this

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

#5 2021-04-10 05:26:58

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: rsync appears to have disabled my bootable drive. How do I fix this

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

#6 2021-04-10 15:10:07

webbja123
Member
Registered: 2021-03-31
Posts: 23

Re: rsync appears to have disabled my bootable drive. How do I fix this

@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

Board footer

Powered by FluxBB