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. 《剑指offer》第四十三题(从1到n整数中1出现的次数)

    // 面试题43:从1到n整数中1出现的次数 // 题目:输入一个整数n,求从1到n这n个整数的十进制表示中1出现的次数.例如 // 输入12,从1到12这些整数中包含1 的数字有1,10,11和12 ...

  2. 学习笔记3—matlab中load特殊用法

    1.在matlab中 ,infro.mat中存有很多子矩阵(比如:mean_FA.mat, mean_e1.mat和 mean_e2.mat),调出某一个矩阵时,命令行为:load([path,'\' ...

  3. Python中数据类型

    一.整数 Python可以处理任意大小的整数,当然包括负整数,在Python程序中,整数的表示方法和数学上的写法一模一样,例如:1,100,-8080,0,等等. 计算机由于使用二进制,所以,有时候用 ...

  4. 第 3 章 镜像 - 013 - Dockerfile 构建镜像

    第一个 Dockerfile FROM ubuntu RUN apt-get update && apt-get install -y vim 运行 docker build 命令构建 ...

  5. MySQL之聚合数据(AVG,COUNT,MAX,MIN,SUM)

    1.首先我们需要了解下什么是聚合函数 聚合函数aggregation function又称为组函数. 认情况下 聚合函数会对当前所在表当做一个组进行统计. 2.聚合函数的特点 1.每个组函数接收一个参 ...

  6. Setting up a Hadoop cluster - Part 1: Manual Installation

    http://gbif.blogspot.com/2011/01/setting-up-hadoop-cluster-part-1-manual.html

  7. vs2013+caffe+cpu

    1.下载caffe官网提供的工具包,复制Windows下CommonSettings.props.example,后缀改为CommonSettings.props 2.由于电脑无GPU,所以修改复制过 ...

  8. mysql之filesort原理

    在执行计划中,可能经常看到有Extra列有filesort,这就是使用了文件排序,这当然是不好的,应该优化,但是,了解一下他排序的原理也许很有帮助,下面看一下filesort的过程: 1.根据表的索引 ...

  9. wdcp环境安装filephp扩展

    网址 :https://blog.csdn.net/m_nanle_xiaobudiu/article/details/80838424

  10. pycharm安装步骤

    python环境配置教程 https://jingyan.baidu.com/article/c45ad29c05c208051653e270.html 由于安装Pycharm时忘记截图了,所以详细安 ...