fdisk 分区
使用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 分区的更多相关文章
- linux 使用fdisk分区扩容
标签:fdisk分区 概述 我们管理的服务器可能会随着业务量的不断增长造成磁盘空间不足的情况,在这个时候我们就需要增加磁盘空间,本章主要介绍如何使用fdisk分区工具创建磁盘分区和挂载分区,介绍两种情 ...
- 第8章 文件系统管理(2)_挂载、fdisk分区及分配swap分区
3. fdisk分区 3.1 fdisk命令分区过程 (1)添加新硬盘 (2)查看新硬盘#fdisk –l (3)使用fdisk命令分区:#fdisk /dev/sdb Fdisk交互指令说明 命令 ...
- fdisk分区硬盘并shell脚本自动化
最近工作需要用到对硬盘进行shell脚本自动化分区和mount的操作,google了一些资料,下面做个总结. 如果硬盘没有进行分区(逻辑分区或者扩展分区,关于两者概念,自行google),我们将无法将 ...
- linux笔记:文件系统管理-fdisk分区
fdisk命令分区过程: 1.添加新硬盘 2.查看新硬盘: fdisk -l 3.使用fdisk命令分区: fdisk 硬盘设备文件名(如:fdisk /dev/sdb) fdisk交互指令说明: 4 ...
- fdisk 分区及 swap
使用虚拟机创建挂载点 一,创建 windows 硬盘 创建
- Fdisk 分区详解
Fdisk 分区详解 来源 http://blog.itpub.net/20674423/viewspace-722812/ 1. 通过Fdisk查看系统分区详细信息: Fdi ...
- Linux 入门记录:七、fdisk 分区工具
一.fdisk分区工具 fdisk 是来自 IBM 的老牌分区工具,支持绝大多数操作系统,几乎所有的 Linux 发行版都装有 fdisk,包括在 Linux 的 resuce 模式下依然能够使用. ...
- (转)linux磁盘分区fdisk分区和parted分区
linux磁盘分区fdisk分区和parted分区 原文:http://www.cnblogs.com/jiu0821/p/5503660.html ~~~~~~~~~~~~~~~~~~~~~~~~~ ...
- Linux的VMWare中Centos7磁盘分区管理 fdisk分区和制作文件系统格式化和开机自动挂载
一.硬盘的组成零件扇区 磁道 磁盘容量 磁盘分区 简介 硬盘由容量.柱面数.磁头数.扇区数 C/H/S, Cylinder, Head, Sector(柱面/磁头数/扇区数) 1.磁头数表示硬盘总共有 ...
随机推荐
- maven工程代码关联源代码配置
最近在学习dubbo,在maven构建完成后,需要关联查看一些依赖jar的源码,配置很简单,如下: 勾选windows-Preferences-Maven- Download Artifact Sou ...
- javascript第三弹——数组
什么是数组 数组是值的有序集合.每个值叫做元素,每个元素在数组中都有数字位置编号,也就是索引.JS中的数组是弱类型的,数组中可以含有不同类型的元素.数组元素甚至可以是对象或其它数组.数组的长度是动态的 ...
- Ajax注册验证用户名是否存在 ——引自百度经验
Ajax注册验证用户名是否存在 http://jingyan.baidu.com/article/a948d6515fdf870a2dcd2e85.html
- hdu Watch The Movie
这道题是二维背包的问题,因为这道题里面有时间l和可选数量m两个约束条件.只要0/1背包的基础上再加上一重循环即可,这题需要注意的是初始化的问题,初始化时只有m=0时dp数组为0,其它置为负数.再一个就 ...
- html5文章 -- HTML5开发实例-网易微博手机Web App开发过程
HTML5在国内外越来越受到互联网开发团队的青睐.国外,谷歌兴致勃勃地开发Chrome Web Store,微软发布了支持使用HTML5技术开发的“Irish Spring”主题网站,诺基亚斥巨资购得 ...
- 一些Office 365的问题收集
1. 按照MS的最佳实践, 应该是先有本地域, 然后再有Office 365. 但是我们公司刚好相反, 于是按照前面的文章做完了硬关联, 但是现在发现对于那些原本就在Office 365上的用户的Pr ...
- Codeforces Round #375 (Div. 2)——D. Lakes in Berland(DFS连通块)
D. Lakes in Berland time limit per test 2 seconds memory limit per test 256 megabytes input standard ...
- ci获取当前url链接的分组,控制器,方法
public function role() { $ci= &get_instance();//ci控制器超级对象,就是把所有执行的方法打印出来 $directory = substr($ci ...
- VS编程中找不到Microsoft.Office.Core、Microsoft.Office.Interop.Word和VBIDE
在使用vs2005. vs2008. vs2010 制作包含 word等office的应用程序时,有时找不到对Microsoft.Office.Core. Microsoft.Office.Inter ...
- Python在windows下的安装与配置
安装python 文件准备: A. python安装文件:我用的是python-3.4.3.amd64.msi: 安装很简单,直接双击点下一步即可: 配置环境变量,在windows系统变量中找到pat ...