1, display the hard disk and its own partition situation. Enter the following command in the terminal window:
# sudo fdisk-lu
2, partition the hard disk. Enter the following command in the terminal window:
# sudo fdisk/dev/sdb
# Command (M for help): M view assistance
# Command (M for help): N creates a new partition and prompts to allocate size +50g
# Command (M for help): e Specifies that the partition is an extended partition (extended)
# Command (M for help): W Save
# sudo fdisk-lu View system has recognized the partition of the hard disk/dev/sdb
3, hard disk format
# sudo mkfs-t ext4/dev/sdb-t ext4 means partitioning the partition into a EXT4 file system type
4. Mount the hard disk partition
# sudo df-lh view partition status
# sudo mkdir/devdata build mount file directory
# sudo mount-t ext4/dev/sdb/devdata mount partition
# sudo df-lh check
Set up auto mount on boot
- sudo vim/etc/fstab
<file system> <mount point> <type> <options> <dump> <pass>
1 & nbsp 2 3 4 5 6
1 refers to the device name of the file system. Initially, the field contains only the device name (such as/DEV/SDA1) for the partition to mount. Now, in addition to the device name, you can also include a label or UUID
2 file system mount point. The file system contains all the data in the entire directory tree structure under the mount point, unless one of the directories mounts another file system
3 file system type. The following are the most common file system type (EXT3,TMPFS,DEVPTS,SYSFS,PROC,SWAP,VFAT)
4 mount command options. The Mount option includes Noauto (does not mount the file system at startup) and Ro (read-only mount file system). Adding a user or a master option in this field allows the user to mount the file system. Multiple options must be separated by commas. For information about other options, see the Mount Command man page (-o option)
5 dump file system? This field is only meaningful when you are backing up with dump. The number 1 indicates that the file system requires a dump, and 0 means that the Dump
6 file system check is not required? The number in this field indicates whether the file system needs to be checked with fsck. 0 means you do not have to check the file system, and the number 1 indicates that the file system needs to be checked first (for the root file system). The number 2 indicates that after the root file system check is completed, the following configuration information is added to the file system
file
- Label=/backup/backup ext3 defaults 1 2
Mount a partition's volume label name mount point mount partition file type mount mode
Or
- /dev/sdb/backup ext3 defaults 1 2
or manually mount at the command line (once every time you restart the machine)
- Mount-vl-t ext3/dev/sdb1/backup Mount File System/Display label
7. Restart the machine to view the results
- Df-h//view partition space usage, you can see that/backup is automatically mounted
- Filesystem Size used Avail use% mounted on
- /DEV/SDA1 139G 121G 12G %/
- Varrun 1. 3G 68K 1. 3G 1/var/run
- Varlock 1. 3G 0 1. 3G 0/var/lock
- Udev 1. 3G 32K 1. 3G 1/dev
- Devshm 1. 3G 0 1. 3G 0/dev/shm
- /DEV/SDB1 924G 11G 867G 2/backup
It worked
Workaround for the disk drive for/is not ready yet or not present after Ubuntu upgrade
By Magento Programmer on April 07, 2012
Upgrade the next Ubuntu, Boot failed, the following prompt appears:
The disk drive for/is isn't ready yet or not present
Google, finally found a solution, into the shell, get administrator rights, the command is as follows:
12 |
mount -o remount,rw / dpkg --configure -a |
Ubuntu File System