Hi Peter,

> I didn't know that you should do each partition individually.

fsck(8) stands for filesystem check and with each partition holding one
filesystem, it needs to run on each partition=filesystem.

> I'm trying Deans suggestion to catch an image and clone it, but not
> successfully so far.

Try these commands, pasting one at a time and checking for no errors.
I don't think I've messed up, but I haven't tried them so you should
have a read first.  In particular, you don't want dd's conv=noerror
suggested at
https://wiki.archlinux.org/index.php/Dd#Cloning_an_entire_hard_disk
As normal, specifying the wrong device can trample your main hard disk
so `measure twice', and then again.

    src=/dev/sdb # Change as appropriate.  Disk, not partition.
    img=${src//\//_}
    img=${img#_}.img
    devbs=$(stat -fc %s $src)
    echo copy $src to $img using multiple of $devbs bytes

    sudo dd if=$src bs=$((devbs * 32)) of=$img

    dest=/dev/sdc # Change as appropriate.  Disk, not partition.
    devbs=$(stat -fc %s $dest)
    echo copy $img to $dest using multiple of $devbs bytes

    sudo dd if=$img bs=$((devbs * 32)) of=$dest

    sync # Vital.  Don't remove media until it's finished.

Cheers, Ralph.

--
  Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-12-04 20:00
  Check if you're replying to the list or the author
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to