博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
fdisk 分区
阅读量:7119 次
发布时间:2019-06-28

本文共 3483 字,大约阅读时间需要 11 分钟。

使用fdisk对SD卡进行从新分区。步骤如下:1. 查看分区情况## sudo fdisk -lDisk /dev/sda: 107.4 GB, 107374182400 bytes255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0005da7c   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *        2048   205522943   102760448   83  Linux/dev/sda2       205524990   209713151     2094081    5  Extended/dev/sda5       205524992   209713151     2094080   82  Linux swap / SolarisDisk /dev/sdb: 31.1 GB, 31104958464 bytes4 heads, 16 sectors/track, 949248 cylinders, total 60751872 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x3c0c54e0   Device Boot      Start         End      Blocks   Id  System/dev/sdb1            2048    60751871    30374912   83  Linux2. 卸载:    sudo umount /dev/sdb1/3. 对设备重新分区Qt@aplex:~$ sudo fdisk /dev/sdb# 删除分区Command (m for help): dNo partition is defined yet!# 新建分区Command (m for help): nPartition type:   p   primary (0 primary, 0 extended, 4 free)   e   extended# 主分区Select (default p): p# 分区编号Partition number (1-4, default 1): 1# 分区起始扇区位First sector (2048-60749823, default 2048): Using default value 2048# 分区最后的扇区Last sector, +sectors or +size{K,M,G} (2048-60749823, default 60749823): Using default value 60749823# 保存Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 22: Invalid argument.The kernel still uses the old table. The new table will be used atthe next reboot or after you run partprobe(8) or kpartx(8)Syncing disks.# 查看分区情况 Qt@aplex:~$ sudo fdisk -lDisk /dev/sda: 107.4 GB, 107374182400 bytes255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0005da7c   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *        2048   205522943   102760448   83  Linux/dev/sda2       205524990   209713151     2094081    5  Extended/dev/sda5       205524992   209713151     2094080   82  Linux swap / SolarisDisk /dev/sdb: 31.1 GB, 31104958464 bytes4 heads, 16 sectors/track, 949248 cylinders, total 60751872 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x3c0c54e0   Device Boot      Start         End      Blocks   Id  System/dev/sdb1            2048    60751871    30374912   83  Linux4. 对分区进行格式化Qt@aplex:~$ sudo mkfs.ext2 /dev/sdb1mke2fs 1.42 (29-Nov-2011)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks1900544 inodes, 7593728 blocks379686 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=4294967296232 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks:     32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,     4096000Allocating group tables: done                            Writing inode tables: done                            Writing superblocks and filesystem accounting information: done

转载地址:http://kqfel.baihongyu.com/

你可能感兴趣的文章
phpDocumentor学习使用记录
查看>>
手机端适配(二)
查看>>
深入理解Sping——AOP的试水
查看>>
Android NDK 开发(四)JNI 中局部引用、全局引用和弱全局引用
查看>>
你可能不知道的10条SQL技巧
查看>>
JavaScript的那些书
查看>>
Activity 生命周期(阅读官方文档后录)
查看>>
如何在Node.js中使用WebAssembly
查看>>
Grails In Action-05.Retrieving the data you need
查看>>
Java正则表达式校验用户信息
查看>>
IOS--设置导航A-B返回按钮文字
查看>>
香蕉派banana pi 参加2015 台北创客周
查看>>
Storm(二)demo
查看>>
程序员必须知道的10大基础实用算法及其讲解
查看>>
杭电2008
查看>>
如何理解 阻塞 非阻塞 同步 异步 的区别?
查看>>
sql命令(五)-子查询与连接
查看>>
CentOS6.5下Redis安装与配置
查看>>
JSP+JDBC_假分页
查看>>
mac实战mesos
查看>>