Linux

Give DD a progress bar

This is a short description on how you can get a progress bar to your dd command or other commands as well using the command pv. pv is a shell pipeline element to meter data passing through and can be installed using aptitude in Ubuntu. # aptitude install pv As an example I create a […]

Read More
Linux

How to corrupt a disk partition using dd

I wanted to test corruption of a 41TB XFS filesystem and the dd command was the perfect tool for the job. I used a block size of 512 bytes and wrote 10 blocks of data from device /dev/urandom to the partition /dev/sdb1. The “Seek” option specifies how many blocks are skipped, counting 100 blocks from […]

Read More
Linux

Create a empty file using dd

How to create a empty/null file with a specified size # dd if=/dev/zero of=destinationfile.bin bs=1024k count=100 This command creates a 100MB (1024k * 100) sized file.

Read More
Linux

Backup partition table

This post describes how you can backup your partition table for future recovery. Backup This example describes how you can backup the disk partition table on /dev/sda dd if=/dev/sda of=sda.mbr bs=512 count=1 It’s also useful to keep a human readable copy of the disk layout for future reference sudo fdisk -l > partitions.lst Restore This […]

Read More
Misc

Mount a RAID Reconstructor disk image in linux

This post came to life because I had gotten a image file of a 120GB linux ext2 RAID partition that I couldn’t access using Windows software. The partition had been rescued by RAID Reconstructor, a Windows software that can rebuild RAID arrays by combining the disks from the RAID and store it as one image […]

Read More