注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

我的博客

笨笨猫

 
 
 

日志

 
 

sfdisk用法  

2011-11-10 10:22:54|  分类: MeeGo |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

sudo sfdisk -f $device -uM >& /dev/null << EOF
$rootfs_par_offset,$rootfs_size,83
$at6600bin_par_offset,$at6600bin_size,83
$at6600data_par_offset,$at6600data_size,83
$userdata_par_offset,,83
EOF

 

 

>& /dev/null : 重定向command 的stdout 到/dev/null

<< EOF   EOF : list string

sfdisk : -f force

reads lines of the form : <start> <size> <id> <bootable> <c,h,s> <c,h,s>

 

Fields are separated by whitespace, or comma or semicolon possibly followed by whitespace; initial and trailing whitespace is ignored. Numbers can be octal, decimal or hexadecimal, decimal is default. When a field is absent or empty, a default value is used.

The <c,h,s> parts can (and probably should) be omitted - sfdisk computes them from <start> and <size> and the disk geometry as given by the kernel or specified using the -H, -S, -C flags.

Bootable is specified as [*|-], with as default not-bootable. (The value of this field is irrelevant for Linux - when Linux runs it has been booted already - but might play a role for certain boot loaders and for other operating systems. For example, when there are several primary DOS partitions, DOS assigns C: to the first among these that is bootable.)

Id is given in hex, without the 0x prefix, or is [E|S|L|X], where L (LINUX_NATIVE (83)) is the default, S is LINUX_SWAP (82), E is EXTENDED_PARTITION (5) , and X is LINUX_EXTENDED (85).

  评论这张
 
阅读(1446)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017