Sujet : Re: Move bookworm system from SSD to NVME
De : news (at) *nospam* druck.org.uk (druck)
Groupes : comp.sys.raspberry-piDate : 16. Aug 2024, 21:34:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9od52$1i2l1$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 16/08/2024 10:04, Jesper wrote:
Now I have the nvme installed and showing in a lsblk command.
Booted from a SD-card and did a few tries to copy the system from SSD to
nvme.
First there was a complaint about the switch "1m". Changed it to "1b"
Arrh, that's asking to copy a single 512 byte block at a time - horribly
in efficient. Try "1M" to copy in 1 MiB chunks.
and got a complaint about missing permission to open SDA (the SSD I want
to copy from). Threw a sudo at it,
Yes you need root permission to write to block devices, given how easy
it is to destroy the filing system on them with an even a slightly
incorrect command.
and it ran for maybe half an hour,
until it stopped with error "writing nvme0n1, No space left on device".
The SSD and the nvme have the same size, and that seems to be a problem.
Bright ideas are welcome :-)
But are they? Just like with SD cards, no two models are exactly the
same size. If it is even a block less dd will complain, check the sizes
using:-
sudo fdisk -l
If it is smaller it can be fixed using the gparted program. Calculate
the size difference in bytes and divide down to MB, then run gparted and
go to source disc (/dev/sda) and resize the last partition (rootfs) to
be X+1 MB smaller. Finish by apply the changes.
You can then do the dd copy again, it will still give the error, but the
copy will be good as it is now only empty space which wont have been
copied over.
You might be asking why don't you just use gparted on the destination
disk which already has everything on it, and shrink the last partition
on that. The answer is it wont like doing anything to a disc where the
partition table says the partition falls off the end of the disc. It is
possible to fix that, but it's easier to do it the way I've said above,
and it avoids any possibility of corrupting files.
---druck