On 27/06/2020 13.05, Simon Becherer wrote:
Hi doug,
Am 27.06.20 um 03:10 schrieb Doug:
--and had no trouble with dual booting, but in this case, the new computer came with no Windows disk or microsoft key, so if I louse it up, there will be a problem getting for this its easy, the windows key is inside the bios of your computer. when running a linux system (maybe live opensuse) you should be able to read it.
I forgot that. ...
and of course, carlos are right, make a backup is best before, if you loose any data, nobody could help if you do not have a backup.
here is a suggestion how to do with dd:
dd ibs=1024 if=/dev/nvme0n1 conv=noerror,sync |pv -s 512110190592| pbzip2 -c > /path/to/your/external/hd/$HOSTNAME.img.bz2
dd= command ibs=1024 inputblocksize (this works fine for my nvme sdd) (to speed up read) (you do not need this command) if=/dev/nvme0n1 = this is the path to your sdd (to backup) you will have to modify conv=noerror,sync = not sure at the moment i !think! this will continue if errors read and make the backup as big as it should without errors (did not repair anything, but let it mountable after this (fills errors with 0 inside backup)) (sorry if not 100% correct explanation, i use my old shell-scripts and forgot the details) |pv -s 512110190592| = pipe it to command "pv" - monitor the progress of data through a pipe the number behind is the size of the input (that 100% will be 100%) if you do not know, use only pv without "-s 1233123123" and for second run take a look of the output from whole command, there you will see something like "input size" (you do not need at all, but the you do not see whats going on)
New command to me :-)
| pbzip2 -c > /path/to/your/external/hd/$HOSTNAME.img.bz2 pipe it to command pbzip2 (parallelbzip2) (a packer who uses bzip2 format (widely used in unix) but the version who uses all cores of your mainprocessor) and save it somewhere with your computershostname. (you do not need to compress, but then the whole command must be a little different, and i personally prefer compressing, because this is the commandline to make at my computer complete full backup before updating)
An alternative is to format the destination disk with btrfs and compression. It is transparent.
your live cd must have installed pv and pbzip2 if not this commandline will fail. i do not know if a live opensuse will have this installed. systemrescuecd will have. https://www.system-rescue-cd.org/
if you have made this backup you will be able to write it with one command line back to exactly this sdd.(or a bigger one, but loosing space) (the commandline i could provide if neccesarry) OR you could extract it as a imagefile (you need some more free space as your original drive has at the moment) and mount to it and extract single files, or use it inside a virtual machine.
of course, normally i would before backup, clean up all empty diskspace with "0" to have a smaller backup'S: for windows you could use this tool: http://technet.microsoft.com/en-us/sysinternals/bb897443 start it inside a konsole sdelete64 -z c: (if 64bit windows if 32 then sdelete -z c: (and other drive letters similar) in linux for all mounted drives do a: cat /dev/zero > /deleteme when error message "no space on disk" (or similar) rm -f /deleteme -> of course this will do a lot of writing what would shorten the livetime of ssd's
An alternative is use clonezilla tools which will try to skip unused sectors - but the resulting image is not mountable. Although I read a claim that they may be loop mountable if using sparse filesystems. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)