Rescue Tools

Here’s simple way to burn iso from Linux command line.

I’m using Fedora but believe other distros’ should be similar except for package manager.

$ sudo yum install wodim

Find your CD/DVD burner

$ wodim –devices

(make note of the device #, example here is /dev/scd0)

wodim: Overview of accessible drives (1 found) :wodim: Overview of accessible drives (1 found) :————————————————————————- 0  dev=’/dev/scd0′ rwrw– : ‘_NEC’ ‘DVD+-RW ND-3450A’

$ wodim -v dev=/dev/scd0 speed=4 -eject /path/to/filename.iso


ddrescue and dd_rescue are different.   Biggest difference is with dd_rescue you can pipe the output over SSH to another host.   This is why I prefer using dd_rescue more… However when a disk is having issues, it’s best to use ddrescue as it will make every possible attempt to retrieve the data off that damaged disk…

dd_rescue /dev/sda1 – | bzip2 > /some/path/filename.bz2

dd_rescue /dev/sda1 – | ssh root@somehost ” cat – > /some/path/filename.img”

Haven’t done this in a while, but got to fix my mothers computer this evening and needed to reset her login password to Windows.

1).  Download System Rescue CD or Partition Magic

2). Burn & Boot computer off that CD. Leave everything defaulted, just hit enter when prompted.

3).  At prompt, you will need to find out what partition Windows is installed on.  Default is probably /dev/sda1, however this one wasn’t .  Use fdisk -l to find the valid disk device names, chances are if it’s not the sda1, it will be sda2

4).  % ntfs-3g /dev/sda2 /mnt/windows

5). cd /mnt/windows/Windows/System32/config

6). chntpw -l SAM  ( this will list all the valid users on Windows)

7).  chntpw -u Administrator SAM

select 1 for “Clear (blank) user password  <enter>

type y to write changes to disk and that’s it.

8).  Might not be necessary, but it’s not going to hurt and not doing it just may hurt the disk..

% cd ; umount /mnt/windows

Remove CD and reboot.  Windows should no longer prompt you for password… 

9).  Good idea to re-add your password in Windows.


Was in a little jam today and we needed to take backups of a couple of systems. The problem was the local drives didn’t have enough space to take a full disk image. This system was also failing to mount a file system over NFS due to some firewall issues. I had my mind set on taking down the hosts and either using partimage or clonezilla, which I know for sure would have worked. I’m sure you don’t have to use root and could use unpriv’d user with sudo. I’ve used this with tar a bunch of times and was quite amazed when dd worked with it.

$ sudo dd if=/dev/cciss/c0d0 | ssh root@backupserver 'dd of=/some/backup/path/disk.img'

How you can dd a image file directly from within a tar.gz archive.

$ sudo tar xzOf filename.tar.gz | dd of=/dev/sdb bs=1M

How to dd an image from one host and pipe over ssh to remote host

-O = extract files to standard out

How to create a tar.gz from a directory and pipe over ssh