...
From information on screen, two partitions are created in the image of SD card. The first partition starts at sector 2048 and ends at sector 104447206847. Its size is 50 100 MiB and file-system is W95 FAT. The second partition starts at sector 104448 206848 and ends at sector 137215239615. Its size is 16 MiB and file-system is Linux (ext3).
...
At the first time, Linux boots from a new SD card. The built-in script of Linux will run fdisk command to extend the size of rootfs partition to the end of SD card and then re-boot. Refer to log while Linux script is extending size of rootfs partition:
Code Block |
---|
[ 1.801401] EXT4-fs (mmcblk1p2): mounting ext3 file system using the ext4 subsystem [ 1.838694] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.838915] VFS: Mounted root (ext3 filesystem) on device 179:26. [ 21.002577843410] devtmpfs: mounted [ 21.004625846602] Freeing unused kernel memory: 1024K [ 21.004826849267] Run /sbin/init as init process [ 1.913424] random: fast init done /etc/init.d/rcS starts... Mounting other filesystems ... rc.extra [bg] sdcard boot set... partition set 0x000017460x0000D8D6 totalsize=1635883417615931539456 0x0000000A0x00000009 extra done totalsize=3195084031116280 startsector=104448206848 The number of cylinders for this disk is set to 499232486192. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): Disk /dev/mmcblk1: 15 GB, 1635883417615931539456 bytes, 3195084831116288 sectors 499232486192 cylinders, 4 heads, 16 sectors/track Units: sectors of 1 * 512 = 512 bytes Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type /dev/mmcblk1p1 0,32,33 612,127223,5719 2048 104447206847 102400 50.0M204800 100M b Win95 FAT32 /dev/mmcblk1p2 612,127223,5820 814,138233,227 206848 104448 137215239615 32768 16.0M 83 Linux Command (m for help): Partition number (1-4): Command (m for help): Partition type p primary partition (1-4) e extended Partition number (1-4): First sector (16-3195084731116287, default 16): Last sector or +size{,K,M,G,T} (104448206848-3195084731116287, default 3195084731116287): Command (m for help): Disk /dev/mmcblk1: 15 GB, 1635883417615931539456 bytes, 3195084831116288 sectors 499232486192 cylinders, 4 heads, 16 sectors/track Units: sectors of 1 * 512 = 512 bytes Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type /dev/mmcblk1p1 0,32,33 612,127223,5719 2048 104447206847 204800 102400 50.0M100M b Win95 FAT32 /dev/mmcblk1p2 1023,3,16 1023,3,16 104448206848 3195084031116280 3184639330909433 1514.1G7G 83 Linux Command (m for help): The partition table has been altered. Calling ioctl() to re-read partition table fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy End of /etc/init.d/rcS [ 43.319145682763] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null) The system is going down NOW! Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot +++iBoot v1.02 Jan 10 2019 11:20:28 |
The latest command in the script is reboot command. You’ll see system re-boot after script completes extending size of rootfs partition.
...