Skip to main content

Posts

Showing posts with the label DD

How to create an ISO disk image of a CD or DVD from command line

The attempt to copy the entire disk image using cp may omit the final block if it is an unexpected length; dd will always complete the copy if possible. We can use the dd command to create an ISO disk image of a CD or DVD. dd if= /dev/cdrom of= /home/dipin/mydisk.iso bs=2048 conv=sync,notrunc change /dev/cdrom and /home/dipin/mydisk.iso as per your needs. The attempt to copy the entire disk image using cp may omit the final block if it is an unexpected length; dd will always complete the copy if possible. Note that notrunc means do not truncate the output file.

How to create a custom linux file system within another

With the power bestowed upon us, we can create a Linux file system in a file. Humanly speaking, we can create a file containing specific file system and mount it as if it were a partition of a hard drive. To do this, we must first create the file: touch filename Then run the dd command to give a file size: dd if=/dev/zero of=/tmp/ filename bs=1024 count=102400 In this example a 100 MB file will be created in /tmp. You can modify the parameter "of" to change the location of the new file and parameters "count" and "bs" to change the file size. Now give it to our file format with the file system you want. Ext3 For example: mkfs.ext3 filename After the file created and formatted, it is now ready to be mounted: mount -t ext3 /tmp/ filename /mnt/ filename -o loop As you may know, the parameter "-o loop" should be used as the file is not a "Block device" or block device. Clever. We already have our system file nested within the main filesys...

HOWTO mount ISO and DD Image Files

Occasionally, I'll download an image file and want to see what is on it, or make a few changes to it before burning it to CD. The image file (dd, iso, etc) can be mounted using the loop device. You will need to know the type of filesystem the image uses. Most Linux/Unix-based OS's have an application that will help you identify the filesystem type. Debian includes the command /lib/udev/vol_id, SUSE has the same command but in a different location (/sbin/vol_id). If you know how to get this information on a SUN box, please leave a comment for us. If you don't have a command that will tell you the filesystem type, you can guess. Most images downloaded from the Internet will be iso9660, Windows filesystems are normally ntfs, Linux are commonly ext2, and Macintosh are udf or hfs. As a last resort, you can work your way down the list of filesystem types listed in the mount man pages. After you know the filesystem type, you are ready to mount. Note: replace   with the filesystem ...