Linux command parted

Purpose

       Learning linux command parted to manipulate disk partitions

 

Eevironment

       Ubuntu 16.04 terminal

 

Procdeure

       example:

parted -s $DRIVE mklabel msdos
parted -s $DRIVE unit cyl mkpart primary fat32 --
parted -s $DRIVE set boot on
parted -s $DRIVE unit cyl mkpart primary ext2 -- - mkfs.vfat -F -n "boot" ${DRIVE}
mkfs.ext3 -L "rootfs" ${DRIVE} << EOM
y
EOM
sync
sync mount -t vfat ${DRIVE} tmp_boot
mount -t ext3 ${DRIVE} tmp_rootfs

and cyl size is 8225kB, we can find from:

root@IoTP:~# parted
GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit cyl print
Model: SD SD16G (sd/mmc)
Disk /dev/mmcblk0: 1904cyl
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: ,,. Each cylinder is 8225kB.
Partition Table: msdos
Disk Flags: Number Start End Size Type File system Flags
0cyl 9cyl 8cyl primary fat32 boot, lba
9cyl 1902cyl 1893cyl primary ext3

Linux command parted的更多相关文章

  1. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  2. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  3. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

  4. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

  5. Linux Command Line 解析

    Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...

  6. 15 Examples To Master Linux Command Line History

    When you are using Linux command line frequently, using the history effectively can be a major produ ...

  7. 10 Interesting Linux Command Line Tricks and Tips Worth Knowing

    I passionately enjoy working with commands as they offer more control over a Linux system than GUIs( ...

  8. Reso | The Linux Command Line 的中文版

    http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...

  9. [笔记]The Linux command line

    Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...

随机推荐

  1. TypeError: add() argument after * must be an iterable, not Settings的错误原因

    在抄代码的时候发现有个错误: TypeError: add() argument after * must be an iterable, not Settings 看不懂,百度才知道原因,原来是第2 ...

  2. aar的使用(module或者library)

    引入: 1. android studio正常的module引用aar文件需要配置如下: ① 在module的build.gradle的android节点下 repositories { flatDi ...

  3. Zabbix报警执行远程命令

    日常Zabbix报警案例中,大多都是报警发送邮件,场景里很少有需要报警后执行一个命令(启动服务.清空磁盘空间.关停服务器);而今天就给大家讲讲最近需要做的事:报警后执行远程命令 刚好zabbix动作中 ...

  4. Android 虹软免费人脸识别 SDK开发

    目前我们的应用内使用了 ArcFace 的人脸检测功能,其他的我们并不了解,所以这里就和大家分享一下我们的集成过程和一些使用心得集成ArcFace FD 的集成过程非常简单在 ArcFace FD 的 ...

  5. kbengine学习1 安装

    KBengine一年前就知道了,但是没来得及学(只记得是C++ + python脚本),前一个项目unity3d+fkask+socketio+sqlite硬怼出来的.这半年也没来得及管.(好像当时看 ...

  6. const修饰函数

    #include <iostream> using namespace std; class A { public: A(int age); void printAge() const; ...

  7. bubbo调用Failed to invoke remote method异常解决

    bubbo调用服务异常: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: getPlanFlowInfo, pr ...

  8. 安卓四大组件之Sevice组件的简单使用 --Android基础

    1.本例实现了简单的Service(服务)的创建.启动和停止,点击“启动SERVICE”页面会显示“服务被创建”,接着是“服务被启动”.点击“停止SERVICE”页面提示“服务被停止”.太过基础,直接 ...

  9. Node.js 知识(教程)

    JavaScript on the Server JavaScript was originally built for web browsers, but with Node.js we can u ...

  10. int __get_order(unsigned long size)

    2017-12-6 10:26:504.9.51int __get_order(unsigned long size){    int order; size--;    size >>= ...