Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab 2: This exercise will demonstrate how to partition, format, and mount a drive for use on a Linux system using a USB memory stick.
Lab 2:
This exercise will demonstrate how to partition, format, and mount a drive for use on a Linux system using a USB memory stick. Youll need to have an empty USB memory stick available for this exercise. All data will be deleted from the USB memory stick.
Pre-Lab configuration settings:
- You will need to a USB memory stick of any size. Also, you will need to back-up the data on the USB memory stick , do the lab and then load the original data.
- Since youre using a virtual machine (VM) environment, you will need to configure the VM to recognize the new USB device.
Lab tasks:
- Insert a USB memory stick into your system. For VirtualBox, click the Devices menu bar item, then select USB, and then the USB device name.
- The Linux system should mount the device automatically. Type dmesg | tail to display the last few lines from the system console output. This should show if the USB device was mounted and, if so, the device name assigned to it, such as /dev/sdb1.
- Unmount the device using the command sudo umount /dev/xxxx, where xxxx is the device name shown from the dmesg output.
- Type fdisk /dev/xxx to partition the disk, where xxx is the device name, without the partition number (such as /dev/sdb). At the command prompt, type p to display the current partitions.
- Remove the existing partition by typing d.
- Create a new partition. Type n to create a new partition. Type p to create a primary partition. Type 1 to assign it as the first partition. Press the Enter key to accept the default starting location and then press the Enter key again to accept the default ending location. Type y to remove the original VFAT signature if prompted.
- Save the new partition layout. Type w to save the partition layout and exit the fdisk program.
- Create a new filesystem on the new partition. Type sudo mkfs -t ext4 /dev/xxx1, where xxx is the device name for the USB memory stick.
- Create a new mount point in your home folder. Type mkdir mediatest1.
- Mount the new filesystem to the mount point. Type sudo mount -t ext4 /dev/xxx1 mediatest1, where xxx is the device name. Type ls mediatest1 to list any files currently in the filesystem.
- Use dumpe2fs command to display details about the ext4 file system, and explain each of the different filesystem features printed after executing the command.
- Remove the USB stick by typing sudo umount /dev/xxx1, where xxx is the device name.
- You will need to return the USB memory stick to a Windows format, you can change the filesystem type of the USB memory stick to VFAT, or you can reformat it using the Windows format tool in File Manager.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started