You are not logged in.
I have an arch-system running from a simple usb-stick (using ext2 file system).
I wanted to make a copy of it using f2fs-files system. So I copied the files, created directories like dev, sys, proc .
Chrooting into the new system and using pacman, with any package I tried this happens:
pacman -Su
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (1) glslang-7.10.2984-1
Total Installed Size: 11.66 MiB
Net Upgrade Size: 0.28 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
Illegal instruction (core dumped)
Whereas this works from outside the system:
# pacstrap /mnt/sdb1 -u
==> Creating install root at /mnt/sdb1
==> Installing packages to /mnt/sdb1
:: Synchronising package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (1) glslang-7.10.2984-1
Total Installed Size: 11.66 MiB
Net Upgrade Size: 0.28 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes...
(1/1) upgrading glslang [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
The installation of a kernel fails like this:
pacstrap /mnt/sdb1 linux
==> Creating install root at /mnt/sdb1
==> Installing packages to /mnt/sdb1
:: Synchronising package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: linux is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n]
warning: linux-4.19.4.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-4.19.4.arch1-1
Total Installed Size: 71.31 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [########################################] 100%
(1/1) checking package integrity [########################################] 100%
(1/1) loading package files [########################################] 100%
(1/1) checking for file conflicts [########################################] 100%
(1/1) checking available disk space [########################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
:: Processing package changes...
(1/1) reinstalling linux [########################################] 100%
:: Running post-transaction hooks...
(1/4) Updating linux module dependencies...
error: command terminated by signal 4: Illegal instruction
(2/4) Install DKMS modules
(3/4) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.19.4-arch1-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [block]
/usr/lib/initcpio/functions: line 356: 2390 Illegal instruction (core dumped) modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2> /dev/null
/usr/lib/initcpio/functions: line 356: 2394 Illegal instruction (core dumped) modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2> /dev/null
/usr/lib/initcpio/functions: line 356: 2402 Illegal instruction (core dumped) modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2> /dev/null
/usr/lib/initcpio/functions: line 356: 2412 Illegal instruction (core dumped) modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2> /dev/null
/usr/lib/initcpio/functions: line 356: 2420 Illegal instruction (core dumped) modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2> /dev/null
/usr/lib/initcpio/functions: line 356: 2431 Illegal instruction (core dumped) modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2> /dev/null
...
Since I could run "pacman -Syu" in the chroot-system, I updated the whole system with "pacstrap /mn/sdb1 -u" - so I guess everything is up to date on the host machine and the chroot-system.
Last edited by bernd_b (2018-12-30 16:53:45)
Offline
Usingf2fs will not IMHO improve anything for modern SSD or USB key that have wear leveling controller that handles the flash rather well. F2FS would be useful if you access the flash directly which is not possible with usual hardware.
Anyway, I suspect you did not copy the files correctly; which has led to a corrupted system. If you want to transfer a whole installation by copying files, you can only do so properly outside the running system (for example from a boot disk). You should certainly not simply copy / from the running system because other directories are mounted under subdirectories of / (for example /proc, etc.). You could somehow see the underlying root filesystem only under /mnt/thing with a command like this:
mount --bind / /mnt/thing
but it is still preferable to copy the files from a non-running system. You should not create any directories by hand, the required /proc, /sys, etc. are already present with the good attribute on the original file system.
You should also be careful to copy all meta information in the files; I remember I had problems with "cp -a" that did not handle capabilities. I use
rsync --archive --xattrs --acls --sparse --hard-links /mnt/orig/. /mnt/copy
which I believe preserve all meta information.
Last edited by olive (2018-12-11 18:25:03)
Offline
Thanks for clarification. I left out directories like /proc, sys etc, but yes, I copied the files from the system which was running. And I made the proc, sys etc files manually on the target device.
I will follow you advice with concluding, that the long way wil be the shortest in the end: I'll do a fresh install.
Offline
Again I was on the wrong track: I guess the file system of the source arch installation must have been corrupted.
I did a clean new install on a f2fs-Partion with and got it booted with the help of grub-git from aur (because f2fs is still not supported by the stable version of grub in the arch repo).
I could clone this one easily using file copy .
Assuming the source usb stick is mounted on /mnt/sdb1 and the target stick is mounted on /mnt/sdc1 I did
cd /mnt/sdb1
cp -a bin dev lib lib64 mnt proc root run sbin srv sys tmp /mnt/sdc1/
cp -a -v boot etc home opt usr var /mnt/sdc1/
Now I can easily do
arch-chroot /mnt/sdc1
and install the bootloader, e.g.
grub-install --target=i386-pc /dev/sdc
grub-mkconfig
I did a manual edit of the /boot/grub/grub.cfg file, because the grub-mkconfig way didn't work for me. My one looks like:
set timeout=5
set default=0
menuentry "Arch linux" {
linux /boot/vmlinuz-linux root=LABEL=root_home rw rootdelay=30 net.ifnames=0 fsck.mode=force
initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}
Of course you should be able to use UUID instead of LABEL depending how you create your file system and of you provided a LABEL to it (I used "root_home") Further examples in the wiki are a little bid hidden, see Draft of grub wiki page by user Eschwartz
Last edited by bernd_b (2019-09-03 19:36:29)
Offline