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. leecode第二题(两数相加)

    /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode ...

  2. jQuery 的 prevObject

    1. prevObject jquery选择器在遍历的过程中都会找到一组元素(一个jQuery对象),然后jQuery会把这组元素推入到栈中.prevObject属性就指向这个对象栈中的前一个对象,而 ...

  3. Linux中系统检测工具top命令

    Linux中系统检测工具top命令 本文转自:https://www.cnblogs.com/zhoug2020/p/6336453.html 首先介绍top中一些字段的含义: VIRT:virtua ...

  4. linux中tar命令(打包、压缩、解压)、zip和unzip、rar多种压缩文件

    一.名词解释 打包:将一大堆文件或目录变成一个总的文件[tar命令] 压缩:将一个大的文件通过一些压缩算法变成一个小文件[gzip,bzip2等] Linux中很多压缩程序只能针对一个文件进行压缩,这 ...

  5. python中装饰器

    在介绍装饰器之前,要先了解装饰器的相关基础知识. 嵌套函数: 最后引入一个基本的装饰器的例子: __author__ = "YanFeixu" import time def ti ...

  6. MySQL中如何实现select top n ----Limit

    Mysql中limit的用法详解 在我们使用查询语句的时候,经常要返回前几条或者中间某几行数据,这个时候怎么办呢?不用担心,mysql已经为我们提供了这样一个功能. LIMIT 子句可以被用于强制 S ...

  7. 【转】 strrchr()函数---C语言

    转自:https://baike.baidu.com/item/strrchr/4621437?fr=aladdin   函数名称: strrchr 函数原型:char *strrchr(const ...

  8. R quantile函数 | cut函数 | sample函数 | all函数 | scale函数 | do.call函数

    取出一个数字序列中的百分位数 1. 求某一个百分比 x<-rnorm(200) quantile(x,0.9) 2. 求一系列的百分比 quantile(x,c(0.1,0.9)) quanti ...

  9. 彻底搞懂 CPU 中的内存结构

    https://www.cnblogs.com/YJK923/p/10302180.html

  10. Bipartite Segments CodeForces - 901C (区间二分图计数)

    大意: 给定无向图, 无偶环, 每次询问求[l,r]区间内, 有多少子区间是二分图. 无偶环等价于奇环仙人掌森林, 可以直接tarjan求出所有环, 然后就可以预处理出每个点为右端点时的答案. 这样的 ...