[NCLUG] file system damage from dd with of=<a drive in my file system>

Vincent Randal vtrandal at gmail.com
Sun Nov 22 02:15:33 MST 2015


Hello nclug friends,

I'm wondering what damage I have done to my laptop's file system as a
result of running dd with "of="  set to a drive that is part of the file
system. I'm not exactly sure how the file systems is setup. During
installation I chose to install RHEL 7.2 to both ssd's in the laptop. The
output of ls -la /dev/sd* and df -h might help.

ls -la /dev/sd*
brw-rw----. 1 root disk 8,  0 Nov 20 20:35 /dev/sda
brw-rw----. 1 root disk 8,  1 Nov 20 20:35 /dev/sda1
brw-rw----. 1 root disk 8,  2 Nov 20 20:35 /dev/sda2
brw-rw----. 1 root disk 8, 16 Nov 22 01:06 /dev/sdb
brw-rw----. 1 root disk 8, 17 Nov 22 01:06 /dev/sdb1

df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root  216G  5.4G  211G   3% /
devtmpfs               7.8G     0  7.8G   0% /dev
tmpfs                  7.8G  188K  7.8G   1% /dev/shm
tmpfs                  7.8G   18M  7.8G   1% /run
tmpfs                  7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/sda1             1014M  166M  849M  17% /boot
/dev/mapper/rhel-home  476G   49G  428G  11% /home
tmpfs                  1.6G   36K  1.6G   1% /run/user/1000

The dd command that I am worried did some damage was like this one:
dd if=ubuntu-14.04.3-desktop-amd64.iso dd=/dev/sdb bs=10M

Here's the output from ls -la ubuntu-14.04.3-desktop-amd64.iso in case the
size of "if=" matters:
-rw-rw-r--. 1 vtrandal vtrandal 794820608 Nov 22 01:03
ubuntu-12.04.5-desktop-amd64.iso

Should I reinstall and be more careful or is there a way to fix the damage?

I'm assuming I damaged the file system. I really can't see how this did not
mess things up.

Regards,

Vincent Randal
Longmont, Colorado


More information about the NCLUG mailing list