Question

In: Computer Science

Part I– Check your file system Step 1: Execute the ls /dev/sd* command to see the...

Part I– Check your file system

Step 1: Execute the ls /dev/sd* command to see the current hard disk devices.

Step 2. Execute the fdisk -l command to list the current hard disk partitions

Step 3. Execute the parted -l command to list the current hard disk partition table.

Part II– Create a new virtual disk

Step 1. In the Oracle VM VirtualBox Manager program, create a new virtual hard disk with the size of 200 MB, and name it as “your_name.vdi” (for example, jbondsvdi).

Step 2. Load this virtual hard disk to your virtual machine.

Step 3. Repeat the steps in Part I, and highlight the differences

Part III– Creating Partitions and Filesystems

Step 1. Use the fdisk command to create a new primary partition on the new hard disk.

Step 2. Use the correct command to create an ext4 filesystem on the new partition.

Step 3. Repeat the steps in Part I, and highlight the differences

Step 4. Make a new directory named /cyse. And mount the new partition under this directory.

Step 5. Use the df command to check the mounting point of the new partition.

Step 6. Create a new file named file1.txt in the directory /cyse and put your name in that file

Step 7. Unmount /cyse directory.

Step 8. Check the contents in /cyse directory. What do you find?

Solutions

Expert Solution

Step 1: Execute the ls /dev/sd* command to see the current hard disk devices. We can see that no external drive is present right now in my system.

Step 2. Execute the fdisk -l command to list the current hard disk partitions. Right now it is showing the information about the default hard disk that is attached to the system while configuring it.

Step 3. Execute the parted -l command to list the current hard disk partition table. This command shows the partitions.

After creating the new virtual disk and loading it in the virtual machine, we can see changes when we run the above commands.

ls /dev/sd* shows one directory. This means that the external hard disk has been successfully loaded.

fdisk -l shows one new entry of the attached disk.

parted -l also shows a new entry.

Creating the partition on /dev/sda using the fdisk command.

Creating the ext4 filesystem on this partition using the mkfs.ext4 command.

Running the steps in Part 1 again. ls /dev/sd* shows that a new partition has been created.

fdisk -l shows a new entry of the partitioned drive.

parted -l also shows that a new partition has been created for the drive /dev/sda.

Making the /cyse directory and mounting it on the partition using mkdir and mount command.

Running the 'df' command shows our mounted partition. (last line of the output)

Now we write the name in /cyse/file1,txt file and verify it using the cat command. We can see the file is successfully created.

After unmounting /cyse and checking the contents we can see that it is empty. file1.txt cannot be seen here.

This is because the file was created after we mounted the partition. Therefore it is saved in the partition and not in the directory. If we again mount it, we will be able to see it.

You can consider the partition as a pen drive and mounting as attaching it to the system. When you create a file in the pen drive, it only remains there. After you remove it, you can't access the file. Same happens here.


Related Solutions

Linux Directories, File Properties, and the File System in C Code your version of mv command...
Linux Directories, File Properties, and the File System in C Code your version of mv command in C The mv command is more than just a wrapper around the rename system call. Write a version of mv that accepts two argument. The first argument must be the name of a file, and the second argument may be the name of a file or the name of a directory. If the destination is the name of a directory, then mv moves...
Linux Directories, File Properties, and the File System in C Your version of find command Try...
Linux Directories, File Properties, and the File System in C Your version of find command Try running the find command in the shell and observe the output. Try it in different folders to make sure you understand what it prints out. $ find Write your version of the find command and add comments.
Part I. You have been provided check figures. In good form, prepare a multiple step income...
Part I. You have been provided check figures. In good form, prepare a multiple step income statement, statement of retained earnings, and classified balance sheet. Include Earnings Per Share on the Income Statement. You must use Excel. In Excel, use the Bottom Border function, not the Underline function. Also, use the Accounting format for cells, not Currency. However, do not show decimal places. Nobody is counting pennies. Refer to 211 regarding the placement of $, underlining and double underlining. Show...
Ubuntu Linux HW2: 1. Give one line of the Linux command to see your (your login...
Ubuntu Linux HW2: 1. Give one line of the Linux command to see your (your login ID) credential data from the passwd file. Use a pipe and grep command. 2. Give one line of the Linux command to calculate the following and save it in the hex to a file calcOut. Use bc and <<<. 3+2*4 Submit Screenshots HW3: Permission Show the result clearly after each of the following commands are executed. 1. Create a subdirectory, “HW3”. Write the Linux...
Cost Accounting Project Part I Template Project Part I 1 An overview of the job-costing system...
Cost Accounting Project Part I Template Project Part I 1 An overview of the job-costing system is: 2 Budgeted manufacturing overhead divided by allocation base: a. Machining Department: b. Finishing Department: Show work 3 Machining Department overhead Finishing Department overhead Total manufacturing overhead allocated $0 4 Total costs of Job 431: Direct costs: Show work Direct materials Machining Department Finishing Department Direct manufacturing labor Machining Department Finishing Department 0 Indirect costs: Machining Department overhead Finishing Department overhead 0 Total costs...
Step 1: Your program will now take its input from this file instead of from the...
Step 1: Your program will now take its input from this file instead of from the user. Here's what you want to do: Remove the call to getUserInput(). You can also remove its definition and prototype if you like. For reasons that will become clear later, don't close the file until just before the return statement at the end of main. Run your code to make sure that the file is opened and read correctly. Hint: you may test the...
Fiscal Policy Part 1 - Check Your Understanding-​ ​ U​ se the information in the paragraph...
Fiscal Policy Part 1 - Check Your Understanding-​ ​ U​ se the information in the paragraph to answer the questions. Assume that policymakers believed that the marginal propensity to consume (MPC) was 0.9. Following the announcement in December 2008 that the U.S. economy had been in a recession since December 2007, Congress and President Obama passed the A​merican Recovery and Reinvestment Act (ARRA) into law in February 2009. The ARRA cut taxes by $288 billion, increased government spending by $275...
In java program format Submit your completed UML class diagram and Java file. Part I: Create...
In java program format Submit your completed UML class diagram and Java file. Part I: Create a UML diagram for this assignment PartII: Create a program that implements a class called  Dog that contains instance data that represent the dog's name and age.   define the Dog constructor to accept and initialize instance data.   create a method to compute and return the age of the dog in "person-years" (note: dog age in person-years is seven times a dog's age).   Include a toString...
In java program format Submit your completed UML class diagram and Java file. Part I: Create...
In java program format Submit your completed UML class diagram and Java file. Part I: Create a UML diagram for this assignment PartII: Create a program that implements a class called Dog that contains instance data that represent the dog's name and age. define the Dog constructor to accept and initialize instance data. create a method to compute and return the age of the dog in "person-years" (note: dog age in person-years is seven times a dog's age). Include a...
need c++ format 1.Check endianness on your system . Either Big or Little Endian 2.Convert a...
need c++ format 1.Check endianness on your system . Either Big or Little Endian 2.Convert a decimal number to 2’s complement (32bits) E.g., 5 -> 0000 0000 0000 0000 0000 0000 0000 1001    here is the start code ********************************************************* #include <iostream> using namespace std; void endianness(); void get_two_complement(); void print_menu(); int main(){ int menu; do { print_menu(); cout<< "Enter a number to select the menu: "; cin >>menu; if(menu == 1){ endianness(); } else if (menu == 2){ get_two_complement(); }...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT