• Home
  • Blog
  • to create a virtual disk with some contents.

to create a virtual disk with some contents.

0 comments

Turn in a hard copy of your code with running resutls

First, run the sh script:

   #! /bin/bash
   dd if=/dev/zero of=mydisk bs=1024 count=1440
   mkfs -b 1024 mydisk 1440
   mount -o loop mydisk /mnt
   (cd /mnt; mkdir dir1 dir2 dir3 dir4; touch file1 file2 file3 file4; ls -l)
   umount /mnt

to creat a virtual disk with some contents. NOTE: You may need sudo to do it.

===============================================================================
ASSUME: An EXT2 virtual disk, e.g. mydisk creatd above.
Write C programs to display the specified information on the virtual disk:
------------------------------------------------------------------------
1. super.c  : print superblock information,
2. WRITE YOUR gd.c to print group descriptor information.

3. imap.c   : print Imap as a sequence of 0/1 chars (80 chars per row)
4. WRITE YOUR bmap.c to display Bmap; the blocks bitmap.

5. inode.c  : print root inode information
6. WRITE YOUR dir.c to print ALL DIR records under the / directory

7. ialloc.c : allocate a free INODE; return its ino
8. WRITE YOUR balloc.c to allocate a FREE disk block; return its bno
-------------------------------------------------------------------------

I need a copy of the code also, so i could run it 
the link of the assignment as well as the website:
https://www.eecs.wsu.edu/~cs360/LAB6pre.html

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}