Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
2192
views
How to restore windows image created with dd?
I want to restore my windows image created with `dd` I used the command ``` dd if=/dev/nvme0n1 of="./$(date).img" status=progress ``` to create the image. There where four partitions in my `nvme0n1` ``` * EFI system * Microsoft reserved * mircosoft basic dat * Windows recovery environment ``` my gue...
I want to restore my windows image created with
dd
I used the command
dd if=/dev/nvme0n1 of="./$(date).img" status=progress
to create the image. There where four partitions in my nvme0n1
* EFI system
* Microsoft reserved
* mircosoft basic dat
* Windows recovery environment
my guess to use
dd if=./$(date).img of=/dev/sdaX bs=4m && sync
I was wondering what about the UUID of the partitions. Is there something I need to reconfigure.
A.Dumas
(485 rep)
May 28, 2021, 05:47 PM
• Last activity: Aug 4, 2025, 07:07 PM
0
votes
2
answers
2143
views
How to process dd-created disk image, which is corrupted (disk died during dumping)
I have a laptop with HDD which had issues with booting (windows10). I assumed that Windows just failed some way. I've booted from LinuxLiveUSB and tried to dump the disk using `dd`. DD failed on 85GB because of I/O error. I've read that it is sign of bad block, so I've used `NOERROR` flag next time....
I have a laptop with HDD which had issues with booting (windows10). I assumed that Windows just failed some way.
I've booted from LinuxLiveUSB and tried to dump the disk using
dd
. DD failed on 85GB because of I/O error. I've read that it is sign of bad block, so I've used NOERROR
flag next time.
During that process dd
now throws only I/O errors. I've checked disk in fdisk -l
, but see only one partition (was 4 before the whole operation) with message that there was no other partition or something (sorry I can't remember correctly).
For the next reboot to LiveUSB, fdisk
detect no sda
whatsoever. So I think, disk is dead.
I still have 270GB image (closed DD because of never-ending I/O errors) of 1TB disk. I want to recover data from this image, but neither OSFMount
on Windows nor losetup
/kpartx
can mount Windows partition from this image (OSFmount
just hangs and linux tools do nothing).
Is there any process to prepare the image in a way to read the data from it? Thanks.
tuxfan
(1 rep)
Aug 6, 2020, 10:06 AM
• Last activity: Jul 25, 2025, 08:55 PM
100
votes
8
answers
79178
views
Is there a way to determine the optimal value for the bs parameter to dd?
On occasion I've seen comments online along the lines of "make sure you set 'bs= ' because the default value will take too long," and my own extremely-unscientific experiences of, "well that seemed to take longer than that other time last week" seem to bear that out. So whenever I use 'dd' (typicall...
On occasion I've seen comments online along the lines of "make sure you set 'bs=' because the default value will take too long," and my own extremely-unscientific experiences of, "well that seemed to take longer than that other time last week" seem to bear that out. So whenever I use 'dd' (typically in the 1-2GB range) I make sure to specify the bytes parameter. About half the time I use the value specified in whatever online guide I'm copying from; the rest of the time I'll pick some number that makes sense from the 'fdisk -l' listing for what I assume is the slower media (e.g. the SD card I'm writing to).
For a given situation (media type, bus sizes, or whatever else matters), is there a way to determine a "best" value? Is it easy to determine? If not, is there an easy way to get 90-95% of the way there? Or is "just pick something bigger than 512" even the correct answer?
I've thought of trying the experiment myself, but (in addition to being a lot of work) I'm not sure what factors impact the answer, so I don't know how to design a good experiment.
user4443
Mar 17, 2011, 06:35 AM
• Last activity: Jul 20, 2025, 07:04 PM
0
votes
1
answers
67
views
How can I extract files from a disk image backup (.image file)?
I backed up my old device using `dd` and am trying to access its contents. The following has been attempted: ``` usr@pop-os:~/Backups$ sudo mkdir /mnt/ mount -o loop .image /mnt/ mount: /mnt/ : failed to setup loop device for /home/usr/Backups/ .image. ``` The file was created by using the following...
I backed up my old device using
dd
and am trying to access its contents.
The following has been attempted:
usr@pop-os:~/Backups$ sudo mkdir /mnt/
mount -o loop .image /mnt/
mount: /mnt/: failed to setup loop device for /home/usr/Backups/.image.
The file was created by using the following command:
sudo dd if=/dev/sda of=.image status=progress
usr@pop-os:~/Backups$ fdisk -l .image
Disk .image: 29.12 GiB, 31268536320 bytes, 61071360 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
Disklabel type: dos
Disk identifier: 0x38a56bdb
Device Boot Start End Sectors Size Id Type
.image1 * 10240 962559 952320 465M 83 Linux
.image2 962560 61071326 60108767 28.7G 83 Linux
usr@pop-os:~/Backups$
How can I explore the contents of a .image file?
SpreadingKindness
(23 rep)
Jul 4, 2025, 08:56 AM
• Last activity: Jul 5, 2025, 09:34 PM
13
votes
2
answers
1115
views
Can I safely utilize `dd` to backup my drive to a singular image file?
This post *might* be a bit redundant, but I am trying to back up my SSD using `dd`. Many (if not all) of the guides out there for this tool save the drive per partition. However, I would like to save it in one image file. Can I safely utilize the following commands, or must I save each partition sep...
This post *might* be a bit redundant, but I am trying to back up my SSD using
dd
. Many (if not all) of the guides out there for this tool save the drive per partition. However, I would like to save it in one image file.
Can I safely utilize the following commands, or must I save each partition separately?
root@debian:/home/usr/Backup of PopOS/extra-backup# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:4 0 465.8G 0 disk
├─nvme0n1p1 259:5 0 976M 0 part
├─nvme0n1p2 259:6 0 3.8G 0 part
└─nvme0n1p3 259:7 0 461G 0 part
root@debian:/home/usr/Backup of PopOS/extra-backup# dd if=/dev/nvme0n1 of=backup.img status=progress
I need to ship the SSD back to my warranty provider, but I should be able to restore it to a drive of the same or greater size once it is repaired.
newunix
(139 rep)
Jun 26, 2025, 08:58 AM
• Last activity: Jul 4, 2025, 04:23 PM
2
votes
1
answers
386
views
“Bad magic number in super-block” after a dd of Mobian (Debian) image
# General overview I try to install the [Mobian](https://mobian-project.org/) OS on my Pinephone thought the [`dd`’s method](https://wiki.debian.org/InstallingDebianOn/PINE64/PinePhone#Method_3:_dd) as described in the official Debian documentation. Basically, I have to make a `dd` from an imag...
# General overview
I try to install the [Mobian](https://mobian-project.org/) OS on my Pinephone thought the [
dd
’s method](https://wiki.debian.org/InstallingDebianOn/PINE64/PinePhone#Method_3:_dd) as described in the official Debian documentation. Basically, I have to make a dd
from an image to a partition in the SD card.
# The problem
But at each try, the partition is corrupted and unusable.
# The process
### What I did
As I said, I just follow the dd
’s method of the documentation. So :
1. I formatted a partition located in /dev/sdb1
in my SD card with:
# mkfs.ext4 -F -O 64bit -L 'system' '/dev/sdb1'
mke2fs 1.47.0 (5-Feb-2023)
/dev/sdb1 contains a ext4 file system labelled 'system'
last mounted on Wed Jun 25 18:44:21 2025
Creating filesystem with 28703488 4k blocks and 7176192 inodes
Filesystem UUID: e7df3b8b-a2fa-4cce-a833-5fd86456cad8
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done
Writing inode tables: done
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done
2. Then, I get the image and unpack it:
$ wget https://images.mobian.org/pinephone/mobian-pinephone-phosh-12.0.img.gz
$ unp mobian-pinephone-phosh-12.0.img.gz
3. So, I copied the image to the partition /dev/sdb1
:
# dd bs=64k if=mobian-pinephone-phosh-12.0.img of=/dev/sdb1 status=progress
5989138432 octets (6,0 GB, 5,6 GiB) copiés, 265 s, 22,6 MB/s
91552+1 enregistrements lus
91552+1 enregistrements écrits
6000000000 octets (6,0 GB, 5,6 GiB) copiés, 265,823 s, 22,6 MB/s
### What I got
At this point, when the process reach it end, the partition appear as defective.
1. I check /dev/sdb1
with fsk.ext4
:
# fsck.ext4 /dev/sdb1
e2fsck 1.47.0 (5-Feb-2023)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdb1
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768
Found a gpt partition table in /dev/sdb1
2. I inspected what happened with dmesg
but found nothing special:
# dmesg -T
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] 244285440 512-byte logical blocks: (125 GB/116 GiB)
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Write Protect is off
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Mode Sense: 03 00 00 00
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] No Caching mode page found
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[mer. 25 juin 18:44:02 2025] sdb: sdb1
[mer. 25 juin 18:44:02 2025] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[mer. 25 juin 18:44:02 2025] EXT4-fs (sdb1): recovery complete
[mer. 25 juin 18:44:02 2025] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Quota mode: none.
[mer. 25 juin 18:44:18 2025] EXT4-fs (sdb1): unmounting filesystem.
[mer. 25 juin 18:44:18 2025] sdb: sdb1
[mer. 25 juin 18:44:18 2025] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Quota mode: none.
[mer. 25 juin 18:44:43 2025] EXT4-fs (sdb1): unmounting filesystem.
However, I tried the same process from another computer and get something more verbose with dmesg
(in the this case mmcblk0
is the relevant partition):
[mar. juin 24 20:11:57 2025] mmcblk0: p1
[mar. juin 24 20:11:57 2025] mmcblk0: p1
[mar. juin 24 20:11:57 2025] mmcblk0: p1
[mar. juin 24 20:11:58 2025] mmcblk0: p1
[mar. juin 24 20:13:31 2025] mmc0: card 0001 removed
[mar. juin 24 20:13:33 2025] mmc0: cannot verify signal voltage switch
[mar. juin 24 20:13:33 2025] mmc0: new ultra high speed SDR104 SDXC card at address 0001
[mar. juin 24 20:13:33 2025] mmcblk0: mmc0:0001 SD128 116 GiB
[mar. juin 24 20:13:33 2025] mmcblk0: p1
[mar. juin 24 20:13:38 2025] audit: type=1400 audit(1750788819.286:29): apparmor="DENIED" operation="open" profile="/usr/bin/evince-thumbnailer" name="/tmp/tumbler-X31LB82.png" pid=13008 comm="evince-thumbnai" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
[mar. juin 24 20:13:39 2025] audit: type=1400 audit(1750788819.666:30): apparmor="DENIED" operation="open" profile="/usr/bin/evince-thumbnailer" name="/tmp/tumbler-XD3SP82.png" pid=13013 comm="evince-thumbnai" requested_mask="wc" denied_mask="wc" fsuid=1000 ouid=1000
[mar. juin 24 20:15:29 2025] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Quota mode: none.
[mar. juin 24 20:16:22 2025] JBD2: Spotted dirty metadata buffer (dev = mmcblk0p5, blocknr = 1). There's a risk of filesystem corruption in case of system crash.
[mar. juin 24 20:16:26 2025] EXT4-fs error (device mmcblk0p5): ext4_map_blocks:607: inode #8: block 15237146: comm jbd2/mmcblk0p5-: lblock 26 mapped to illegal pblock 15237146 (length 1)
[mar. juin 24 20:16:26 2025] jbd2_journal_bmap: journal block not found at offset 26 on mmcblk0p5-8
[mar. juin 24 20:16:26 2025] Aborting journal on device mmcblk0p5-8.
[mar. juin 24 20:16:26 2025] EXT4-fs error (device mmcblk0p5): ext4_journal_check_start:83: comm ext4lazyinit: Detected aborted journal
[mar. juin 24 20:16:27 2025] EXT4-fs (mmcblk0p5): Remounting filesystem read-only
[mar. juin 24 20:23:19 2025] EXT4-fs (mmcblk0p5): unmounting filesystem.
[mar. juin 24 20:23:42 2025] mmcblk0: p1
[mar. juin 24 20:23:42 2025] mmcblk0: p1
[mar. juin 24 20:23:42 2025] mmcblk0: p1
[mar. juin 24 20:23:43 2025] mmcblk0:
[mar. juin 24 20:23:43 2025] mmcblk0:
[mar. juin 24 20:23:43 2025] mmcblk0: p1
[mar. juin 24 20:23:43 2025] mmcblk0: p1
# The question
Obviously, I just ask what happened, why it doesn’t work? And how to fix it and install Mobian on this SD card?
fauve
(1529 rep)
Jun 25, 2025, 05:44 PM
• Last activity: Jun 26, 2025, 03:04 AM
2
votes
2
answers
2450
views
Why does my Windows 7 ISO file not boot when written to a USB stick?
I need to write a windows7 iso file on my usb stick. I had been used to this task. I usually either use the `dd` tool, or `unetbootin`. Surprisingly both don't work today. With `dd` I did the following : dd bs=4m if='windows7.iso' of=/dev/sdb My new supposedly bootable usb stick wont boot. Ok so I u...
I need to write a windows7 iso file on my usb stick.
I had been used to this task. I usually either use the
dd
tool, or unetbootin
. Surprisingly both don't work today.
With dd
I did the following :
dd bs=4m if='windows7.iso' of=/dev/sdb
My new supposedly bootable usb stick wont boot. Ok so I used unetbootin
. This time, I get the unetbootin
bootloader screen, but windows7 is not listed. Only the default choice is left.
In either way, I failed at creating my bootable stick. Few months ago, I could make this same USB stick boot with the very same ISO file. I also did the same tasks after formatting my stick withh this command:
mkfs.vfat -F 32 -I /dev/sdb
There were no difference as expected.
I am probably doing something wrong here, but I can't see where my mistake is.
Any idea on what is going on?
kaligne
(906 rep)
Apr 25, 2015, 05:30 PM
• Last activity: Jun 12, 2025, 10:47 PM
0
votes
2
answers
44
views
how to copy a HD to another if the CPU is freezing after a few GB?
how to copy a HD to another if the CPU is freezing after a few GB ? I had to copy w11 of a friend notebook from a 128GB nvme to a 1TB nvme. I put nvne128gb in a usb adapter and the nvme1TB inside the notebook. The only cost free and granted way to copy the hd was thu linux (that i use everyday). I b...
how to copy a HD to another if the CPU is freezing after a few GB ?
I had to copy w11 of a friend notebook from a 128GB nvme to a 1TB nvme.
I put nvne128gb in a usb adapter and the nvme1TB inside the notebook.
The only cost free and granted way to copy the hd was thu linux (that i use everyday).
I boot it in a usb liveCD ubuntu 24.04.
when I try to copy using gparted or dd, the pc freezes everytime around 15GB :(
What is going on?
VeganEye
(101 rep)
Jun 2, 2025, 09:12 PM
• Last activity: Jun 2, 2025, 10:04 PM
0
votes
1
answers
37
views
dd cannot write to an ext4 HDD using oflag=direct
I attempted to write a file to an ext4 voulume on an external USB hard disk drive: $ dd if=/dev/zero of=file bs=1M count=10 iflag=fullblock oflag=direct dd: failed to open 'file': Invalid argument Then I tried it without `oflag=direct` and it worked. Then I tried to write a file using the original c...
I attempted to write a file to an ext4 voulume on an external USB hard disk drive:
$ dd if=/dev/zero of=file bs=1M count=10 iflag=fullblock oflag=direct
dd: failed to open 'file': Invalid argument
Then I tried it without
oflag=direct
and it worked.
Then I tried to write a file using the original command to an ext4 volume on an internal solid state drive and it worked.
Why couldn't dd
write to the HDD?
EmmaV
(4359 rep)
May 25, 2025, 08:08 AM
• Last activity: May 25, 2025, 09:47 AM
1
votes
1
answers
2433
views
Understanding iostat block measurements
I am trying to understand how data is written to the disk. I'm writing data with `dd` using various block sizes, but it looks like the disk is always getting hit with the same size blocks, according to iostat. For example this command should write 128K blocks. dd if=/dev/zero of=/dev/sdb bs=128K cou...
I am trying to understand how data is written to the disk. I'm writing data with
dd
using various block sizes, but it looks like the disk is always getting hit with the same size blocks, according to iostat. For example this command should write 128K blocks.
dd if=/dev/zero of=/dev/sdb bs=128K count=300000
Trimmed output of iostat -dxm 1
:
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 129897.00 0.00 1024.00 0.00 512.00 1024.00 142.09 138.81 0.00 138.81 0.98 100.00
My reading of this is that it's writing 512MBps in 1024 operations. This means each write = 512/1024 = 512K.
Another way of calculating the same thing: The avgrq-sz column shows 1024 sectors. According to gdisk
the sector size of this Samsung 850 Pro SSD is 512B, therefore each write is 1024 sectors * 512B = 512K.
So my question is, why is it writing 512K blocks instead of 128K as specified with dd
? If I change dd
to write 4M blocks, the iostat result is exactly the same. The merges number doesn't make sense to me either.
That was writing directly to the block device; but if I format it XFS and write to the filesystem, the numbers are the same except zero merges:
dd if=/dev/zero of=/mnt/ddtest bs=4M count=3000
Now iostat shows
Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sdb 0.00 0.00 0.00 1024.00 0.00 512.00 1024.00 142.31 138.92 0.00 138.92 0.98 100.00
I'm using RHEL 7.7 by the way.
Elliott B
(575 rep)
Sep 10, 2019, 08:38 AM
• Last activity: May 14, 2025, 01:11 AM
0
votes
1
answers
62
views
dd with 1M buffer is running at only 1 MB/s - disk usually can be accessed at full speed
I am running the command `dd bs=1M if=/dev/zero of=/dev/md7 status=progress`. It started very slow at 4 MB/s but now has dropped to 1 MB/s. This is a standard SATA disk that was running perfectly before with normal SMART parameters and normal >100 MB/s write speeds. Why would this command run so slo...
I am running the command
dd bs=1M if=/dev/zero of=/dev/md7 status=progress
. It started very slow at 4 MB/s but now has dropped to 1 MB/s. This is a standard SATA disk that was running perfectly before with normal SMART parameters and normal >100 MB/s write speeds.
Why would this command run so slowly as it will now take almost a year to zero the disk.
Turkeyphant
(101 rep)
Apr 4, 2025, 11:55 AM
• Last activity: Apr 4, 2025, 03:26 PM
0
votes
0
answers
327
views
linux ssd write speed
My computer has a modern CPU with 8 cores and an NVMe SSD (95% free). The NVMe SSD is connected to the motherboard via PCIe 3.0. The filesystem is `ext4` with the `discard` option enabled. The Linux kernel version is `6.6.38`. `echo 3 > /proc/sys/vm/drop_caches` I used hdparm to perform a read speed...
My computer has a modern CPU with 8 cores and an NVMe SSD (95% free).
The NVMe SSD is connected to the motherboard via PCIe 3.0.
The filesystem is
ext4
with the discard
option enabled.
The Linux kernel version is 6.6.38
.
echo 3 > /proc/sys/vm/drop_caches
I used hdparm to perform a read speed test:
hdparm -Tt /dev/nvme1n1p5
/dev/nvme1n1p5:
Timing cached reads: 44518 MB in 1.99 seconds = 22317.28 MB/sec
Timing buffered disk reads: 4764 MB in 3.00 seconds = 1587.79 MB/sec
I used dd to perform a write speed test:
dd if=/dev/zero of=testfile1
^C19047808+0 records in
19047808+0 records out
9752477696 bytes (9,8 GB, 9,1 GiB) copied, 11,0414 s, 883 MB/s
When I run multiple dd commands in parallel to write to the NVMe SSD like:
dd if=/dev/zero of=testfileN &
Programs like htop
show a write speed of about 1800 MB/s (N=1,2,3,4,5).
I tried the same with random
instead zero
, the same speed about 1800 mb/s
How can I maximize write speed for a single file and are there specific kernel options I need?
user447274
(539 rep)
Oct 13, 2024, 05:53 AM
• Last activity: Apr 2, 2025, 09:15 AM
2
votes
0
answers
209
views
Interpreting safecopy's output to a device file
So recently we've had a dying hard drive that we tried to copy all the data from using `safecopy`. The documentation as well as any guides I could find specified that `safecopy`'s output has to be an image file. The command processed, but only yielded `XXX` as output, indicating unsuccessful reads f...
So recently we've had a dying hard drive that we tried to copy all the data from using
safecopy
. The documentation as well as any guides I could find specified that safecopy
's output has to be an image file. The command processed, but only yielded XXX
as output, indicating unsuccessful reads for hundreds and thousands of blocks. Evidently that can't be correct since the drive was still mountable and most files were readable. Next I retried, specifying an HDD partition (/dev/sdb2
) as the output, as someone suggested (I can't find the thread anymore, that was over a week ago). The command ran, outputting successful reads, finishing in the estimated time of over 5 days.
Now the drive has all the recovered data on it, but the partition has become unreadable. We can't repeat the recovery, as the damaged drive died soon afterwards (head crash, and a quite violent one at that) and we somehow have to get the data from the other HDD, which is definitely there since the command completed and wrote over the partition. Is it possible to retrieve it somehow? I was thinking if the intended target was an .img
file, then copying the raw data from the device file to an .img
with dd
might give us the "intended result" that the command should have gotten us to begin with (that being having safecopy
's output in the form of an .img
file and not on a device), but dd
froze after a few percent into the operation, which did not resume even after several hours.
The exact copy and output was lost due to running on a volatile system, but based on the devices and parameters I remember it must have been sudo safecopy --stage1 -b 4096 -R 2 /dev/sda2 /dev/sdb2
, i.e. doing a stage 1 copy with added double retries from /dev/sda2
(broken) to dev/sdb2
(backup), both having a block size of 4096 bytes. The output yielded mostly ...
as far as I could see, indicating successful block reads. The output ended with safecopy
informing me that it concluded successfully, writing ~3TB of data.
sudo file -s /dev/sdb2
only yields the error message /dev/sdb2: ASCII text, with very long lines, with no line terminators
, retrying with hexdump -C /dev/sdb2
gives a bit more insight on what's on the device:
00000000 42 61 44 62 4c 6f 43 6b 42 61 44 62 4c 6f 43 6b |BaDbLoCkBaDbLoCk|
*
01000030 42 61 44 62 4c 6f 43 6b 10 00 00 00 4c 6f 43 6b |BaDbLoCk....LoCk|
01000040 c4 7b 00 00 4c 6f 43 6b 42 61 44 62 4c 6f 43 6b |.{..LoCkBaDbLoCk|
01000050 42 61 44 62 4c 6f 43 6b 42 61 44 62 4c 6f 43 6b |BaDbLoCkBaDbLoCk|
*
0101ef10 c8 7b 00 00 4c 6f 43 6b 42 61 44 62 4c 6f 43 6b |.{..LoCkBaDbLoCk|
0101ef20 c9 7b 00 00 ca 7b 00 00 cb 7b 00 00 cc 7b 00 00 |.{...{...{...{..|
0101ef30 cd 7b 00 00 ce 7b 00 00 cf 7b 00 00 d0 7b 00 00 |.{...{...{...{..|
0101ef40 d1 7b 00 00 d2 7b 00 00 d3 7b 00 00 d4 7b 00 00 |.{...{...{...{..|
The remaining lines look like normal disk data.
What is odd is that the first lines of the hexdump
show bad blocks
, despite Safecopy
claiming that at least the first few thousand blocks were all read successfully.
Bobcat
(21 rep)
May 2, 2023, 12:05 PM
• Last activity: Mar 19, 2025, 03:20 PM
2
votes
2
answers
75
views
Recovery of a compressed image not possible due to lack of Space - general understanding of compression methods
I used `gzip` to compress an image which is quite huge still. dd if=/dev/sda2 bs=1M | gzip -c -9 > sda2.dd.img.gz then I changed the partitioning of the Drive because I wanted to install Linux. And when trying to decompress and write it to the former (smaller) partition gunzip sda2.dd.img.gz >/dev/s...
I used
gzip
to compress an image which is quite huge still.
dd if=/dev/sda2 bs=1M | gzip -c -9 > sda2.dd.img.gz
then I changed the partitioning of the Drive because I wanted to install Linux.
And when trying to decompress and write it to the former (smaller) partition
gunzip sda2.dd.img.gz >/dev/sda2
(using >
instead of dd
, as described here, its content is first written to another file (instead of directly to the partition as I expected).
The Problem: the Partition where the zipped file is on is to. small.
I could use a external media but that will take more time. But would prefer to write the decompressed data to the partition directly.
So I decided to get more info about zipping itself first. but it left me even more confused (see my first response here)
Can anyone give any hint, please ?
thanks in advance,
Nisang Marc Pfannkuchen
(21 rep)
Feb 24, 2025, 06:26 PM
• Last activity: Feb 26, 2025, 08:43 PM
1
votes
0
answers
155
views
Why doesn't lsblk list the drive where Windows 11 is installed? (I can boot into Windows, so I know the drive is functional)
I used dd to write the SystemRescue ( https://www.system-rescue.org/ ) image to a USB stick drive. I used this USB stick to boot into Computer#1 and then used dd to clone the internal system drive to a second USB stick. I didn't have any problems. I put the SystemRescue USB stick into Computer#2 and...
I used dd to write the SystemRescue ( https://www.system-rescue.org/ ) image to a USB stick drive. I used this USB stick to boot into Computer#1 and then used dd to clone the internal system drive to a second USB stick. I didn't have any problems.
I put the SystemRescue USB stick into Computer#2 and successfully booted into SystemRescue Linux. (There is nothing wrong with either computer, but I am using SystemRescue live Linux distro because as I understand it is inadvisable or impossible to attempt to make a raw binary clone of a drive with a presently mounted filesystem.)
My plan was to clone the internal system drive of Computer#2, which has Windows 11 installed, to a third USB stick (as a backup in case I want to restore it later), and then clone what I had previously cloned to the second USB stick to the internal system drive of Computer#2, overwriting Windows 11. All of this would be accomplished with dd via the SystemRescue live Linux distro.
The problem I am having is that I cannot complete the steps mentioned in the immediately preceding paragraph because the internal drive of Computer#2 that has Windows 11 on it does not show up when I type lsblk. I also tried lsblk -a. I also tried turning off Windows 11 Fast Startup in case that might be causing problems. I still can't get the drive to show in the lsblk list. (I did not attempt to mount anything because as I understand I do not need to if I am doing a raw binary copy with dd.) lsblk does show a second internal drive of Computer#2, but it's not the right one (it's 512GB instead of the 256GB drive that Win11 is on). The computer has two internal drives: the first of them is an SSD with Windows 11, and the other is an old-style HDD; but lsblk only shows the 2nd one. (lsblk also lists a 32GB USB stick, but Win11 is definitely not on there.)
I know that the Windows 11 drive is functional because I can still boot into Windows 11. The Windows drive is listed as "NVMe INTEL" by Windows system info; it's 256GB. There is also a 2nd internal drive that's 512GB, "TOSHIBA".
During the boot of SystemRescue on Computer #2, it shows the message: "A start job is running for /dev/tpmrm0", which times out after 90 seconds. But other than that the boot seems normal.
Computer #2 is an old Dell computer, OptiPlex 3050, Intel Core i5, 7th gen. The Linux distro on the USB stick is "systemrescue-11.03-amd64.iso". Is it a problem with drivers? Or a problem with Windows DRM? Would I have better luck using a different Linux distribution? I just need something that can see the drive and run dd. I need to be able to type something for the dd parameter if=, so it's problematic that lsblk won't list the name of the device, "/dev/???".
lsblk -a -o name,label,size,fstype,model
loop0 854M squashfs
sda 465G TOSHIBA
Update:
The comment from @frostschutz told me to check dmesg, where I found some messages that said that I should change from RAID to AHCI in the BIOS settings. After I did that, the drive now shows up as "nvme0n1".
Robert Jenkins
(11 rep)
Feb 15, 2025, 01:20 PM
• Last activity: Feb 15, 2025, 03:36 PM
8
votes
3
answers
22943
views
resuming dd with read errors, skip/seek numbers
I'm trying to copy data off a rather damaged CD using the following command: `dd if=/dev/sr1 of=IDT.img conv=sync,noerror status=progress` However, the 'of' device got disconnected and the dd stopped (output below). ``` ... dd: error reading '/dev/sr1': Input/output error 1074889+17746 records in 10...
I'm trying to copy data off a rather damaged CD using the following command:
dd if=/dev/sr1 of=IDT.img conv=sync,noerror status=progress
However, the 'of' device got disconnected and the dd stopped (output below).
...
dd: error reading '/dev/sr1': Input/output error
1074889+17746 records in
1092635+0 records out
559429120 bytes (559 MB, 534 MiB) copied, 502933 s, 1.1 kB/s
dd: writing to 'IDT.img': Input/output error
1074889+17747 records in
1092635+0 records out
559429120 bytes (559 MB, 534 MiB) copied, 502933 s, 1.1 kB/s
Can I resume with:
dd if=/dev/sr1 of=IDT.img conv=sync,noerror status=progress seek=1092635 skip=1092635
Or should the seek/skip numbers be both 1092636
, or should skip/seek be different from each other, or something entirely different?
PS I know I'm probably using the wrong command for this, e.g. ddrescue is probably better. But I'm probably stuck with dd now(?). I don't expect any more errors on the output file side of things.
bmcws
(145 rep)
May 26, 2021, 10:51 AM
• Last activity: Feb 2, 2025, 04:19 PM
0
votes
1
answers
59
views
dd: padding input stream with zeros till end of disk / size
I'm having a stream of binary data coming in via stdin which I want to write to a block device `/dev/mmcblk0p2`. The size of the input stream is arbitrary and since it's coming in via stdin, it's not known beforehand / easily determinable - but let's assume for this very example it's 10MiB. What I n...
I'm having a stream of binary data coming in via stdin which I want to write to a block device
/dev/mmcblk0p2
.
The size of the input stream is arbitrary and since it's coming in via stdin, it's not known beforehand / easily determinable - but let's assume for this very example it's 10MiB.
What I now want: to fill up the remaining 18MiB - 10MiB = 8MiB
on the output block device with zeros.
What seems to work: dd if=/tmp/img of=/dev/mmcblk0p2 bs=18M conv=sync,notrunc
. However that doesn't scale for larger block-devices - let's assume I want to write a 100MiB file to 10GiB output block device and pad the remaining 900MiB with zeros, the passed blocksize would be 10GiB, which - according to my understanding - can cause memory or at least performance issues.
How can I ensure the output device will get padded / filled up with zeros after the input data was written?
Another idea was to take the dd
-output and figure out from that how much data was written and re-invoke dd
with seek
/skip
-args, however dd
s output does not look promising to be used in shell scripts.
I'm on busybox userland, hence don't have the full blown GNU/Linux suite and options available, hence hoping for something working in a typical busybox environment.
PS: Another caveat with how I use dd above is: the total size of the block device is needed in order for dd not to error out with "No space left on device" after writing till the end.
Currently I achieve that by gathering the total size of the output block device via /sys/class/block/mmcblk0p2/size
- and passing it to dd via the blocksize-arg as outlined above. Happy for solutions avoiding that, but I can also live with that.
daten
(23 rep)
Jan 19, 2025, 05:25 PM
• Last activity: Jan 19, 2025, 06:36 PM
0
votes
1
answers
116
views
Why is dd unable to read /proc/pid/mem?
Why is GNU Coreutil's `dd` unable to read /proc/pid/mem? PHP is able to read it, check this: ``` $ dd if=/proc/357668/mem bs=100 skip=93824992231424 count=1 iflag=fullblock dd: /proc/357668/mem: cannot skip to specified offset dd: error reading '/proc/357668/mem': Input/output error 0+0 records in 0...
Why is GNU Coreutil's
dd
unable to read /proc/pid/mem? PHP is able to read it, check this:
$ dd if=/proc/357668/mem bs=100 skip=93824992231424 count=1 iflag=fullblock
dd: /proc/357668/mem: cannot skip to specified offset
dd: error reading '/proc/357668/mem': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 4.4742e-05 s, 0.0 kB/s
$ php -r '$h=fopen("/proc/357668/mem","rb");
var_dump(fseek($h,93824992231424));
var_dump(fread($h,100));'
int(0)
string(100) "^?ELF^B^A^A^C^@^@^@^@^@^@^@^@^C^@>^@^A^@^@^@^X^S^@^@^@^@^@@^@^@^@^@^@^@^@P*X^@^@^@^@^@^@^@^@^@@^@8^@^M^@@^@^^^@^]^@^F^@^@^@^D^@^@^@@^@^@^@^@^@^@^@@^@^@^@^@^@^@^@@^@^@^@^@^@^@^@^B^@^@"
here is strace of dd:
sudo strace dd if=/proc/357668/mem bs=1 skip=93824992231424 count=1 iflag=fullblock
execve("/usr/bin/dd", ["dd", "if=/proc/357668/mem", "bs=1", "skip=93824992231424", "count=1", "iflag=fullblock"], 0x7fffffffe528 /* 15 vars */) = 0
brk(NULL) = 0x555555567000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7fbd000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=76631, ...}) = 0
mmap(NULL, 76631, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7faa000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\243\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
fstat(3, {st_mode=S_IFREG|0755, st_size=2125328, ...}) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2170256, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffff7d98000
mmap(0x7ffff7dc0000, 1605632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7ffff7dc0000
mmap(0x7ffff7f48000, 323584, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b0000) = 0x7ffff7f48000
mmap(0x7ffff7f97000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1fe000) = 0x7ffff7f97000
mmap(0x7ffff7f9d000, 52624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffff7f9d000
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff7d95000
arch_prctl(ARCH_SET_FS, 0x7ffff7d95740) = 0
set_tid_address(0x7ffff7d95a10) = 364648
set_robust_list(0x7ffff7d95a20, 24) = 0
rseq(0x7ffff7d96060, 0x20, 0, 0x53053053) = 0
mprotect(0x7ffff7f97000, 16384, PROT_READ) = 0
mprotect(0x555555565000, 4096, PROT_READ) = 0
mprotect(0x7ffff7ffb000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7ffff7faa000, 76631) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x5555555589f0, sa_mask=[INT USR1], sa_flags=SA_RESTORER, sa_restorer=0x7ffff7ddd320}, NULL, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x5555555589e0, sa_mask=[INT USR1], sa_flags=SA_RESTORER|SA_NODEFER|SA_RESETHAND|0xffffffff00000000, sa_restorer=0x7ffff7ddd320}, NULL, 8) = 0
getrandom("\xbe\x2a\x3f\x3b\xa5\xd1\xca\xdc", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x555555567000
brk(0x555555588000) = 0x555555588000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2996, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2996
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=258, ...}) = 0
mmap(NULL, 258, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fbc000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27028, ...}) = 0
mmap(NULL, 27028, PROT_READ, MAP_SHARED, 3, 0) = 0x7ffff7fb5000
close(3) = 0
futex(0x7ffff7f9c72c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_MEASUREMENT", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MEASUREMENT", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
mmap(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fb4000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_TELEPHONE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_TELEPHONE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=47, ...}) = 0
mmap(NULL, 47, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fb3000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_ADDRESS", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_ADDRESS", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
mmap(NULL, 127, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fb2000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_NAME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_NAME", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=62, ...}) = 0
mmap(NULL, 62, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fb1000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_PAPER", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_PAPER", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
mmap(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fb0000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=48, ...}) = 0
mmap(NULL, 48, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7faf000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=270, ...}) = 0
mmap(NULL, 270, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fae000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_COLLATE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_COLLATE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1406, ...}) = 0
mmap(NULL, 1406, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fad000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3360, ...}) = 0
mmap(NULL, 3360, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fac000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=50, ...}) = 0
mmap(NULL, 50, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7fab000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=360460, ...}) = 0
mmap(NULL, 360460, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffff7d3c000
close(3) = 0
openat(AT_FDCWD, "/proc/357668/mem", O_RDONLY) = 3
dup2(3, 0) = 0
close(3) = 0
lseek(0, 0, SEEK_CUR) = 0
lseek(0, 93824992231424, SEEK_CUR) = 93824992231424
fstat(0, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
write(2, "dd: ", 4dd: ) = 4
write(2, "/proc/357668/mem: cannot skip to"..., 49/proc/357668/mem: cannot skip to specified offset) = 49
write(2, "\n", 1
) = 1
read(0, "\177", 1) = 1
write(1, "\177", 1) = 1
close(0) = 0
close(1) = 0
write(2, "1+0 records in\n1+0 records out\n", 311+0 records in
1+0 records out
) = 31
write(2, "1 byte copied, 0.000602349 s, 1."..., 381 byte copied, 0.000602349 s, 1.7 kB/s) = 38
write(2, "\n", 1
) = 1
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
here is strace of php: https://pastebin.com/raw/9pacX2Q9
(warning: 190kb)
hanshenrik
(695 rep)
Jan 16, 2025, 05:10 PM
• Last activity: Jan 16, 2025, 05:27 PM
56
votes
6
answers
76894
views
Benchmark ssd on linux: How to measure the same things as crystaldiskmark does in windows
I want to benchmark a ssd (possibly with encrypted filesystems) and compare it to benchmarks done by crystaldiskmark on windows. ![CrystalDiskMark on Windows][1] So how can I measure approximately the same things as crystaldiskmark does? For the first row (Seq) I think I could do something like LC_A...
I want to benchmark a ssd (possibly with encrypted filesystems) and compare it to benchmarks done by crystaldiskmark on windows.
So how can I measure approximately the same things as crystaldiskmark does?
For the first row (Seq) I think I could do something like
LC_ALL=C dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc
sudo su -c "echo 3 > /proc/sys/vm/drop_caches"
LC_ALL=C dd if=tempfile of=/dev/null bs=1M count=1024
But I am not sure about the

dd
parameters.
For the random 512KB, 4KB, 4KB (Queue Depth=32) reads/writes speed-tests I don't have any idea how to reproduce the measurements in linux? So how can I do this?
For testing reading speeds something like sudo hdparm -Tt /dev/sda
doesn't seem to make sense for me since I want for example benchmark something like encfs
mounts.
**Edit**
@Alko, @iain
Perhaps I should write something about the motivation about this question: I am trying to benchmark my ssd and compare some encryption solutions. But that's another question (https://unix.stackexchange.com/q/94465/5289) . While surfing in the web about ssd's and benchmarking I have often seen users posting their CrystelDiskMark results in forums. So this is the only motivation for the question. I just want to do the same on linux. For my particular benchmarking see my other question.
student
(18865 rep)
Oct 6, 2013, 09:05 AM
• Last activity: Jan 14, 2025, 05:05 PM
0
votes
2
answers
2417
views
Clone SSD from .img with DD
I saved a backup from ssd A to .img file with dd command now I want to know to clone ssd A to ssd B can I do it directly from the .img file something like: `dd if=/dev/backup.img of=/dev/sdc bs=1 status=progress` Will this be same as doing: `dd if/dev/sdb of=/dev/sdc bs=1 bs=1 status=progress` Where...
I saved a backup from ssd A to .img file with dd command now I want to know to clone ssd A to ssd B can I do it directly from the .img file something like:
dd if=/dev/backup.img of=/dev/sdc bs=1 status=progress
Will this be same as doing:
dd if/dev/sdb of=/dev/sdc bs=1 bs=1 status=progress
Where Disk A = sdb and Disk B=sdc
I already did
dd if=/dev/sdc of=/dev/image.img
I woud prefer to clone it from the .img file as I dont mess something up or do the opposite, so I want to know are those two methods same 100% results?
Adam
(1 rep)
Dec 4, 2020, 03:33 PM
• Last activity: Dec 23, 2024, 06:06 PM
Showing page 1 of 20 total questions