Operating Systems Concepts & Design
Make sure to return to the AWS Learner Lab page (link in Pilot if you forgot to bookmark it) and hit “Start Lab” to turn on your sandbox / AWS instance.
Use ssh to connect to your AWS Ubuntu instance.
Go to the folder that contains your repository (likely named ceg2350-yourgithubusername).
Create a new directory, Lab08.
Create a file named README.md in the Lab08 folder. The Lab 08 Template can be copied from this link:
https://raw.githubusercontent.com/pattonsgirl/CEG2350/refs/heads/main/docs/Labs/Lab08/LabTemplate.mdYou may refer to additional resources outside of the recommended resources provided.
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.
If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.
Your AWS instances have one block device in use - xvda. In this section, you will explore commands view partition and filesystem information about xvda. Do not make any modification to xvda.
Hint, remember that disk devices are in the /dev/ folder
lsblk, parted, blkid, df, catFor tasks that ask you to use a command, write the command used and include the output of the command.
lsblk to list only information about the xvda block device.parted to print the partition table of the xvda block device.xvda partition table:
blkid to view information of xvda and it’s partitions. Play with * to get all matches that start with \dev\xvdadf to view file system disk space usage in human readable format (meaning it prints MB/KB/GB)/etc/fstabResources
parted/etc/fstab file on LinuxYou have had an unformatted disk available on your AWS instance all along. The disk is xvdb - you can see it, but that it has no partitions, if you run lsblk. Time to create a partition table and a partition on /dev/xvdb so that in the next Part we can create a filesystem on the partition and mount it for use.
df, lsblk, blkid, gdiskgdisk GPT partition table manipulator, find out what the following main menu options do:
poniwxvdb block device with gdisk. Using the main menu, configure the disk to use the GPT partition table type, have at least 1 partition, and have that partition use the Linux filesystem type. Save your changes to the disk.
xvdbxvdb in its current state:
Resources
gdisk”gdiskNow that you have a partition, you can create a filesystem on it in order to interact with it to store and organize files and create permissions for the files.
mkfs, mountext4 filesystem on the partition on xvdbblkid to view information of the partition on xvdb/mnt/ named expansexvdb to expanseexpanse create some files and directoriesumount the partition on xvdbxvdb?Resources
ext4 is folded into ext3 since it makes slight improvements over ext3fstab at thisRight now, every time you want to access your new filesystem on xvdb1 after a system reboot you need to mount it. It would be handy to have it auto-mount. The filesystem table file - fstab is a file that stores information about what to mount when the system boots. Your task in this part is to append a new entry to fstab to automount the filesystem on xvdb1.
/etc/fstab to /etc/fstab.bak/etc/fstab to mount the partition on xvdb to the mount point (/mnt/expanse)mount -a to mount / remount records entries in etc/fstab and then check that your additional entry worked (make sure xvdb1 is unmounted first, then test and verify)/etc/fstab from /etc/fstab.bak. If you think they are correct, you may leave your changes in place.Resources
When you delete a file, you are used to it no longer being accessible, or to it still being temporarily available / recoverable via the Recycle Bin. But once you can’t open it anymore, it should be gone, including from the disk, right? Right?!?
This part will have you acknowledge that to truly make data gone and no longer readable, there are extra steps involved. The general recommendation is to trust nothing, and take disks that have had important data on it, like tax returns, credit card info, passwords, etc, taken to a shredding center and properly ripped to computer-illegible pieces.
mount, stringsxvdb partition, create two files, each with a different FAKE secret about you.strings command. If you referred to an internet resource, make sure you cite it by including the URL.strings on the filesystem partition on xvdb - read through the output and make an analysis about what output you are viewing.strings on the filesystem partition on xvdb - read through the output and determine if the secret, while no longer accessible via the filesystem, is still readable on the partition.shred command. If you referred to an internet resource, make sure you cite it by including the URL.shred to overwrite the contents of your second secret file on the disk. Write a short report of steps and provide proof that the file is no longer readable on the disk or accessible in the filesystem. Include an explanation of flags used (if any).Resources
Now that you have made a virtual machine, a thought might be how does it use the disk space on your host. In the context of a virtual machine, the reserved space on the host has a partition table, partitions, and a filesystem mounted to /
Use guides to create a guide on how to complete this tasking.
dd or fallocate to reserve 2 GB of space (a “file”) from /dev/xvda./mnt/vfs (vfs for virtual filesystem).Resources
fallocateddVerify that your GitHub repo has a Lab08 folder with at minimum:
README.mdIn the Pilot Dropbox, paste the URL to the Lab08 folder in your GitHub repo
Your files should be cleanly presented in your GitHub repository. Citations should be included as needed. Include which generative AI system was used and what prompts were used if generative AI was used.