-
Notifications
You must be signed in to change notification settings - Fork 42
How to expand the OS disk on the SD card on Maix-II ? #32
Comments
hi @junhuanchen , @chayitwTo expand the OS disk on the SD card on Maix-II主要參考網址: https://www.cnblogs.com/USTHzhanglu/p/15207336.html
附錄 A.有關第2項相關細節操作供參考:$sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.31.1). 命令 (m 以獲得說明): p 所用裝置 Start 結束 磁區 Size 類型 命令 (m 以獲得說明): d Partition 3 has been deleted. 命令 (m 以獲得說明): d Partition 4 has been deleted. 命令 (m 以獲得說明): n Created a new partition 3 of type 'Linux filesystem' and of size 20 GiB. Do you want to remove the signature? [Y]es/[N]o: y The signature will be removed by a write command. 命令 (m 以獲得說明): p 所用裝置 Start 結束 磁區 Size 類型 Filesystem/RAID signature on partition 3 will be wiped. 命令 (m 以獲得說明): n Created a new partition 4 of type 'Linux filesystem' and of size 9.7 GiB. 命令 (m 以獲得說明): x 專家命令 (m 以獲得說明): n New name: rootfs Partition name changed from '' to 'rootfs'. 專家命令 (m 以獲得說明): n New name: UDISK Partition name changed from '' to 'UDISK'. 專家命令 (m 以獲得說明): r 命令 (m 以獲得說明): w The kernel still uses the old partitions. The new table will be used at the next reboot. B.有關第3項相關細節供參考:$sudo umount /media/chayi/(rootfs) $sudo resize2fs /dev/sdb3 |
Hi All,
我使用目前的鏡像版本 "maixpy3-0.3.5_MaixII-Dock_20211216.img",
由於其根目錄僅有254.5M的大小, 所以參考底下這篇說明想試著擴增到2G:
https://www.cnblogs.com/USTHzhanglu/p/15207336.html
新年快樂
-chayi
BusyBox v1.27.2 () built-in shell (ash)
------run profile file-----
/ |/ /__ ()_ __ / / ()__ __ ____ __
/ /|/ / _ `/ /\ \ / / /__/ / _ / // /\ \ /
// //_,///_\ //////_,//_\
root@sipeed:/# [framebuffer](240,240, 24bpp)
root@sipeed:/# fdisk -l
Disk /dev/mmcblk0: 29.1 GiB, 31266439168 bytes, 61067264 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: gpt
Disk identifier: AB6F3888-569A-4926-9668-80941DCB40BC
Device Start End Sectors Size Type
/dev/mmcblk0p1 49152 49663 512 256K Microsoft basic data
/dev/mmcblk0p2 49664 54159 4496 2.2M Microsoft basic data
/dev/mmcblk0p3 54160 578447 524288 256M Microsoft basic data
/dev/mmcblk0p4 578448 609167 30720 15M Microsoft basic data
/dev/mmcblk0p5 609168 61067230 60458063 28.8G Microsoft basic data
root@sipeed:/# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 254.5M 147.8M 101.6M 59% /
tmpfs 29.4M 16.0K 29.4M 0% /tmp
none 29.3M 0 29.3M 0% /dev
/dev/mmcblk0p5 28.8G 48.0K 28.8G 0% /mnt/UDISK
/dev/mmcblk0p5 28.8G 48.0K 28.8G 0% /root
root@sipeed:/# fdisk /dev/mmcblk0
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): d
Partition number (1-5, default 5): 3
Partition 3 has been deleted.
Command (m for help): d
Partition number (1,2,4,5, default 5): 4
Partition 4 has been deleted.
Command (m for help): d
Partition number (1,2,5, default 5): 5
Partition 5 has been deleted.
Command (m for help): n
Partition number (3-5, default 3): 3
First sector (54160-61067230, default 55296): 54160
Last sector, +sectors or +size{K,M,G,T,P} (54160-61067230, default 61067230): +2G
Created a new partition 3 of type 'Linux filesystem' and of size 2 GiB.
Command (m for help): n
Partition number (4,5, default 4): 4
First sector (4247552-61067230, default 4247552):
Last sector, +sectors or +size{K,M,G,T,P} (4247552-61067230, default 61067230): +1G
Created a new partition 4 of type 'Linux filesystem' and of size 1 GiB.
Command (m for help): n
Selected partition 5
First sector (6344704-61067230, default 6344704):
Last sector, +sectors or +size{K,M,G,T,P} (6344704-61067230, default 61067230):
Created a new partition 5 of type 'Linux filesystem' and of size 26.1 GiB.
Command (m for help): x
Expert command (m for help): n
Partition number (1-5, default 5): 3
New name: rootfs
Partition name changed from '' to 'rootfs'.
Expert command (m for help): n
Partition number (1-5, default 5): 4
New name: swap
Partition name changed from '' to 'swap'.
Expert command (m for help): n
Partition number (1-5, default 5): 5
New name: UDISK
Partition name changed from '' to 'UDISK'.
Expert command (m for help): r
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: 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).
root@sipeed:/# reboot
root@sipeed:/# Stopping ntpd: done
Stop dropbear: OK
Stopping telnetd: start-stop-daemon: warning: killing process 840: No such process
FAIL
Stopping network...
Saving random seed... done.
disable android usb
sh: write error: No such device
Stopping app...
killall: python3: no process killed
Stopping logging: OK
save /etc/asound.conf ...
Unload mpp modules
module is not loaded
module is not loaded
module is not loaded
umount: none busy - remounted read-only
The system is going down NOW!
Sent SIGTERM to all processes
Sen[30]HELLO! BOOT0 is starting!
[32]BOOT0 commit : e3b2a9e
[35]board init start
[37]set pll start
[40]set pll end
[41][pmu]: bus read error
[44][pmu]: bus read error
[46]board init ok
[48]chip id check OK
[50]DRAM BOOT DRIVE INFO: V0.41
[53]DRAM CLK = 528 MHz
[55]DRAM Type = 2 (2:DDR2,3:DDR3)
[59]DRAMC read ODT off.
[61]DRAM ODT off.
[63]DRAM SIZE =64 M
[70]DRAM simple test OK.
[72]rtc standby flag is 0x0, super standby flag is 0x0
[77]dram size =64
MESSAGE: [0x0] TEE-CORE: OP-TEE version: sun8iw19p1_v0.6.0-14-gf6954e7 #1 2019年 11月 21日 星期四 01:34:42 UTC arm
ERROR: [0x0] TEE-CORE:platform_standby_fdt_parse:126: no pmu node
ERROR: [0x0] TEE-CORE:sunxi_twi_parse_from_dt:84: no pmu node
------run rc.preboot file-----
setup console
fbv - The Framebuffer Viewer
/home/res/logo.png
140 x 140
swapon: /dev/mmcblk0p4: Invalid argument
Setting up swapspace version 1, size = 1073737728 bytes
------run rc.modules file-----
------run rc.final file-----
Load mpp modules
insmod: can't insert '/lib/modules/4.9.118/videobuf2-core.ko': No such file or directory
insmod: can't insert '/lib/modules/4.9.118/videobuf2-memops.ko': No such file or directory
insmod: can't insert '/lib/modules/4.9.118/videobuf2-v4l2.ko': No such file or directory
load /etc/asound.conf ...
alsactl: set_control:1461: Cannot write control '2:0:0:codec trigger playback time value:0' : Operation not permitted
alsactl: set_control:1461: Cannot write control '2:0:0:codec trigger capture time value:0' : Operation not permitted
Starting app...
enable android usb
Initializing random number generator... done.
Starting network...
Starting telnetd: OK
Start dropbear: OK
Starting ntpd: done
BusyBox v1.27.2 () built-in shell (ash)
------run profile file-----
/ |/ /__ ()_ __ / / ()__ __ ____ __
/ /|/ / _ `/ /\ \ / / /__/ / _ / // /\ \ /
// //_,///_\ //////_,//_\
root@sipeed:/# [framebuffer](240,240, 24bpp)
root@sipeed:/# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 254.5M 147.8M 101.6M 59% /
tmpfs 29.4M 16.0K 29.4M 0% /tmp
none 29.3M 0 29.3M 0% /dev
/dev/mmcblk0p5 26.1G 48.0K 26.1G 0% /mnt/UDISK
/dev/mmcblk0p5 26.1G 48.0K 26.1G 0% /root
root@sipeed:/# fdisk -l
Disk /dev/mmcblk0: 29.1 GiB, 31266439168 bytes, 61067264 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: gpt
Disk identifier: AB6F3888-569A-4926-9668-80941DCB40BC
Device Start End Sectors Size Type
/dev/mmcblk0p1 49152 49663 512 256K Microsoft basic data
/dev/mmcblk0p2 49664 54159 4496 2.2M Microsoft basic data
/dev/mmcblk0p3 54160 4247551 4193392 2G Linux filesystem
/dev/mmcblk0p4 4247552 6344703 2097152 1G Linux filesystem
/dev/mmcblk0p5 6344704 61067230 54722527 26.1G Linux filesystem
root@sipeed:/# resize2fs /dev/root
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/root is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Invalid argument While checking for on-line resizing support
root@sipeed:/# fdisk -l
Disk /dev/mmcblk0: 29.1 GiB, 31266439168 bytes, 61067264 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: gpt
Disk identifier: AB6F3888-569A-4926-9668-80941DCB40BC
Device Start End Sectors Size Type
/dev/mmcblk0p1 49152 49663 512 256K Microsoft basic data
/dev/mmcblk0p2 49664 54159 4496 2.2M Microsoft basic data
/dev/mmcblk0p3 54160 4247551 4193392 2G Linux filesystem
/dev/mmcblk0p4 4247552 6344703 2097152 1G Linux filesystem
/dev/mmcblk0p5 6344704 61067230 54722527 26.1G Linux filesystem
root@sipeed:/# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 381.8M 147.8M 228.8M 39% /
tmpfs 29.4M 16.0K 29.4M 0% /tmp
none 29.3M 0 29.3M 0% /dev
/dev/mmcblk0p5 26.1G 48.0K 26.1G 0% /mnt/UDISK
/dev/mmcblk0p5 26.1G 48.0K 26.1G 0% /root
root@sipeed:/#
The text was updated successfully, but these errors were encountered: