Use the Linux self-bring tool fdisk partition
Start Fdisk as root (Disk-device-shaped like/dev/sdb) fdisk/dev/sdb
If it's a new disk or if you want to repartition it, use the O command to create a new empty DOS partition table
Create a new partition using the n command (primary partition/First partition)
Use +xG
a format that specifies a partition size of x GB. For example, if you need to create a section of the GiB, you need to enter it +15G
.
Use the t
command to modify the partition's ID from the default value to Linux ( type 83
). This is an optional step. This is also possible if the user wants to create other types of partitions, such as SWAP,NTFS,LVM. Note that a complete list of available partition types can be l
obtained by command.
Other partitions are handled in a similar manner.
Use w
the command to write the partition table to disk and exit.
Format the new partition as a file system for example: MKFS.EXT3/DEV/SDB1
Now that the partition is ready, the Mount Mount/dev/sdb1/mydisk can be used, but the system does not have permission to operate the disk when switching to a normal account, very simple.
Switch to the root user, open the properties of the disk has a permission set, access settings for read and write, group set as a user group.
Mobile HDD u disk partition, format and general user access rights under Linux