Thursday, May 2, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 20296  / 3 Years ago, tue, july 20, 2021, 2:10:10

this is the output of sudo fdisk -l:



ubuntu@PrecisePangolin:~$ sudo fdisk -l

Disk /dev/sda: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders, total 321672960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x886f6824

Device Boot Start End Blocks Id System
/dev/sda1 * 63 116117819 58058878+ 7 HPFS/NTFS/exFAT
/dev/sda2 116119550 319580159 101730305 f W95 Ext'd (LBA)
/dev/sda4 319580160 321671151 1045496 82 Linux swap / Solaris
/dev/sda5 116119552 237807608 60844028+ 7 HPFS/NTFS/exFAT
/dev/sda6 237807616 319580159 40886272 83 Linux

Disk /dev/sdc: 2000 MB, 2000682496 bytes
255 heads, 63 sectors/track, 243 cylinders, total 3907583 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x01fd25ac

Device Boot Start End Blocks Id System
/dev/sdc1 * 63 3907582 1953760 c W95 FAT32 (LBA)
ubuntu@PrecisePangolin:~$


I tried those two commands:



sudo ddrescue -r 3 /dev/sdc /dev/sda/ImageFileName.img /dev/sda/TextFileName.txt

sudo ddrescue -r 3 /dev/sdc /dev/sda6/ImageFileName.img /dev/sda6/TextFileName.txt


and got:



ddrescue: Can't open output file: Not a directory


and in other tryings I got:



ddrescue: Can't open input file: No such file or directory


where is my mistake? thanks!



if you need any more deatails i can give. any suggestion that my help is appreciated.


More From » partitioning

 Answers
6

You are attempting to write the image (and log) directly to the disk device, instead of a path on the filesystem. You should use something like this (which would put it in your home folder).



sudo ddrescue -r 3 /dev/sdc /home/yinon/ImageFileName.img /home/yinon/TextFileName.txt


If you are doing this from a Live CD, you will need to mount a hard drive prior to running ddrescue and change the output to point to the mounted filesystem. For example, if you wanted to back up the image to sda6, enter the following from a terminal:



sudo mkdir /media/backup
sudo mount /dev/sda6 /media/backup


You are creating the folder /media/backup, which is where we are mounting the drive.



You can also just click on the drive that you want to back up TO in Nautilus (the file manager) and it should automatically mount it. If you hover over it, it should show the full path to it, it should be something like /media/LABEL, where label is the label of your drive.



Your ddrescue command then would look something like this:



sudo ddrescue -r 3 /dev/sdc /media/backup/ImageFileName.img /media/backup/TextFileName.txt

[#37660] Wednesday, July 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
odyroc

Total Points: 324
Total Questions: 109
Total Answers: 103

Location: Belize
Member since Mon, Apr 17, 2023
1 Year ago
odyroc questions
;