Resizeroot.sh leads to not booting BPI-R1
Hello David,
I wrote the prebuilt image to a 8GB SD card. My BPI-R1 (lamobo) works fine with this image. However, when I use the script resizeroot.sh and reboot, the BPI-R1 is not responding anymore (even after a long time waiting). No Luci, no ssh, no ping.
This is the output of the script:
root@OpenWrt:~# resizeroot.sh openwrt-resizeSD-root - v1.0
Current Disk Info
Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x64fab523
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 2048 38911 36864 18M c W95 FAT32 (LBA) /dev/mmcblk0p2 38912 917503 878592 429M 83 Linux
======================================================
Calculated Info: Disk Size = 8 gb Part Start = 38912 Part End = 15153663
Making changes using fdisk...
Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m for help): Partition number (1,2, default 2): Partition 2 has been deleted.
Command (m for help): Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): Partition number (2-4, default 2): First sector (38912-15564799, default 38912): Last sector, +sectors or +size{K,M,G,T,P} (38912-15564799, default 15564799): Created a new partition 2 of type 'Linux' and of size 7.2 GiB.
Command (m for help): Disk /dev/mmcblk0: 7.4 GiB, 7969177600 bytes, 15564800 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x64fab523
Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 2048 38911 36864 18M c W95 FAT32 (LBA) /dev/mmcblk0p2 38912 15153663 15114752 7.2G 83 Linux
Command (m for help): The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
Setting up init.d resize2fs_once script
System is now ready to resize your system. A REBOOT IS REQUIRED NOW! Press ENTER to reboot : \c
REBOOTING....
Script Complete...
=======================================
After I mounted the SD card on another computer, I saw that:
- the partition table was succesfully changed
- the filesystem size was not enlarged to make use of the free space
- the script resize2fs_once is not removed
I hope you can help me with this.
Best regards, Victor