Command (m for help): m //看各个命令都有介绍 Command action a toggle a bootable flag //激活为启动标志 b edit bsd disklabel c toggle the dos compatibility flag d delete a partition //删除一个分区 l list known partition types m print this menu n add a new partition //添加一个新的分区 o create a new empty DOS partition table p print the partition table //打印分区信息 q quit without saving changes s create a new empty Sun disklabel t change a partition's system id //改变分区文件系统 u change display/entry units v verify the partition table w write table to disk and exit //保存分区信息 x extra functionality (experts only) Command (m for help):d //如果只有一个分区直接删除,如果多个分区,会出现个数字,自己选要 删除的分区 Command (m for help):n //添加新分区 Partition type: p primary (2 primary, 0 extended, 2 free) //主分区 e extended //扩展分区 Command (m for help):p //一般选p Partition number (1-4, default 1): 1 //默认从第一个分区开始添加 First sector (2048-15523839, default 2048): //从什么地方开始分,比如8G内存,一共会有 11523839个sector,从2048开始,那就是留出了2048*512=1M。这个是sd卡保存信息保留位置。 Command (m for help):t //给分区选一个格式,是linux还是FAT32 Selected partition 1 //选择第一个分区,设定格式 Hex code (type L to list codes): l //显示可以设定的格式 很多这里不列 //Hex code (type L to list codes): b //做FAT32 Hex code (type L to list codes): 83 //这就是linux的设置 Command (m for help): w //保存
GNU/Linux 必须能够将根文件系统挂载于文件树的根(/)上。当根挂载完成之后,您就可以将其他文件系统挂载与树形结构各种挂载点上。根结构下的任何目录都可以作为挂载点,而也可以将同一文件系统同时挂载于不同的挂载点。挂载点实际上就是 linux 中磁盘文件系统的入口目录: 关于文件系统的三个易混淆的概念: 创建:以某种方式格式化磁盘的过程就是在其之上创建一个文件系统的过程。创建文件系统时,会在磁盘的特点位置写入关于该文件系统的控制信息。 注册:向内核报道,声明自己能被内核支持。一般在编译内核的时候注册;也可以加载模块的方式手动注册。注册过程实际上是将表示各实际文件系统的数据结构 struct file_system_type 实例化。 安装:也就是我们熟悉的 mount 操作,将文件系统加入到 Linux 的根文件系统的目录树结构上,这样文件系统才能被访问。