You are not logged in.

#1 2024-04-05 08:48:37

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

[Resolved] Migrating installation to ssd with rsync transfer errors

I recently bought a larger ssd for my laptop and have been attempting to transfer my current installation to it. I have been following the wiki guide here but it has not been transferring correctly. I am using the "top to bottom" approach to transfer my entire system rather than just the packages, as shown in the "bottom to top" approach. To do this, I backed up my installation to an external hdd with this command in the arch live environment:

# rsync -aAXHv --exclude='/dev/*' --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*' --exclude='/run/*' --exclude='/mnt/*' --exclude='/media/*' --exclude='/lost+found/' / /path/to/backup

as instructed here. The backup was completed without errors. After installing the new ssd, I followed the first portion of the standard installation guide until it was time to arch-chroot into /mnt. The partitions on this new ssd are much larger than the ones on my previous installation, so I intended to change the /etc/fstab before booting into the new system. Notably, the root partition on the new ssd is written as "Linux root (x86-64)," whereas on the old ssd it was simply "Linux filesystem." I'm not sure if this is a factor in the transfer errors as the first article I linked said to:

Create new partitions and file systems on the new drive. You can use the opportunity to choose a different partition layout and/or file systems than before.

In order to transfer over my system, I chrooted into the root partition and mounted the external hdd at /mnt. I then ran the same command used for backup, but with the source and destination directories reversed. I made sure to leave the trailing "/" at the end of the source directory as instructed for rsync. This command and this command both returned the same error:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1336) [sender=3.2.7]

The latter command outputted the following errors:

rsync: [receiver] rsync_xal_set: lsetattr("/etc/.fstab.Xb0cuB","$LXGID") failed: Operation not supported (95)
rsync: [receiver] rsync_xal_set: lsetattr("/etc/.fstab.Xb0cuB","$LXMOD") failed: Operation not supported (95)
rsync: [receiver] rsync_xal_set: lsetattr("/etc/.fstab.Xb0cuB","$LXUID") failed: Operation not supported (95)
rsync: [receiver] rename "/etc/.resolv.conf.Bo4LOz" -> "etc/resolv.conf": Device or resource busy (16)
rsync: [generator] failed to set times on "/sys": Read-only file system (30)
rsync: [receiver] rsync_xal_set: lsetattr("/srv/deluge/Downloads","$LXGID") failed: Operation not supported (95)
rsync: [receiver] rsync_xal_set: lsetattr("/srv/deluge/Downloads","$LXMOD") failed: Operation not supported (95)
rsync: [receiver] rsync_xal_set: lsetattr("/srv/deluge/Downloads","$LXUID") failed: Operation not supported (95)

For clarity, I rewrote the partitions between running each command. I wasn't too concerned with these files not transferring correctly as they seemed like something that could be adjusted after the transfer was complete. However, I am now unable to use any commands in /usr/bin/ including "ls," "grep," and "rsync" itself. When I exit the chroot and run these command from root@archiso, they work fine, but I am then unable to chroot back into /mnt. It outputs:

chroot: failed to run command □/bin/bash□: Not a directory

The blocks are part of the output. Apologies for the lengthy post, but does anyone know what I should try next? Am I misunderstanding any of the steps? Should I just try to the "bottom to top" approach and transfer over all my other files manually? Thanks!

Last edited by babel_f1sh (2024-04-05 21:04:14)

Offline

#2 2024-04-05 09:00:47

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 217

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

In order to transfer over my system, I chrooted into the root partition and mounted the external hdd at /mnt.

Don't panic. Perform all steps without chroot. Leave /etc/fstab without changes before restore backup. After you will perform restore backup - then will be time to CHROOT, adjust /etc/fstab, reinstall bootloader and just in case rebuild kernel images, mkinitcpio -P.

Offline

#3 2024-04-05 09:05:34

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

Fixxer wrote:

Don't panic. Perform all steps without chroot. Leave /etc/fstab without changes before restore backup. After you will perform restore backup - then will be time to CHROOT, adjust /etc/fstab, reinstall bootloader and just in case rebuild kernel images, mkinitcpio -P.

Understood, do I need to mount my external hdd somewhere in order to transfer the files to the root partition? If so, where should I mount it? Obviously, /mnt is already taken.

Last edited by babel_f1sh (2024-04-05 09:30:57)

Offline

#4 2024-04-05 09:21:11

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 217

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

I've been migrating my all installation three days ago.

Umount all partitions, check results.

When Arch Linux live image is running (or whatever another systemd and uefi capable distribution), go to /mnt/ directory.

Create mountpoint:

mkdir -p /mnt/backup
mkdir -p /mnt/newarch
mkdir -p /mnt/newarch/boot

In example mountpoint /mnt/newarch/boot depends what is your EFI partition (if present) mountpoint on the ORIGINAL system, may be /boot/efi, /efi, etc (wiki).

If you have separated /home, mounted at /home, you have to also create:

mkdir -p /mnt/newarch/home

Mount backup to /mnt/backup, mount 2 or 3 destination partitions to /mnt/newarch - root partition first, then efi, then home.

Perform backup - may be without exclusions - excluded files are not present in backup:

rsync -aAXHv /mnt/backup/ /mnt/newarch/

How to manually perform chroot?

for i in /proc /sys /dev /dev/pts; do mount -B $i /mnt/newarch$i; done
mount -t efivarfs /sys/firmware/efi/efivars /mnt/newarch/sys/firmware/efi/efivars

Then log in to system on disk (shell depends on shell you are using):

chroot /mnt/newarch /bin/bash

Then perform all latter steps, exit from chrooted system and umount all stuff:

exit
umount -vR /mnt/newarch

Good luck! big_smile

Last edited by Fixxer (2024-04-05 09:33:36)

Offline

#5 2024-04-05 09:23:50

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

babel_f1sh wrote:

do I need to mount my external hdd somewhere in order to transfer the files to the root partition. If so, where should I mount it? Obviously, /mnt is already taken.

simply create two new mountpoins with nice names in the arch iso environment, e.g.
/mnt_int     --> internal drive
/mnt_ext    ---> external backup
so you get not confused with source / target, when you restore with rsync.

Last edited by ua4000 (2024-04-05 09:24:45)

Offline

#6 2024-04-05 18:10:32

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

ua4000 wrote:

simply create two new mountpoins with nice names in the arch iso environment, e.g.
/mnt_int     --> internal drive
/mnt_ext    ---> external backup
so you get not confused with source / target, when you restore with rsync.

This process worked for me and my backup transferred with no errors. However, now that I am able to boot into the system, I am unable to login. I have tried changing my user password and root password in the live environment (chrooted) but neither will work. I have double checked that my keyboard layout is correct and that my user is recognized by the system. Any suggestions for what I can try next?

Offline

#7 2024-04-05 18:42:36

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 217

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

If you are logged in TTY as root user, check output of lastb command:

lastb

What desktop environment and probably display manager? Check logs for display manager, eg.

journalctl -q -b -u sddm

Offline

#8 2024-04-05 18:52:54

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

Fixxer wrote:

If you are logged in TTY as root user, check output of lastb command:

lastb

What desktop environment and probably display manager? Check logs for display manager, eg.

journalctl -q -b -u sddm

It will not allow me to login to the TTY. I'm not using any display manager or DE, just tty and awesome window manager. I normally login to tty and then run startx to boot into awesome. I will try running these commands from chroot, but I am unable to enter tty with my user and root accounts. I have run pacman -Syu and mkinitcpio -P in chroot as well. When initially running the latter, it gave me permission warnings for certain directories in /usr. I no longer have these warnings though so I don't think that was the issue. Also, when rebooting or shutting down from the live environment, it will not do so automatically. It hangs after "Reached target System Power Off." I have forced it to shut down by holding the power button but I'm not sure if that's relevant.

Last edited by babel_f1sh (2024-04-05 19:20:44)

Offline

#9 2024-04-05 18:56:43

Fixxer
Member
From: Poland
Registered: 2011-08-29
Posts: 217

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

Ok, then when you are in chroot, check logs - as root (first for errors, next only warnings):

journalctl -q -b -p 3
journalctl -q -b -p 4..4

Offline

#10 2024-04-05 19:06:21

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

Fixxer wrote:

Ok, then when you are in chroot, check logs - as root (first for errors, next only warnings):

journalctl -q -b -p 3
journalctl -q -b -p 4..4

Neither of these commands returned an output.

Offline

#11 2024-04-05 19:11:01

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

Neither of these commands returned an output.

Additionally, the last journalctl entry is from before I transferred to the new ssd.

lastb -s 2024-04-01

outputs the login attempts but does not give me any additional info. After the date and time it outputs (00:00).

Last edited by babel_f1sh (2024-04-05 19:14:47)

Offline

#12 2024-04-05 21:02:28

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

I am going to mark this thread as resolved and start a new one as my current issue is not related to the title. Thank you Fixxer and ua4000!

Last edited by babel_f1sh (2024-04-05 22:26:23)

Offline

#13 2024-04-06 01:14:42

babel_f1sh
Member
Registered: 2023-09-28
Posts: 31

Re: [Resolved] Migrating installation to ssd with rsync transfer errors

I found the solution to my second issue as well, posted here (#14).

Last edited by babel_f1sh (2024-04-10 05:25:54)

Offline

Board footer

Powered by FluxBB