• Re: Move bookworm system from SSD to NVME

    From The Natural Philosopher@21:1/5 to Jesper on Fri Aug 16 11:40:02 2024
    On 16/08/2024 10:04, Jesper wrote:
    On 01.08.2024 21:38, Björn Lundin wrote:
    On 2024-08-01 21: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 still do not know what a command that clones both sda1 and sda2
    to NVME should look like. Please?

    Really? It is given to you more than once

    dd if=/dev/sda of=/dev/nvme0n1 bs=1m


    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"
    and got a complaint about missing permission to open SDA (the SSD I want
    to copy from). Threw a sudo at it, 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 :-)

    Below I have copied in what happend in the command line: raspberrypi@raspberrypi:~ $ lsblk
    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS sda           8:0    0 238.5G  0 disk
    ├─sda1        8:1    0   512M  0 part /media/raspberrypi/bootfs
    └─sda2        8:2    0   238G  0 part /media/raspberrypi/rootfs
    mmcblk0     179:0    0    58G  0 disk
    ├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware └─mmcblk0p2 179:2    0  57.5G  0 part /
    nvme0n1     259:0    0 238.5G  0 disk
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1 bs=1m
    dd: invalid number: ‘1m’
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: failed to open '/dev/sda': Permission denied
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1
    dd: failed to open '/dev/sda': Permission denied
    raspberrypi@raspberrypi:~ $ sudo dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: error writing '/nvme0n1': No space left on device
    107929249+0 records in
    107929248+0 records out
    55259774976 bytes (55 GB, 51 GiB) copied, 1476.65 s, 37.4 MB/s raspberrypi@raspberrypi:~

    Best regards

    WTF is '/nvme0n1' ?

    It looks like you have created a file in the root directory of the
    device you are copying from....




    --
    "Nature does not give up the winter because people dislike the cold."

    ― Confucius

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Jesper on Fri Aug 16 12:23:19 2024
    On 16/08/2024 12:19, Jesper wrote:
    On 16.08.2024 12:40, The Natural Philosopher wrote:
    On 16/08/2024 10:04, Jesper wrote:
    On 01.08.2024 21:38, Björn Lundin wrote:
    On 2024-08-01 21: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 still do not know what a command that clones both sda1 and
    sda2 to NVME should look like. Please?

    Really? It is given to you more than once

    dd if=/dev/sda of=/dev/nvme0n1 bs=1m


    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"
    and got a complaint about missing permission to open SDA (the SSD I
    want to copy from). Threw a sudo at it, 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 :-)

    Below I have copied in what happend in the command line:
    raspberrypi@raspberrypi:~ $ lsblk
    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
    sda           8:0    0 238.5G  0 disk
    ├─sda1        8:1    0   512M  0 part /media/raspberrypi/bootfs
    └─sda2        8:2    0   238G  0 part /media/raspberrypi/rootfs
    mmcblk0     179:0    0    58G  0 disk
    ├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware
    └─mmcblk0p2 179:2    0  57.5G  0 part /
    nvme0n1     259:0    0 238.5G  0 disk
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1 bs=1m
    dd: invalid number: ‘1m’
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: failed to open '/dev/sda': Permission denied
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1
    dd: failed to open '/dev/sda': Permission denied
    raspberrypi@raspberrypi:~ $ sudo dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: error writing '/nvme0n1': No space left on device
    107929249+0 records in
    107929248+0 records out
    55259774976 bytes (55 GB, 51 GiB) copied, 1476.65 s, 37.4 MB/s
    raspberrypi@raspberrypi:~

    Best regards

    Thank you for the reply.
    WTF is '/nvme0n1' ?
    "nvme0n1" is the "fucking" NVME I have installed in the raspi5.

    Not as far as dd is concerned.
    What does the outpout of
    ls /n*
    and
    ls /dev/n*
    show?



    It looks like you have created a file in the root directory of the
    device you are copying from....
    I see no trace of the new file you are referring to.

    Somehow that does not surprise me

    Best regards



    --
    The higher up the mountainside
    The greener grows the grass.
    The higher up the monkey climbs
    The more he shows his arse.

    Traditional

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Jesper on Fri Aug 16 13:50:55 2024
    On 16/08/2024 12:52, Jesper wrote:
    On 16.08.2024 13:23, The Natural Philosopher wrote:
    On 16/08/2024 12:19, Jesper wrote:
    On 16.08.2024 12:40, The Natural Philosopher wrote:
    On 16/08/2024 10:04, Jesper wrote:
    On 01.08.2024 21:38, Björn Lundin wrote:
    On 2024-08-01 21: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 still do not know what a command that clones both sda1 and >>>>>>> sda2 to NVME should look like. Please?

    Really? It is given to you more than once

    dd if=/dev/sda of=/dev/nvme0n1 bs=1m


    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" and got a complaint about missing permission to open SDA (the
    SSD I want to copy from). Threw a sudo at it, 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 :-)

    Below I have copied in what happend in the command line:
    raspberrypi@raspberrypi:~ $ lsblk
    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
    sda           8:0    0 238.5G  0 disk
    ├─sda1        8:1    0   512M  0 part /media/raspberrypi/bootfs
    └─sda2        8:2    0   238G  0 part /media/raspberrypi/rootfs
    mmcblk0     179:0    0    58G  0 disk
    ├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware
    └─mmcblk0p2 179:2    0  57.5G  0 part /
    nvme0n1     259:0    0 238.5G  0 disk
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1 bs=1m
    dd: invalid number: ‘1m’
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: failed to open '/dev/sda': Permission denied
    raspberrypi@raspberrypi:~ $ dd if=/dev/sda of=/nvme0n1
    dd: failed to open '/dev/sda': Permission denied
    raspberrypi@raspberrypi:~ $ sudo dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: error writing '/nvme0n1': No space left on device
    107929249+0 records in
    107929248+0 records out
    55259774976 bytes (55 GB, 51 GiB) copied, 1476.65 s, 37.4 MB/s
    raspberrypi@raspberrypi:~

    Best regards

    Thank you for the reply.
    WTF is '/nvme0n1' ?
    "nvme0n1" is the "fucking" NVME I have installed in the raspi5.

    Not as far as dd is concerned.
    What does the outpout of
    ls /n*
    raspberrypi@raspberrypi:~ $ ls /n*
    ls: klarte ikke å åpne '/n*': Ingen slik fil eller filkatalog
    It means "Could not open /n*. No such file or catalog"

    So there is no '/nvme0n1' to copy to is there?
    IT ISN'T your NVM.

    and
    ls /dev/n*
    show?
    raspberrypi@raspberrypi:~ $ ls /dev/n*
    /dev/ng0n1  /dev/null  /dev/nvme0  /dev/nvme0n1


    Right. so the draw device ce is /dev/nvme0

    So try

    sudo dd if=/dev/sda of=/dev/nvme0 bs=1M


    Note:
    /dev/nvme0 NOT /nvme0n1
    1M not 1m.






    --
    “Some people like to travel by train because it combines the slowness of
    a car with the cramped public exposure of 
an airplane.”

    Dennis Miller

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ahem A Rivet's Shot@21:1/5 to Jesper on Fri Aug 16 13:46:36 2024
    On Fri, 16 Aug 2024 11:04:26 +0200
    Jesper <Vitsky.kasperski@gmail.com> wrote:

    raspberrypi@raspberrypi:~ $ sudo dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: error writing '/nvme0n1': No space left on device

    Your command is missing a /dev it should be:

    sudo dd if=/dev/sda of=/dev/nvme0n1 bs=1b
    _______________________^^^^^

    The "no space on device" error comes because without the /dev dd is attempting to write a file called nvme0n1 in / but since / runs out of
    space before it finishes the file is never closed and thus no directory
    entry is written which is why yuou never see it.

    Also I don't think bs=1b is likely to be a good blocksize (1
    byte). If the version of dd you're using doesn't support bs=1m then try bs=1024k or be=1048576. The idea is to get it to use the largest block size (and thus writes) that the data path will support.

    --
    Steve O'Hara-Smith
    Odds and Ends at http://www.sohara.org/
    For forms of government let fools contest
    Whate're is best administered is best - Alexander Pope

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Ahem A Rivet's Shot on Fri Aug 16 14:17:04 2024
    On 16/08/2024 13:46, Ahem A Rivet's Shot wrote:
    On Fri, 16 Aug 2024 11:04:26 +0200
    Jesper <Vitsky.kasperski@gmail.com> wrote:

    raspberrypi@raspberrypi:~ $ sudo dd if=/dev/sda of=/nvme0n1 bs=1b
    dd: error writing '/nvme0n1': No space left on device

    Your command is missing a /dev it should be:

    sudo dd if=/dev/sda of=/dev/nvme0n1 bs=1b

    No. Again 2 things wroing.

    /dev/nvme0 is the RAW device.

    bs=1M is correct for decent transfer rate



    The "no space on device" error comes because without the /dev dd is attempting to write a file called nvme0n1 in / but since / runs out of
    space before it finishes the file is never closed and thus no directory
    entry is written which is why yuou never see it.

    Also I don't think bs=1b is likely to be a good blocksize (1
    byte). If the version of dd you're using doesn't support bs=1m then try bs=1024k or be=1048576. The idea is to get it to use the largest block size (and thus writes) that the data path will support.

    bs=1M is sensible.

    1Mib.

    --
    Renewable energy: Expensive solutions that don't work to a problem that
    doesn't exist instituted by self legalising protection rackets that
    don't protect, masquerading as public servants who don't serve the public.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From druck@21:1/5 to All on Fri Aug 16 21:34:42 2024
    T24gMTYvMDgvMjAyNCAxMDowNCwgSmVzcGVyIHdyb3RlOg0KPiBOb3cgSSBoYXZlIHRoZSBu dm1lIGluc3RhbGxlZCBhbmQgc2hvd2luZyBpbiBhIGxzYmxrIGNvbW1hbmQuDQo+IEJvb3Rl ZCBmcm9tIGEgU0QtY2FyZCBhbmQgZGlkIGEgZmV3IHRyaWVzIHRvIGNvcHkgdGhlIHN5c3Rl bSBmcm9tIFNTRCB0byANCj4gbnZtZS4NCj4gRmlyc3QgdGhlcmUgd2FzIGEgY29tcGxhaW50 IGFib3V0IHRoZSBzd2l0Y2ggIjFtIi4gQ2hhbmdlZCBpdCB0byAiMWIiIA0KDQpBcnJoLCB0 aGF0J3MgYXNraW5nIHRvIGNvcHkgYSBzaW5nbGUgNTEyIGJ5dGUgYmxvY2sgYXQgYSB0aW1l IC0gaG9ycmlibHkgDQppbiBlZmZpY2llbnQuIFRyeSAiMU0iIHRvIGNvcHkgaW4gMSBNaUIg Y2h1bmtzLg0KDQo+IGFuZCBnb3QgYSBjb21wbGFpbnQgYWJvdXQgbWlzc2luZyBwZXJtaXNz aW9uIHRvIG9wZW4gU0RBICh0aGUgU1NEIEkgd2FudCANCj4gdG8gY29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UgbGFzdCBwYXJ0aXRpb24gKHJvb3RmcykgdG8gDQpi ZSBYKzEgTUIgc21hbGxlci4gRmluaXNoIGJ5IGFwcGx5IHRoZSBjaGFuZ2VzLg0KDQpZb3Ug Y2FuIHRoZW4gZG8gdGhlIGRkIGNvcHkgYWdhaW4sIGl0IHdpbGwgc3RpbGwgZ2l2ZSB0aGUg ZXJyb3IsIGJ1dCB0aGUgDQpjb3B5IHdpbGwgYmUgZ29vZCBhcyBpdCBpcyBub3cgb25seSBl bXB0eSBzcGFjZSB3aGljaCB3b250IGhhdmUgYmVlbiANCmNvcGllZCBvdmVyLg0KDQpZb3Ug bWlnaHQgYmUgYXNraW5nIHdoeSBkb24ndCB5b3UganVzdCB1c2UgZ3BhcnRlZCBvbiB0aGUg ZGVzdGluYXRpb24gDQpkaXNrIHdoaWNoIGFscmVhZHkgaGFzIGV2ZXJ5dGhpbmcgb24gaXQs IGFuZCBzaHJpbmsgdGhlIGxhc3QgcGFydGl0aW9uIA0Kb24gdGhhdC4gVGhlIGFuc3dlciBp cyBpdCB3b250IGxpa2UgZG9pbmcgYW55dGhpbmcgdG8gYSBkaXNjIHdoZXJlIHRoZSANCnBh cnRpdGlvbiB0YWJsZSBzYXlzIHRoZSBwYXJ0aXRpb24gZmFsbHMgb2ZmIHRoZSBlbmQgb2Yg dGhlIGRpc2MuIEl0IGlzIA0KcG9zc2libGUgdG8gZml4IHRoYXQsIGJ1dCBpdCdzIGVhc2ll ciB0byBkbyBpdCB0aGUgd2F5IEkndmUgc2FpZCBhYm92ZSwgDQphbmQgaXQgYXZvaWRzIGFu eSBwb3NzaWJpbGl0eSBvZiBjb3JydXB0aW5nIGZpbGVzLg0KDQotLS1kcnVjaw0KDQo=

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to druck on Sat Aug 17 05:45:32 2024
    On Fri, 16 Aug 2024 21:34:42 +0100, druck wrote:

    On 16/08/2024 10:04, Jesper wrote:

    The SSD and the nvme have the same size ...

    But are they?

    This is why rsync is so much easier.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)