This assignment must be uploaded to the Moodle submission page for Homework 7 by 11:00 PM on Friday, 5 April.
The setup
On the computer joe.cs.unca.edu there are three FAT file systems set up on the following mount points:
- /csci331/csci331big
- /csci331/csci331mid
- /csci331/csci331tny
These are all a bit hard to use because the FAT file system doesn’t really support user-ids, so the file systems can only be written by the user who mounted them. However, there is a copy of a image (the raw bits) of each file system within the directory
Your job is to use dd to make a copy of the first 512-byte sector, the BPB (BIOS Parameter Brock), of each of these images into your own directory. Then you are to use od or hexdump to print the following fields from the BPB in a readable fashion.
BS_OEMName
BPB_BytsPerSec
BPB_SecPerClus
BPB_RsvdSecCnt
BPB_NumFATs
BS_FilSysType
Except for the BS_FilSysType
field, all of these positions
are located in the same offset for both FAT16 and FAT32 file systems.
What to turn in?
I suggest you run in a copy of your running the script program to get this information.
It is fine to work in groups, but you must type in your own
dd
and od
commands.
Be careful, these are old-style Unix commands.
They have a very odd syntax.
Suggested reference materials
You will need to review
Microsoft’s specification of the FAT file system.
The PHOBOS tutorial
of the FAT file system is also useful.
It’s not hard to use
dd
to copy the first 512 bytes of
a file,
and
hexdump
isn’t that bad.
The true hackers use
od
though.