disk management
2015-10-27 22:28
267 查看
partition --> format --> mount
disk partition mode
MBR
the main partition is not more than 4
single partition capacity maximum 2TB
GPT
the main partition is not limited
single partition capacity is not limited
** but not suitable for the installation of X86 system.
command:
fdisk -l list partition tables
fdisk <diskname> change partition table (only MBR)
m for help
d delete a partition
n add a new partition
w write table to disk and exit
parted (the first disk is default) change partition table (MBR or GPT)
help print the general help
select [device] choose the device to edit
mklabel [label type] create a new disk label
print display the partition table
mkpart [part-name] [start] [end] make a partition
rm [number] delete partition number
quit exit program
mkfs format disk using specified file system
mkfs.[file system type] [device]
mkfs -t [file system type] [device]
mount partition
the default dir is /mnt
must mount a partition to an existing directory
mount -t [file system type] [device] [directory]
eg. mount -t ext4 /dev/sdb1 /mnt/rt8633 ( * just temporary)
vi /etc/fstab
add this: /dev/sdb1 /mnt/rt8633 ext4 defaults 0 0
( * it will mount the specified device automaticlly after OS is restarted)
swap partition
how to make a swap partition
1. make a normal linux partiton
2. modify hexadecimal code of the partiton type fdisk [device] -> t (change hex code to swap code(L to show all codes))
3. format swap partition mkswap [device]
4. enable swap partition swapon [device] / swapoff [device]
disk partition mode
MBR
the main partition is not more than 4
single partition capacity maximum 2TB
GPT
the main partition is not limited
single partition capacity is not limited
** but not suitable for the installation of X86 system.
command:
fdisk -l list partition tables
fdisk <diskname> change partition table (only MBR)
m for help
d delete a partition
n add a new partition
w write table to disk and exit
parted (the first disk is default) change partition table (MBR or GPT)
help print the general help
select [device] choose the device to edit
mklabel [label type] create a new disk label
print display the partition table
mkpart [part-name] [start] [end] make a partition
rm [number] delete partition number
quit exit program
mkfs format disk using specified file system
mkfs.[file system type] [device]
mkfs -t [file system type] [device]
mount partition
the default dir is /mnt
must mount a partition to an existing directory
mount -t [file system type] [device] [directory]
eg. mount -t ext4 /dev/sdb1 /mnt/rt8633 ( * just temporary)
vi /etc/fstab
add this: /dev/sdb1 /mnt/rt8633 ext4 defaults 0 0
( * it will mount the specified device automaticlly after OS is restarted)
swap partition
how to make a swap partition
1. make a normal linux partiton
2. modify hexadecimal code of the partiton type fdisk [device] -> t (change hex code to swap code(L to show all codes))
3. format swap partition mkswap [device]
4. enable swap partition swapon [device] / swapoff [device]
相关文章推荐
- 5.变址寄存器-ESI和EDI寄存器与其用途
- HDFS架构和分布式文件系统
- SQL语句优化技术分析
- HDU4607(最大直径 树DP)
- CC2640 SimpleBLEPeripheral例程-2
- python 装饰器
- python初学--day1
- 字符串操作函数的实现
- LightOJ - 1004 Monkey Banana Problem(DP)
- UVA - 11375-Matches-dp+高精度
- ListView (加载、删除) 动画
- 目录和文件管理
- cocos3.x版本下载
- 反射机制--Field
- python学习笔记(六)切片
- python学习笔记(七)迭代
- 如何在mac上搭建GitHub
- singleton和prototype
- jQuery诞生记-原理与机制
- python学习笔记(五)函数