For this lab, you will create a new disk partition and use it in various ways.                 
Create a document that will hold your numbered results. Show it to the TA for credit when you’re done.                 
Many commands in this lab will have to be done as the super-user,
root. Do this by putting sudo in front of the necessary commands.
I won’t clutter the writeup with all the sudos.
                
Note that the opposite of the mount command is umount, not
unmount.
                
gparted, the Gnome Partition Editor.
/ (on the left) and /home (on the right).
/home partition, to free space for your new partition.
/home
gparted.
/proc/partitions, figure out which one is the new
partition, based on its size.
/proc/partitions sizes are in kilobytes.
sd letter digit,
for example, sda2.
/dev/ in front of the name.
The mount point for this new partition will be /Spare.
                
rm -rf /Spare
mkdir /Spare
chmod a+rwx /Spare
uptime >/Spare/up
mount device-name /Spare
/Spare/up still there?
/Spare.
ls /Spare
umount /Spare
/Spare, now?
/etc/fstab                It’s tedious to have to manually mount filesystems.
Think of /etc/fstab as setting up an association between
directories (mount points) and partitions (file systems).
                
/etc/fstab, and add an entry to mount your new partition.
/home and imitate that.
/dev/sdawhatever)
or you can use LABEL=your-name
umount /Spare
mount /Spare
cd /Spare
umount /Spare
cd /tmp
umount /Spare
mount /Spare
cd /tmp
sleep 10m >/Spare/output &
umount /Spare
kill %%
umount
mount /Spare
rm -rf /Extra
mkdir /Extra
/Extra
(mount /dev/sdawhatever /Extra), while leaving it
also mounted onto /Spare.
/Extra. Did it show up in /Spare?
/Spare and /Extra.
rm -rf /Extra
/Spare, but do it read-only.
man mount is your friend.
/Spare using the cp command.
/Spare partition
Many systems allow non-super-user mounting of CDs and USB drives, but don’t want executables to be run off of those devices.                 
mount -o noexec /Spare
cp -a /bin/date /tmp
/tmp/date
cp -a /bin/date /Spare
/Spare/date
/Spare partition
rm -rf /Spare
gparted from Linux (don’t use the DVD) and deallocate
your new partition. You don’t have to merge it the free space back
into /home; you can just leave it unallocated.
Show your work to the TA.                 
User: Guest