mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
partresize: update c,h,s values before resize.
Some cards fail with wrong translations so the values are updated before resize.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
# Authors : Arne Fitzenreiter - arne_f@ipfire.org
|
# Authors : Arne Fitzenreiter - arne_f@ipfire.org
|
||||||
#
|
#
|
||||||
# Version : 1.03
|
# Version : 1.04
|
||||||
#
|
#
|
||||||
# Notes :
|
# Notes :
|
||||||
#
|
#
|
||||||
@@ -36,6 +36,10 @@ case "${1}" in
|
|||||||
DRV=${ROOT::`expr length $ROOT`-1}
|
DRV=${ROOT::`expr length $ROOT`-1}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
boot_mesg "Update c,h,s values of ${DRV} ..."
|
||||||
|
echo -e ',' | sfdisk --no-reread -f -N1 ${DRV} 2>&1 > /dev/null
|
||||||
|
echo -e ',' | sfdisk --no-reread -f -N3 ${DRV} 2>&1 > /dev/null
|
||||||
|
|
||||||
boot_mesg "Change Partition ${DRV}3 to all free space ..."
|
boot_mesg "Change Partition ${DRV}3 to all free space ..."
|
||||||
echo -e ',+' | sfdisk --no-reread -N3 ${DRV} 2>/dev/null
|
echo -e ',+' | sfdisk --no-reread -N3 ${DRV} 2>/dev/null
|
||||||
|
|
||||||
@@ -44,7 +48,8 @@ case "${1}" in
|
|||||||
|
|
||||||
boot_mesg "Rebooting ..."
|
boot_mesg "Rebooting ..."
|
||||||
sync
|
sync
|
||||||
mount -o remount,ro / > /dev/null
|
mount -o remount,ro / 2>&1 > /dev/null
|
||||||
|
sleep 15
|
||||||
reboot -f
|
reboot -f
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user