Sujet : Re: Move bookworm system from SSD to NVME
De : news (at) *nospam* druck.org.uk (druck)
Groupes : comp.sys.raspberry-piDate : 31. Jul 2024, 21:33:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v8e73l$1o2dm$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 31/07/2024 08:51, Jesper wrote:
My "PC" for most daily use, is a raspi 5 with updated Bookworm, running
on a SSD connected to USB via a SATA-adapter. I am tempted to change to
NVME to get the last bit of latency away.
But what is the easiest way to copy the system to NVME? I see 3
possibilities:
1: Connect SSD and NVME to a Windows PC and use Macrium Reflect to
move the system.
2: Connect NVME to raspi, boot the system from SSD, and somehow copy
the running system to NVME.
3: Connect NVME to raspi, boot from SD-card and copy the system from
SSD to NVME. But how?
It's not Windows, you don't need 3rd party tools to do simple things
such as copying files to new discs, everything you need is provided,
although it may not be obvious what to do.
Option 3 is the best, as both the drives can be connected to the Pi,
booting from an OS image the SD card allows you to perform the copy.
As long as your new NVME is larger than the SSD, you can just do low
level copy with the dd command, then resize the rootfs partition on the
new drive to use any extra space with the gparted program (if not
installed use: apt install gparted).
e.g. dd if=/dev/sda of=/dev/nvme0n1 bs=1M status=progress
Use fdisk -l to find the nvme disk name as it may not be as above.
Alternatively use gparted to create a 512MB FAT boot partition, and the
rest of the drive as a ext4 root partition, then mount them, and copy
files from the boot and root partitions with rsync.
e.g.
mkdir -p /mnt/SSD/boot
mount /dev/sda1 /mnt/SSD/boot
mkdir -p /mnt/SSD/root
mount /dev/sda2 /mnt/SSD/root
mkdir -p /mnt/NVME/boot
mount /dev/nvme0n1p1 /mnt/NVME/boot
mkdir -p /mnt/NVME/root
mount /dev/nvme0n1p2 /mnt/NVME/root
rsync -vax /mnt/SSD/boot/ /mnt/NVME/boot
rsync -vaxHAX /mnt/SSD/root/ /mnt/NVME/root
Make sure you look up what those commands do and have the correct
parameters, rather than just cutting and pasting.
---druck