Permalink
Browse files

Fix resizer on XU4 if user has multiple disks

  • Loading branch information...
NEMS Linux
NEMS Linux committed Oct 24, 2018
1 parent 3af5b5e commit 4dcddab160100a0657ce11c0630432d2d078ffdc
Showing with 8 additions and 8 deletions.
  1. +8 −8 resize_rootfs/odroid-stage2
@@ -2,18 +2,18 @@
# Get the log filename passed from Stage 1.
rslog=$(cat /var/log/nems/resize-logfile.tmp)
rm -f /var/log/nems/resize-logfile.tmp
ROOTFS=`ls -l /dev/disk/by-uuid/ | grep "e139ce78-9841-40fe-8823-96a304a09859" | awk '{print $11}' | sed "s/\.\.\/\.\.\///" | sed "s/p1//"`
echo "Stage 2 on $ROOTFS" >> $rslog
e2fsck -y -f /dev/$ROOTFS >> $rslog
BOOTDEVICE=`ls -l /dev/disk/by-uuid/ | grep 96C3-9298 | awk '{print $11}' | sed "s/\.\.\/\.\.\///" | sed "s/p1//"`
NEMSPART=${BOOTDEVICE}p2
echo "Stage 2 on $NEMSPART" >> $rslog
e2fsck -y -f /dev/$NEMSPART >> $rslog
echo "-------- Resize --------" >> $rslog
/sbin/resize2fs /dev/$ROOTFS >> $rslog
# When using SD (rather than emmc) a second block device shows which mirrors the first.
# It requires resizing.
/sbin/resize2fs /dev/mmcblk1p2 >> $rslog
/sbin/resize2fs /dev/$NEMSPART >> $rslog
echo "-------- /Resize -------" >> $rslog
e2fsck -y -f /dev/$ROOTFS >> $rslog
e2fsck -y -f /dev/$NEMSPART >> $rslog
sed -i "s,/root/nems/nems-admin/resize_rootfs/odroid-stage2,,g" /etc/rc.local
echo "Done" >> $rslog
df -h / >> $rslog

0 comments on commit 4dcddab

Please sign in to comment.