使用fdisk对SD卡进行从新分区。步骤如下:

1. 查看分区情况
## sudo fdisk -l Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk 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 / Solaris Disk /dev/sdb: 31.1 GB, 31104958464 bytes
4 heads, 16 sectors/track, 949248 cylinders, total 60751872 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3c0c54e0 Device Boot Start End Blocks Id System
/dev/sdb1 2048 60751871 30374912 83 Linux 2. 卸载:
sudo umount /dev/sdb1/ 3. 对设备重新分区 Qt@aplex:~$ sudo fdisk /dev/sdb
# 删除分区
Command (m for help): d
No partition is defined yet!
# 新建分区
Command (m for help): n
Partition 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): w
The 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 at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks. # 查看分区情况
Qt@aplex:~$ sudo fdisk -l Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk 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 / Solaris Disk /dev/sdb: 31.1 GB, 31104958464 bytes
4 heads, 16 sectors/track, 949248 cylinders, total 60751872 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3c0c54e0 Device Boot Start End Blocks Id System
/dev/sdb1 2048 60751871 30374912 83 Linux 4. 对分区进行格式化 Qt@aplex:~$ sudo mkfs.ext2 /dev/sdb1
mke2fs 1.42 (29-Nov-2011)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1900544 inodes, 7593728 blocks
379686 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
232 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 Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

fdisk 分区的更多相关文章

  1. linux 使用fdisk分区扩容

    标签:fdisk分区 概述 我们管理的服务器可能会随着业务量的不断增长造成磁盘空间不足的情况,在这个时候我们就需要增加磁盘空间,本章主要介绍如何使用fdisk分区工具创建磁盘分区和挂载分区,介绍两种情 ...

  2. 第8章 文件系统管理(2)_挂载、fdisk分区及分配swap分区

    3. fdisk分区 3.1 fdisk命令分区过程 (1)添加新硬盘 (2)查看新硬盘#fdisk –l (3)使用fdisk命令分区:#fdisk /dev/sdb Fdisk交互指令说明 命令 ...

  3. fdisk分区硬盘并shell脚本自动化

    最近工作需要用到对硬盘进行shell脚本自动化分区和mount的操作,google了一些资料,下面做个总结. 如果硬盘没有进行分区(逻辑分区或者扩展分区,关于两者概念,自行google),我们将无法将 ...

  4. linux笔记:文件系统管理-fdisk分区

    fdisk命令分区过程: 1.添加新硬盘 2.查看新硬盘: fdisk -l 3.使用fdisk命令分区: fdisk 硬盘设备文件名(如:fdisk /dev/sdb) fdisk交互指令说明: 4 ...

  5. fdisk 分区及 swap

    使用虚拟机创建挂载点 一,创建 windows 硬盘        创建  

  6. Fdisk 分区详解

    Fdisk 分区详解 来源 http://blog.itpub.net/20674423/viewspace-722812/ 1.             通过Fdisk查看系统分区详细信息: Fdi ...

  7. Linux 入门记录:七、fdisk 分区工具

    一.fdisk分区工具 fdisk 是来自 IBM 的老牌分区工具,支持绝大多数操作系统,几乎所有的 Linux 发行版都装有 fdisk,包括在 Linux 的 resuce 模式下依然能够使用. ...

  8. (转)linux磁盘分区fdisk分区和parted分区

    linux磁盘分区fdisk分区和parted分区 原文:http://www.cnblogs.com/jiu0821/p/5503660.html ~~~~~~~~~~~~~~~~~~~~~~~~~ ...

  9. Linux的VMWare中Centos7磁盘分区管理 fdisk分区和制作文件系统格式化和开机自动挂载

    一.硬盘的组成零件扇区 磁道 磁盘容量 磁盘分区 简介 硬盘由容量.柱面数.磁头数.扇区数 C/H/S, Cylinder, Head, Sector(柱面/磁头数/扇区数) 1.磁头数表示硬盘总共有 ...

随机推荐

  1. Delphi中控制Excel(转载)

    用Delphi从数据库中取得资料,然后导出到Excel中做成报表是个不错的选择,因为Excel强大的报表功能那可是没话说前提Delphi中要 uses comobj;var Excel:Variant ...

  2. VTKMY 3.3 VS 2010 Configuration 配置

    Download VTKMY 3.3 Download VS2010 Download CMake 3.2.0 I assume you've already installed VS2010 and ...

  3. 使用javabean连接数据库时遇到的问题

    1.whitespace问题.是便签了每空格如: 就会出现下面的问题.contentType前每空格.空格后就解决了 2. 这是部署问题,关闭,重新部署 追问 怎么部署? 回答 1.选中项目 F5(e ...

  4. opengl画圆

    通过这个例子可以更加深刻的了解割圆术的原理,明白如何的化曲为直,且看代码: #include <windows.h> //#include <GLUT/glut.h> #inc ...

  5. 如何进行SCCM中客户端记录信息维护

    SCCM 部署完毕之后,不久我们就会发现客户端代理状态,因为重装系统,非正常的退域,长时间不开机,导致客户端状态有不可用的,有过期的,重复的记录很多.当然我们可以手动的快速删除重复的记录,那么怎么能做 ...

  6. fail2ban 保护

    Fail2ban是一款非常使用的软件,它能够监控系统日志,能够有效的防止ssh被暴力破解,下面小编将针对Fail2ban在Linux下的安装和使用给大家做个介绍,一起来了解下吧. https://gi ...

  7. HTML5 javascript CSS3 jQuery Mobile一些好用的网站

    jQueryMobile:学习 http://www.runoob.com/jquerymobile/jquerymobile-tutorial.html 百度 CDN: http://cdn.cod ...

  8. 每天php函数 - explode() 使用一个字符串分割另一个字符串

    array explode ( string $delimiter , string $string [, int $limit ] ) 此函数返回由字符串组成的数组,每个元素都是 string的一个 ...

  9. 每天php函数 - str_replace()

    mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] ) 该函数返回一个字符 ...

  10. 正则匹配中文.PHP不兼容的问题

    不使用: ^[\u4e00-\u9fa5_a-zA-Z0-9_]+$ 有可能兼容有问题 if(!preg_match_all("/^[\\x7f-\\xff_a-zA-Z0-9]+$/&qu ...