Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project 5 - 3 ESTIMATED TIME: 4 5 minutes OBJECTIVE: Create partitions and ext 4 filesystems. DESCRIPTION: In this hands - on project, you work

Project 5-3
ESTIMATED TIME: 45 minutes
OBJECTIVE: Create partitions and ext4 filesystems.
DESCRIPTION: In this hands-on project, you work with partitions. You will first create a partition using the fdisk utility. Next, you create an ext4 filesystem on the partition and mount it to the directory tree. Finally, you use the /etc/fstab file to automatically mount the partition at boot time.
1
Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password of LINUXrocks!.
2
At the command prompt, type lsblk and press Enter. Note the storage device file that holds the partitions that you created during Fedora installation. Also note the partitions under this storage device.
3
At the command prompt, type fdisk device and press Enter, where device is the storage device file from Step 2(e.g.,/dev/sda). At the fdisk prompt, type m and press Enter to view the various fdisk commands.
4
At the fdisk prompt, type p and press Enter to view the partition table on your storage device. Do the partitions match the output from Step 2? Note whether your storage device uses an MBR or GPT.
5
If your storage device uses an MBR, perform the following. Otherwise, proceed to Step 6.
At the fdisk prompt, type n and press Enter to create a new partition.
Type e to select an extended partition and press Enter. When prompted for the start sector, observe the valid range within the brackets and press Enter to select the default (the first available sector). When prompted for the end cylinder, observe the valid range within the brackets and press Enter to select the default (the last available sector).
Type p and press Enter to view the partition table on your storage device, noting the new extended partition and the device file it uses.
6
At the fdisk prompt, type n and press Enter to create a new partition. If your storage device uses an MBR, you may be prompted to create a logical drive or primary partition if there are primary partitions available for use; in this case, type l to create a logical drive. Otherwise, when prompted for the start sector, observe the valid range within the brackets and press Enter to select the default (the first available sector). When prompted for the end cylinder, type +1GB and press Enter.
7
At the fdisk prompt, type p and press Enter to view the partition table on your storage device. Note the partitions present and the device file for the 1 GB partition that you created in Step 6.
8
At the fdisk prompt, type l and press Enter to view the different partition types and press q when finished. Which character would you type at the fdisk prompt to change the type of partition?
9
At the fdisk prompt, type w and press Enter to save the changes to the storage device and exit the fdisk utility.
10
At the command prompt, type partprobe and press Enter.
11
At the command prompt, type mkfs t ext4 device and press Enter where device is the partition device file from Step 7(e.g.,/dev/sda4).
12
At the command prompt, type mkdir /newmount and press Enter.
13
At the command prompt, type mount t ext4 device /newmount and press Enter where device is the partition device file from Step 7(e.g.,/dev/sda4). Next, type the df -hT command and press Enter to verify that the filesystem was mounted correctly.
14
At the command prompt, type ls F /newmount and press Enter. Is the lost+found directory present? Next, type cp /etc/hosts /newmount at the command prompt and press Enter to copy the hosts file to the new partition. Verify that the copy was successful by typing the ls F /newmount command at the command prompt again, and press Enter.
15
At the command prompt, type umount /newmount and press Enter. Next, type the df -hT command and press Enter to verify that the filesystem was unmounted correctly.
16
At the command prompt, type vi /etc/fstab and press Enter. Observe the contents of the file. Add a line to the bottom of the file as follows (where device is the partition device file from Step 7):
device /newmount ext4 defaults 00
17
Save your changes and quit the vi editor.
18
At the command prompt, type reboot and press Enter. After your Linux system has been loaded, switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password of LINUXrocks!.
19
At the command prompt, type df -hT and press Enter. Is your new filesystem mounted?
20
At the command prompt, type umount /newmount and press Enter. Next, type the df -hT command to verify that the filesystem was unmounted correctly.
21
At the command prompt, type mount -a and press Enter. Next, type the df -hT command and press Enter. Is your new filesystem mounted again to /newmount? Why?
22
Type exit and press Enter to log out of your shell.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions