#!/bin/bash
cylinders=$(fdisk -l |grep cylinders | awk '{print $8}' | head -n 1)
real_cylind=$(($cylinders - 1))
echo $cylinders
echo $real_cylind
fdisk /dev/sda <<EOF
n
p
1
2048
10487807
a
1
n
p
2
10487808
77596671
t
2
82
n
p
3
77596672
$[real_cylind]
w
EOF
fdisk自动进行分区
精选 转载文章标签 fdisk自动进行分区 文章分类 服务器
下一篇:linux 防止DDOS攻击
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux 磁盘管理命令fdisk mount
Linux 磁盘管理命令fdisk:磁盘分区 mount:挂载文件系统
Linux 磁盘管理命令 fdisk磁盘分区 -
教你如何进行Prometheus 分片自动缩放
Prometheus已经成为云原生时代事实上的监控工具。
Pod Group Prometheus 监控工具 Keda -
用FDISK进行硬盘分区
用FDISK进行硬盘分区
职场 电脑 休闲 -
分区 fdisk
fdisk
fdisk 分区