Home disk space is not enough, other idle hard disk is the original Windows, not directly use (disk format and permissions and other reasons), such as compiling Android source code.
In this case, you will need to format the new disk into a FAT32 and then mount it to a directory under/home, which makes it easy to use.
The steps are as follows:
1. Format the disk:
A. Using the command:
sudo mkfs-t ext3/dev/sdb1
It takes time to wait, if the progress starts after execution and is being executed.
The final display is as follows:
Java code
MKE2FS 1.41.14 (22-dec-2010)
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
12804096 inodes, 51199147 blocks
2559957 blocks (5.00%) reserved for the Super user
First Data block=0
Maximum filesystem blocks=0
1563 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing Inode Tables:done
Creating Journal (32768 blocks): Done
Writing superblocks and filesystem accounting Information:done
This filesystem'll be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
is a sign of success.
The B.SDB1 is viewed with the DF command, listing the list of mounted devices.
If you execute a, the following prompt appears:
Java code
MKE2FS 1.41.14 (22-dec-2010)
/DEV/SDB1 is mounted; Won't make a filesystem here!
Indicates that the disk is mounted and needs to be mounted:
Execute command:
sudo umount/dev/sdb1
Note: It's umount, not unmount!
Execute this command and then execute a.
C. The disk cannot be mounted directly under the home, but can only be mounted to the MNT:
Execute the command to mount under/MNT:
sudo mkdir-p/mnt/dir
The command is to create a new directory named Dir under/mnt, which you can take, of course.
And then:
sudo gedit/etc/fstab
This command opens the Fstab file and adds a line in it as follows:
/dev/sdax/mnt/dir ext3 relatime 0 2
sudo mount-a
This command causes the mount to take effect.
Then execute the command to open the file permissions:
Java code
sudo chmod 777-r/mnt/dir
Ln-s/mnt/dir ~/dir
This is the/mnt/dir to build a soft link to the Dir directory in the home directory
In the future, you can simply open dir in the main directory and access the/mnt/dir directly.
OK, now enter the Dir directory under your home to do whatever you please, haha.
Ubuntu mounts new disks to home