PART ONE: TextbookAnswer each question posed in these projects and insert the answers in order into this document directly under the project description. No need to enter the questions, only the answers. If asked to login to user1, use your personal account instead. When asked for passwords, use the ones you created on your system.
- Do Project 5-1, pg. 245. In step 5, if you receive an SELinux error message just continue with step 6. In step 8, recall that the units output for du are blocks unless one uses –h.
- Additional Project – Switch to command-line terminal (tty2) by using
Ctrl+Alt+F2
and login to root. Enter this command
ls -l /dev/sr0. Is the device file sr0 present? ______
Insert the CentOS installation DVD or the Fedora DVD that came with your text. Go back to the GUI with
Ctrl+Alt+F1. Did the DVD automount? _______ Enter the command
mountwithout arguments from the command line. What is the device file shown for the DVD? _________________ What is the mount point (give absolute pathname)? _________________________________________ What is the type _______________________? Now, enter
umount /dev/sr0from the command line. Does the DVD unmount? _____ Now, try to mount it manually by entering
mount -t iso9660 /dev/sr0 /media/dvd
(be sure you are logged into root at this point). What is the message you get? ____________________________________________________________ Create the mount point directory with the command
mkdir /media/dvd, then re-execute the above mount command. Is it successful? _____ Now, try to eject the DVD with the eject button on the drive. Does it eject? ____ Enter
umount /dev/sr0then press the eject button. Does it now eject? _____ Is the mount point directory still present? _____
- Additional Project – From the GUI terminal window, enter
df -h. Screen print the display and include it immediately below. What does the –h option do for us? ____________________________________________________________________________________
Do a Google search for /dev/shm. What is /dev/shm used for? __________________________________
____________________________________________________________________________________
- Additional Project – From the GUI terminal window give yourself root permission with the command
su - root, then enter
du –h /var/log. Enter
du –hs /var/log. Screen print the window and include it immediately below. What does the –s option do for us? _______________________________________________________________________
- Additional Project – How many partitions did we create on our hard drive when we installed Linux in Lab 1? ________ Recall that these partitions had names. Fill in the missing partition names here: Boot partition, ______________________, and ______________________ Let’s create another partition on our hard drive. Recall that we left some free space when we did the install in Lab 1. We will use the procedure described on pp. 212-218 as a guide, but follow the steps here:
- Use
Ctrl+Alt+F2
to login to the terminal using the root account.
- Enter
fdisk /dev/sda
to launch the fdisk utility.
- Enter
m
to view the fdisk commands.
- Enter
p
to list the partition table on your hard disk.
- Enter
n
to create a new partition .
- Enter
e
for an extended partition.
- Enter
4
for the partition number.
- Enter the default cylinder for your first cylinder number.
- For the last cylinder, enter a number about half way between the first and last cylinder numbers shown.
- Enter
p
to list the partition table again. You should see your new extended partition.
- Enter
n
to create a new logical partition in the extended partition.
- Enter
l
for logical partition. (That is the letter l.)
- Enter the default cylinder for the first cylinder.
- For the last cylinder, enter a size that is less than the size of the extended partition you created above and which was shown as a result of the p command, for example, enter
+3G. Alternatively, enter a cylinder number somewhat less than the last cylinder number shown.
- Enter
p
to list the partition table. You should now see your new logical partition.
- Enter
w
to write the changes to the hard disk and attempt to reload the new partition table into RAM.
- Reboot your computer.
- After the reboot, use mkfs to format the new logical partition using the ext4 filesystem as follows:
mkfs -t ext4 /dev/sda5
- Now, create a directory you will use as a mount point for the new partition as follows:
mkdir /data
- Make sure that /data has permissions for all users to access it:
chmod a=rwx /data
- Mount the partition to the newly created mount point with the command:
mount -t ext4 /dev/sda5 /data
- Go back to your GUI with
Ctrl+Alt+F1
then from a terminal window display your mounted filesystems with the command:
mount
Do you see sda5? ______ Enter the
df
command. Do you see sda5? _______ Screenprint the mount and df commands’ output and insert it immediately below.
- Try creating some files in the new partition by storing them in /data. Can you do that? __________
- We won’t have the system automatically mount this new partition at boot time.
- Additional Project – Refer to pp. 50-51 and pp. 208-209 in the text and to these sites:
http://www.pcguide.com/ref/hdd/file/structPartitions-c.html
http://www.tech-faq.com/hard-disk-partition.html
http://en.wikipedia.org/wiki/Serial_ATA
and possibly other websites to answer the following questions (your answers may be brief).
- Compare and contrast primary partitions, extended partitions, and logical partitions.
- Describe/compare PATA and SATA drives.
- Do Discovery Exercise 2, pg. 253.
Upload this document with your answers in
boldand the screen shots included through Moodle.