HW - Lecture 6. fs

12191789 유호현


1.

Make a virtual floppy disk

dd bs=1024 count=1440 if=/dev/zero of=myfd

will make a virtual floppy disk of size 1.44MB with name “myfd”. “dd” is a command to write data into disk. “bs” is block-size. bs=1024 means 1 block is 1024 byte (this "block" is not the file system block, it is just the unit of data transfer in "dd" command). “count” is the number of blocks to write. count=1440 means write 1440 blocks, which is 1440*1024=1440KB=1.44 MB. “if” is input file to read data from. /dev/zero is a special file that gives out zeros when being read. “of” is the output file. Note bs is NOT file system block size. You can make same disk with bs=1 as below:

dd bs=1 count=1474560 if=/dev/zero of=myfd

Untitled


1-1.

Check the content of myfd. What data do you have in it? Check address 0x400.

# xxd myfd > x
# vi x
/400

Untitled