Sujet : Re: Move bookworm system from SSD to NVME
De : tnp (at) *nospam* invalid.invalid (The Natural Philosopher)
Groupes : comp.sys.raspberry-piDate : 01. Aug 2024, 19:20:51
Autres entêtes
Organisation : A little, after lunch
Message-ID : <v8gjm4$2amvu$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 01/08/2024 18:50, Jesper wrote:
On 01.08.2024 18:10, Ahem A Rivet's Shot wrote:
dd if=/dev/sda of=/dev/nvme0n1 bs=1m
>
The add bs=1m will probably work wonders for performance.
On 01.08.2024 17:47, Jesper wrote:
> raspberrypi@raspberrypi:~ $ df -h | grep ^/dev/
> /dev/sda2 234G 19G 203G 9% /
> /dev/sda1 511M 76M 436M 15% /boot/firmware
> For /dev/sda1 it says "firmware", so it probably should/can not be
> copied, and is permanent on the raspi5-system
The Natural philosopher says to clone both sda1 and sda2. I still wonder if sda1 should be cloned. It is listed as "firmware".
Yes. not only must it be cloned, because it contains instructions as to what patition the linux systren is in, but the linux partiton id must be cloned as wqell and that does not exost ionside the partibin, but on the raw disk
as well so that it has that partition number
That sounds to me
like it is on a flashmemory directly on the raspi5, and you modify it with raspi-config->Advanced options->Boot order.
But I can try running both commands:
dd if=/dev/sda2 of=/dev/nvme0n1 bs=1m
dd if=/dev/sda1 of=/dev/nvme0n1 bs=1m
The second dd will wipe out the first. Dont waste my time, come back when you have demonstrated that it doesn't' work
I've been there and have the T-shirt
That's how I know what you have to do.
/boot in the older release is /boot/firmware in the new.
My Pi4Bookworn SSD that does boot has two partitionb on it
mounted on my desktop they show this
/dev/sdb1 510M 61M 450M 12% /media/leo/bootfs
/dev/sdb2 110G 5.7G 99G 6% /media/leo/rootfs
Bootfs is what gets mounted on /boot/firmware
rootfs is a traditional Linux filesystem
In bootfs the cmdline.txt specifies
/media/leo/bootfs$ more cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=778a9e44-02 rootfstype=ext4 fsck.repair=yes rootwait noswap=1
So that specifies the PARTUUID of the partition that *must* be mounted as root
That PARTUUIDs are shown a s follows
eo@Juliet:/media/leo/bootfs$ sudo blkid /dev/sdb
/dev/sdb: PTUUID="778a9e44" PTTYPE="dos"
leo@Juliet:/media/leo/bootfs$ sudo blkid /dev/sdb1
/dev/sdb1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="5DF9-E225" TYPE="vfat" PARTUUID="778a9e44-01"
leo@Juliet:/media/leo/bootfs$ sudo blkid /dev/sdb2
/dev/sdb2: LABEL="rootfs" UUID="3b614a3f-4a65-4480-876a-8a998e01ac9b" TYPE="ext4" PARTUUID="778a9e44-02"
The partition IDs are not stored on the partitions, but in the partition table. This is why you have to clone the whole disk, to clone that partition table as well.
After booting linux will mount the original bootfs on /boot/firmware (it used to be /boot pirior to bookworm) and the partuuid specified in cmdline.txt as the root partition
The bootfs will be re-mounted according to what is in fstab
/etc$ more fstab
proc /proc proc defaults 0 0
PARTUUID=778a9e44-01 /boot/firmware vfat defaults 0 2
PARTUUID=778a9e44-02 / ext4 defaults,noatime 0 1
All these ducks have to be lined up in a row or the bloody thing will not boot
-- Climate Change: Socialism wearing a lab coat.