0% found this document useful (0 votes)
8 views13 pages

Cyb202 Lab5

The document is a lab report for CYB202: Linux Administration, detailing various projects related to device files, mounting removable media, creating partitions, and configuring LVM. It includes steps for creating and managing device files, mounting ISO images, and verifying filesystem changes. The report also covers commands used and their outcomes, demonstrating practical Linux administration skills.

Uploaded by

alankrutha devu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views13 pages

Cyb202 Lab5

The document is a lab report for CYB202: Linux Administration, detailing various projects related to device files, mounting removable media, creating partitions, and configuring LVM. It includes steps for creating and managing device files, mounting ISO images, and verifying filesystem changes. The report also covers commands used and their outcomes, demonstrating practical Linux administration skills.

Uploaded by

alankrutha devu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

CYB202 Linux

Lab-5 Administration

CYB 202: Linux Administration


Lab - 5

STUDENT NAME: ALBIN JOY


STUDENT ID: 23105742
SECTION: CYB309

1
CYB202 Linux
Lab-5 Administration

Project 5.1: Create device files

Step 2

 What device does /dev/tty6 represents?

‘/dev/tty6’ represents a terminal device, specifically the terminal corresponding to

the sixth virtual console. In Linux, virtual consoles are accessed using the

‘Ctrl+Alt+F1’ through ‘Ctrl+Alt+F6’ keys.

 Is this file a block or character device file? Why?

‘/dev/tty6’ is a character device file because it provides unbuffered, direct access

to the terminal, handling data one character at a time.

 What are the major and minor numbers for this file?

The major and minor numbers for ‘/dev/tty6’ can be found in the output of the ‘ls -

l’ command. So, the major number for ‘/dev/tty6’ is 4, and the minor number is 6.

2
CYB202 Linux
Lab-5 Administration

Step 3

Was the file removed successfully?

Yes, the file was removed successfully, as confirmed by the absence of ‘/dev/tty6’ when I

list it.

Step 4
Were you successful to login at tty6?
No, because the ‘/dev/tty6’ device file was removed, making the terminal inoperable.

Step 5

What did this command do? Was the file re-created successfully?
The command ‘mknod /dev/tty6 c 4 6’ re-created the ‘/dev/tty6’ character device file with

major number 4 and minor number 6. Yes, the file was re-created successfully, as

confirmed by the presence of /dev/tty6 when I list it.

Step 6

Why were you successful?

Yes, because the /dev/tty6 device file was re-created, making the terminal operable again.

3
CYB202 Linux
Lab-5 Administration

Step 7

 What is similar about all these files?

All these files are character device files with similar permissions and ownership.

 Is the major number different for each file?

The major number is the same (4) for each file, indicating they use the same
driver.

 Is the minor number different for each file?

The minor number is different for each file, distinguishing each virtual terminal

individually.

Step 8

 Are there many files?

Yes, there are many files under /dev directory.

 How large in KB are all files within the /dev directory? Why?
The size of all files within the /dev directory is very small (typically 0 KB or a few

KB) because most of these files are device nodes, not actual files, and do not

take up significant disk space.

4
CYB202 Linux
Lab-5 Administration

Step 9

 What character devices have a major number of 4?

Character devices with a major number of 4 are typically terminal devices

(/dev/tty*)

 How does this compare with what you observed in Step 2?

Matches what was observed in Step 2, where /dev/tty6 also had a major number

of 4.

Project 5.2: Mount Removeable media

Step 2

 Is there an icon that represents your Fedora Live installation media in the left
pane?

Yes, there is an icon representing Fedora Live installation media in the left pane of

the Files application.

 Which directory was your ISO image automatically mounted to?

The ISO image is automatically mounted to a directory like

‘/run/media/<username>/Fedora-Live’.

5
CYB202 Linux
Lab-5 Administration

Step 4

 Is your ISO image still mounted?

Yes, the ISO image is still mounted.

 What filesystem type is used?

The filesystem type used is typically ‘iso9660’.

 What device file is used?

The device file used is ‘/dev/sr0’ or similar.

 Is /dev/ cdrom a symbolic link to this device file?


Yes, ‘/dev/cdrom’ is a symbolic link to this device file.

6
CYB202 Linux
Lab-5 Administration

Step 5

The command ‘umount /dev/cdrom; successfully unmounts the Fedora DVD. The ‘du -hT’

command confirms that the ISO image is no longer mounted.

Step 6

The ‘/etc/hosts’ file is not copied to ‘/mnt’ because it is not mounted.

Step 7

The warning received is likely "mount: /mnt: mount point does not exist." The ‘du -hT’

command confirms that the ISO image is now mounted to the ‘/mnt’ directory.

Step 8

7
CYB202 Linux
Lab-5 Administration

Yes, the output of both mount and ‘cat /etc/mtab’ is more verbose than ‘du -hT’, as it

provides detailed information about all currently mounted filesystems, including their

mount points, device files, and options used.

Step 9

 Are the contents of the ISO image the same as Step 2?

Yes, the contents of the ISO image are the same as in Step 2, displaying the files

and directories within the Fedora Live ISO.

Step 10

 What error did you receive?


The error received is "umount: /mnt: target is busy." The ‘fuser -u /mnt’ command

shows that you are currently using the ‘/mnt’ directory, preventing unmounting.

8
CYB202 Linux
Lab-5 Administration

Project 5.3: Create Partitions and ext4 Filesystems

Step 2

Use ‘lsblk’ to identify the storage device file holding existing partitions and view the

partitions under it.

Step 4

Use fdisk with the p command to view and verify the partition table on the storage

device (/dev/sda), checking for consistency with previously noted partitions and

identifying the partitioning scheme (MBR or GPT).

G
CYB202 Linux
Lab-5 Administration

Step 8

 Which character would you type at the fdisk prompt to change the type

of partition?

Type ‘t’ at the fdisk prompt to change the type of partition.

Step 9

Typing ‘w’ saves the changes made to the partition table and exits the fdisk utility.

Step 13

The new ext4 filesystem is mounted to ‘/newmount’, and its successful mount is verified

with the ‘df -hT’ command.

Step 14

After mounting the new partition, the ‘lost+found’ directory should be present, and after

copying the hosts file to ‘/newmount’, both ‘lost+found’ and ‘hosts’ should be visible

when listing the contents of ‘/newmount’.

10
CYB202 Linux
Lab-5 Administration

Step 19

The ‘df -h’ command confirms if the new filesystem is automatically mounted after reboot.

Step 20

The ‘umount /newmount’ command unmounts the filesystem, and the ‘df -hT’ command

verifies that it was unmounted correctly.

Step 21

The ‘mount -a’ command remounts all filesystems listed in ‘/etc/fstab’, and the ‘df -hT’

command verifies that the new filesystem is mounted again to ‘/newmount’ because it

was added to ‘/etc/fstab’.

11
CYB202 Linux
Lab-5 Administration

Project 5.4: Configure the LVM

Step 2

Use ‘parted’ followed by the storage device file (e.g., /dev/sda) to initiate the GNU Parted

utility and view available commands for partitioning and managing the device.

Step 3

12
CYB202 Linux
Lab-5 Administration

Write down the maximum size of your storage device?

135 GB

Step 7

Use ‘parted’ to view the partition table on your storage device and note the device file

for the newly created 1 GB partition, along with its End value, to prepare for further

configuration in LVM.

13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy