Sujet : Re: Move bookworm system from SSD to NVME
De : tnp (at) *nospam* invalid.invalid (The Natural Philosopher)
Groupes : comp.sys.raspberry-piDate : 02. Aug 2024, 07:05:21
Autres entêtes
Organisation : A little, after lunch
Message-ID : <v8hsv2$2m326$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 01/08/2024 20:02, Jesper wrote:
On 01.08.2024 20:29, Ahem A Rivet's Shot wrote:
On Thu, 1 Aug 2024 19:50:20 +0200
Jesper <Vitsky.kasperski@gmail.com> wrote:
>
But I can try running both commands:
dd if=/dev/sda2 of=/dev/nvme0n1 bs=1m
>
This will copy sda2 to nvme0n1
>
dd if=/dev/sda1 of=/dev/nvme0n1 bs=1m
>
This will overwrite that copy with sda1. You would probably be
better off cloning sda as a whole - that will get all partitions, boot
sectors etc.
>
Yes, that's also what The Natural Philosopher says in his reply. And I know that you both of course are right.
But I still do not know what a command that clones both sda1 and sda2 to NVME should look like. Please?
When I run ls /media i get this:
raspberrypi@raspberrypi:~ $ ls /media
raspberrypi
Could this work to clone the whole disc:
dd if=/dev/raspberrypi of=/dev/nvme0n1 bs=1m
Best regards
Something like that. But..
In *nix the whole disk is normally given at connection time a device name like /dev/sda
whereas its *partitions* would be /dev/sda1, /dev/sda2 etc etc.
when its mounted under /media it may have another name.
The mount command will show what devices you have and where they are mounted.
So with the disks attached try
mount | grep '^/dev'
To identify the device name.
E.g. when I use the above command on as USB attached raspberry PI bootable drive on my desktop machine I get this:
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb1 on /media/leo/bootfs type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/sdb2 on /media/leo/rootfs type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)
This shows that the actual PC is running off /dev/sda. but the Pi disk has been given the name /dev/sdb
The fact that its been automounted on /media is irrelevant You can only mount *partitions* but you want the whole disk - in this case /dev/sdb2
-- The higher up the mountainsideThe greener grows the grass.The higher up the monkey climbsThe more he shows his arse.Traditional