Disk and file system experiments
Create a new disk in the virtual machine, select the hard disk in the lower right corner of the virtual machine, open the settings and select the hard disk to add.
Open the terminal in the virtual machine and enter the init 6 command to restart the virtual machine. The hard disk of the virtual machine can be used after the restart.
Open the remote terminal (putty) to log in, enter the 'cd /dev' command: switch to the dev directory to view the newly added hard disk location information.
Create three primary partitions in the newly added hard disk sdb
Partition 1
Partition 2
Partition 3
Create extended partition
Create primary partition
Add partition by default
Change the partition type
Convert primary partition to swap partition
View disk device information
Format the disk sdb1
Mount the sdb1 disk to an empty folder
Format the swap swap partition
Enter the 'cat /porc/swaps' command to view the virtual memory of sdb5
Open virtual memory in 'sdb3'
Enter the 'fdisk -l' command to view disk information
Format the logical partitions sdb5 and sdb6
Create three empty folders for mounting and mount
sdb1, sdb2, and sdb5 to the accp, benet, and jazz folders
Unmount (umount) jazz
Create the folder jerry and mount the sdb1 disk to the jerry folder.
Restart the device to see if it is automatically mounted
. Implement automatic mounting at startup: switch to the etc directory to view the device information and mount point.
Enter editing, press 'G' to jump to the end of the line, press 'o' to jump to the next line to insert and modify
, mount jreey in it, press Esc to exit insert mode, press ':' to enter 'wq' (lowercase) to save and exit
Enter the 'init 6' restart command to see if it is automatically booted and mounted.
Automatically mount the CD-ROM: Enter 'vi /etc/fstab' to edit, press 'G' to switch to the end of the line, and press 'i' to insert and modify.
Open the virtual terminal and enter 'df -h' to view the mount point command to see if mnt is automatically mounted.
Open the remote terminal (putty) to log in, enter 'df -h' to view the mount point command to see if mnt is automatically mounted.
The experiment is over.