使用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. COJ983 WZJ的数据结构(负十七)

    显然是动态树裸题:O(mlogn) #include<cstdio> #include<cstring> #include<algorithm> #include& ...

  2. C# params object[] args 可以传多个参数,可以不限制类型(转)

    C# params object[] args 可以传多个参数,可以不限制类型 using System;using System.Collections.Generic;using System.T ...

  3. RN组件之ScrollView

    一.ScrollView 该组件封装了Android平台的ScrollView(滚动组件),并且提供触摸事件"responder"系统功能.使用ScrollView的时候 确保有一 ...

  4. 连接mysql遇到的问题

    1. 首先使用一个用户名不行时,可以新建一个用户名点击用户,输入名和密码,此时一定要记住密码,别忘了.不过也可以点击编辑用户改.此时连接时发现还是连接不上.出现错误信息为: Access denied ...

  5. PAT (Top Level) Practise 1008 Airline Routes(Tarjan模版题)

    1008. Airline Routes (35) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue Given a ...

  6. Linux文件管理命令

    cd /home 进入 '/ home' 目录' cd .. 返回上一级目录 cd ../.. 返回上两级目录 cd 进入个人的主目录 cd ~user1 进入个人的主目录 cd - 返回上次所在的目 ...

  7. Failed to connect to remote VM. Connection refused. Connection refused: connect.

    eclipse debug启动经常出现这个错误,已经启动了debug进程,X掉重新启动即可.

  8. razor 添加html5属性

    在 HTML5 中, 可以使用 data- 属性来表示用户数据,这些数据甚至可以是 JSON 格式的数据,对 Web 前端开发带来很大的方便. 在 MVC 的 Razor 中,可以使用匿名对象来生成定 ...

  9. MongoDB性能监控

    1.mongostat 查看运行中的mongodb实例的统计信息 重要指标说明: getmore: 通常发生在结果集比较大的查询时,第一个query返回了部分结果,后续的结果是通过getmore来获取 ...

  10. docker安装与启动

    安装docker [root@localhost /]# yum -y install docker-io     更改配置文件 [root@localhost /]# vi /etc/sysconf ...