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. [转][cesium]1.添加本地服务器

    转自:http://www.cnblogs.com/fuckgiser/p/5633748.html 此系列cesium总教程:  https://www.cnblogs.com/fuckgiser/ ...

  2. nodejs + ts 配置

    参考:https://github.com/nestjs/typescript-starter 和 How to get auto restart and breakpoint support wit ...

  3. x1c 2018 体验

    总结一下: 2018对比2017优点: 1屏幕完爆:HDR WHD镜面屏完爆 FHD 雾面屏(污+雾,所谓的油腻感),还有色彩!正红色第一次觉得这么好看.别人看得出来看不出来我不知道,至少我能看出来非 ...

  4. yum的配置文件介绍

    yum 的配置文件分为两部分:main 和repository   main 部分定义了全局配置选项,整个yum 配置文件应该只有一个main.常位于/etc/yum.conf 中. reposito ...

  5. nodejs使用log4js记录日志

    log4j是java里面最好用的日志记录插件,在.net上面也有移植log4j.net.同样也移植到了nodejs里面,多的不说,把自测通过的代码粘出来吧. var log4js = require( ...

  6. VIM编辑器和VI编辑器的区别

    vi 和vim 的区别 写在前面:这个两个"东西"着实让我烦恼一阵子,但是自己一直没当回事,但是遇到了好几次再决定彻底把他们搞的明白,一下是我通过查找资料了解到的关于这两个编辑器的 ...

  7. 书法字帖 PDF转化为可打印PDF

    书法类的PDF,因为底色是黑色的,打印起来特别费墨,所以需要转化成白底黑字的文件, 才好打印. 1)用 pdfbox 的 ExtractImages 命令,抽出所有的图片 https://pdfbox ...

  8. 20165303 预备作业3 Linux安装及学习

    =20165303 预备作业3 Linux安装及学习 安装虚拟机 按照http://www.cnblogs.com/rocedu/p/6012545.html步骤进行逐步操作,安装虚拟机. 遇到的问题 ...

  9. Alibaba Java诊断工具Arthas之快速安装和简单使用

    Alibaba Java诊断工具Arthas简单介绍 : 当你遇到以下类似问题而束手无策时,Arthas可以帮助你解决: 1.这个类从哪个 jar 包加载的?为什么会报各种类相关的 Exception ...

  10. lanmp环境中创建个软连接

    进入default,创建关于框架的链接 然后编辑配置文件 这样就可以在线上访问了.