mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-30 10:41:50 +00:00
Last try to fix partition resize in firstrun script
This commit is contained in:
parent
2ff6fc6819
commit
8fa2471e8c
1 changed files with 10 additions and 4 deletions
|
@ -202,11 +202,17 @@ do_expand_rootfs() {
|
||||||
# Start resizing
|
# Start resizing
|
||||||
echo -e "\n### [firstrun] ${ResizeLog}. Start resizing Partition now:\n" >>${Log}
|
echo -e "\n### [firstrun] ${ResizeLog}. Start resizing Partition now:\n" >>${Log}
|
||||||
cat /proc/partitions >>${Log}
|
cat /proc/partitions >>${Log}
|
||||||
echo -e "\nAnd then:\n" >>${Log}
|
echo -e "\nExecuting fdisk, fsck and partprobe:\n" >>${Log}
|
||||||
((echo d; echo $PARTITIONS; echo n; echo p; echo ; echo $STARTFROM; echo ${LASTSECTOR} ; echo w;) | fdisk ${DEVICE}) >/dev/null || true
|
if [ "X${DISTRIBUTION}" = "Xxenial" -a "X${PARTITIONS}" = "X1" ]; then
|
||||||
|
((echo d; echo n; echo p; echo ; echo $STARTFROM; echo ${LASTSECTOR} ; echo w;) | fdisk ${DEVICE}) >>${Log} 2>&1 || true
|
||||||
|
else
|
||||||
|
((echo d; echo $PARTITIONS; echo n; echo p; echo ; echo $STARTFROM; echo ${LASTSECTOR} ; echo w;) | fdisk ${DEVICE}) >>${Log} 2>&1 || true
|
||||||
|
fi
|
||||||
|
echo -e "\nNew partition table:\n" >>${Log}
|
||||||
s=0
|
s=0
|
||||||
fsck -f $root_partition >/dev/null 2>&1 || true
|
fsck -f $root_partition >>${Log} ll 2>&1 || true
|
||||||
partprobe ${DEVICE} >/dev/null 2>&1 || s=$?
|
partprobe ${DEVICE} >>${Log} ll 2>&1 || s=$?
|
||||||
|
echo -e "\nNew partition table:\n" >>${Log}
|
||||||
cat /proc/partitions >>${Log}
|
cat /proc/partitions >>${Log}
|
||||||
echo -e "\nNow executing resize2fs to enlarge ${root_partition} to the maximum\n:" >>${Log}
|
echo -e "\nNow executing resize2fs to enlarge ${root_partition} to the maximum\n:" >>${Log}
|
||||||
resize2fs $root_partition >>${Log} 2>&1 || true
|
resize2fs $root_partition >>${Log} 2>&1 || true
|
||||||
|
|
Loading…
Add table
Reference in a new issue