mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
core: 修复 nvme 磁盘安装ubuntu 未合并 installer 分区
This commit is contained in:
parent
e8053c87fe
commit
4663800196
@ -37,7 +37,7 @@ fi
|
||||
# el7 的 lsblk 没有 --sort,所以用其他方法
|
||||
# shellcheck disable=2012
|
||||
part_num=$(ls -1v /dev/$xda* | tail -1 | grep -o '[0-9]*$')
|
||||
part_fstype=$(lsblk -no FSTYPE /dev/$xda$part_num)
|
||||
part_fstype=$(lsblk -no FSTYPE /dev/$xda*$part_num)
|
||||
|
||||
# 扩容分区
|
||||
# ubuntu 和 el7 用 growpart,其他用 parted
|
||||
@ -52,7 +52,7 @@ update_part /dev/$xda
|
||||
# 扩容最后一个分区的文件系统
|
||||
case $part_fstype in
|
||||
xfs) xfs_growfs / ;;
|
||||
ext*) resize2fs /dev/$xda$part_num ;;
|
||||
ext*) resize2fs /dev/$xda*$part_num ;;
|
||||
btrfs) btrfs filesystem resize max / ;;
|
||||
esac
|
||||
update_part /dev/$xda
|
||||
|
Loading…
x
Reference in New Issue
Block a user