Creating one of these is relatively easy in Linux, though it does use a somewhat dangerous command known as Disk Duplicator or Disk Destroyer, but usually referred to as dd
. This command can be used to clone whole disks or wipe whole disks (sometimes without meaning to if you get the syntax mixed up).
dd if=/dev/zero of=diskimage.img bs=1M count=100
dd
- dd commandif=/dev/zero
- this specifies the In File, in this case we're using a special file called /dev/zero. This can be used to write zeros to a file.of=diskimage.img
- this specificies the Out File. In this case we're writing to a file in the current working directory, but it can also be used to write to a disk file, e.g. /dev/sda
(this will zero the disk and erase all data).bs=1M
- this is the Block Size, in this case 1 megabyte.count=100
- this tells the command how many blocks to write, 100 in this case, making a 100MB img file.mkfs.ext4 diskimage.img
mkfs.ext4
- the make file system command (mkfs) and the filesystem format to use is specified after the perioddiskimage.img
- the file to format, in this "diskimage.img", but this could equally be a disk partition file, e.g. /dev/sdb1
sudo mkdir /mnt/img
sudo mount -o loop diskimage.img /mnt/img
sudo
- Super User DO, this command typically elevates the rights of the user so that they may use reserved commands. You can read more about sudo
here.mkdir
- the MaKe DIRectory command, used for making directories./mnt/img
- specifies the directory you want to makemount
- the command used to mount filesystems-o loop
- make the mount type a "loop" devicediskimage.img
- this is the source file, in this case a user space file, but could be a partition on a disk, e.g. /dev/sdb2
/mnt/img
- this is where in the filesystem you want to mount the source. Note that the mount point must exist prior to trying to mount a file system.cp SAS_RAID_Driver.bin /mnt/img
.cp
- the copy command.SAS_RAID_Driver.bin
- the file you want to copy/mnt/img
- where you want to copy it to. You could change its name to something else by specifying /mnt/img/newSAS_RAID_Driver.bin
Now you can copy the image file to another system and mount it, this will typically be a read only volume.