TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MIKE SCOTT
from: CHRIS ELVIDGE
date: 2019-10-23 11:44:00
subject: Re: problem moving root t

On 22/10/2019 16:12, Mike Scott wrote:
> Hi all, I'm stumped with this one.
>
> I've got a running raspbian system: the root partition is on the SD
> card, while everything else is on various partitions on a connected hard
> drive.
>
> The hard drive has a spare partition, sda3, and I've rsync'ed root from
> the SD card onto that.
>
> I've changed cmdline.txt to reflect the moved root partition:
>
> original:
> console=...... root=PARTUUID=6c586e13-02 .....
> new:
> console=s.... root=PARTUUID=b9a242b4-1890-4c02-808b-36961834b2f6 ...
>
> and fstab (in both the new and old /etc directories)
> original:
> PARTUUID=6c586e13-02  /               ext4    defaults,noatime  0       1
> new:
> PARTUUID=b9a242b4-1890-4c02-808b-36961834b2f6  /               ext4
> defaults,noatime  0       1
>
> The system tries to start up off sda3, and gets as far as running
> /sbin/init. But then it complains about various library files not
> loading, starting with:
>
> ERROR: ld.so object
> '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from
> /etc/ld.so.preload cannot be preloaded (cannot open shared object file):
> ignored
>
> (I had to video the console to get that :-)
>
> followed by a kernel panic.
>
> I know the libarmmem*.so files are there, as it still boots off the SD
> card when I restore the original cmdline/fstab files.
>
> AFAICS what I've done reflects various how-to's off the web. But
> something's amiss, clearly. Any help would be appreciated, thanks.
>
>
>

Try redoing your rsync from /dev/mmcblk0p2 (root partition) to /dev/sda3
(new root partition) with -avx (x = don't cross filesystem boundaries;
this will ignore things like /boot, /proc, /dev)
I.e mount /dev/sda3 on (e.g.) /mnt
Then "rsync -avx / /mnt/" (as root)

My cmdline.txt now looks like (note this is all one line and I use btrfs
on the new root partition):
# cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1
root=PARTUUID=5cf6b9c2-9894-cd47-933e-ad3840ae4e5c rootfstype=btrfs
elevator=deadline fsck.repair=yes rootwait quiet splash
plymouth.ignore-serial-consoles net.ifnames=0 biosdevname=0
usbhid.mousepoll=0

Don't change the original /etc/fstab file (the one on /dev/mmcblk0p2).

This is on a RPi3+, boot on /dev/mmcblk0p1, root on /dev/sda2

--

Chris Elvidge, England

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.