mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
busybox: use mke2fs instead of resize2fs
This ensures the /storage filesystem will have the correct options (block size, inode_ratio etc) for the target partition size. Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
bbd5bbfdff
commit
8a569e592f
@ -47,10 +47,13 @@ if [ -e /storage/.please_resize_me ] ; then
|
||||
rm -f /storage/.please_resize_me
|
||||
sync
|
||||
|
||||
echo "DISK: $DISK PART: $PART" >>$LOG
|
||||
LABEL=$(blkid -o value -s LABEL $PART)
|
||||
UUID=$(blkid -o value -s UUID $PART)
|
||||
|
||||
echo "DISK: $DISK PART: $PART LABEL: $LABEL UUID: $UUID" >>$LOG
|
||||
|
||||
# just in case
|
||||
if [ ! -z "$DISK" -a ! -z "$PART" ] ; then
|
||||
if [ ! -z "$DISK" -a ! -z "$PART" -a ! -z "$UUID" ] ; then
|
||||
umount $PART
|
||||
|
||||
echo "PARTITION RESIZING IN PROGRESS"
|
||||
@ -59,8 +62,8 @@ if [ -e /storage/.please_resize_me ] ; then
|
||||
echo ""
|
||||
|
||||
StartProgressLog spinner "Resizing partition... " "parted -s -f -m $DISK resizepart 2 100% >>$LOG 2>&1"
|
||||
StartProgressLog spinner "Creating file system... " "mke2fs -F -q -t ext4 -m 0 -L \"$LABEL\" -U \"$UUID\" $PART >>$LOG 2>&1"
|
||||
StartProgressLog spinner "Checking file system... " "e2fsck -f -p $PART >>$LOG 2>&1"
|
||||
StartProgressLog spinner "Resizing file system... " "resize2fs $PART >>$LOG 2>&1"
|
||||
StartProgress countdown "Rebooting in 15s... " 15 "NOW"
|
||||
else
|
||||
echo "Partition was not detected - resizing aborted."
|
||||
|
Loading…
x
Reference in New Issue
Block a user