問題
install安裝程序
提示/usr/下空間不夠
Unpacking cpp-13 (13.1.0-8) ...
dpkg: error processing archive /var/cache/apt/archives/cpp-13_13.1.0-8_riscv64.deb (--unpack):
cannot copy extracted data for './usr/libexec/gcc/riscv64-linux-gnu/13/cc1' to '/usr/libexec/gcc/riscv64-linux-gnu/13/cc1.dpkg-new': failed to write (No space left on device)
Preparing to unpack .../gcc-13_13.1.0-8_riscv64.deb ...
Unpacking gcc-13 (13.1.0-8) ...
dpkg: error processing archive /var/cache/apt/archives/gcc-13_13.1.0-8_riscv64.deb (--unpack):
cannot copy extracted data for './usr/libexec/gcc/riscv64-linux-gnu/13/lto1' to '/usr/libexec/gcc/riscv64-linux-gnu/13/lto1.dpkg-new': failed to write (No space left on device)
Errors were encountered while processing:
/var/cache/apt/archives/cpp-13_13.1.0-8_riscv64.deb
/var/cache/apt/archives/gcc-13_13.1.0-8_riscv64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
查看分區
*df -h*
查看/目錄使用了96%
root@starfive:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 117M 1.6G 7% /dev
tmpfs 390M 3.2M 387M 1% /run
**/dev/mmcblk1p4 2.5G 2.3G 123M 96% /**
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 12K 5.0M 1% /run/lock
tmpfs 390M 60K 390M 1% /run/user/110
tmpfs 390M 20K 390M 1% /run/user/0
root@starfive:~#
查看存儲
*fdisk -l*
有28.85G,/即**/dev/mmcblk1p4 **只使用了2.5G左右
root@starfive:~# fdisk -l
Disk /dev/mtdblock0: 256 KiB, 262144 bytes, 512 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
Disk /dev/mtdblock1: 3 MiB, 3145728 bytes, 6144 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
Disk /dev/mtdblock2: 1 MiB, 1048576 bytes, 2048 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
GPT PMBR size mismatch (5529599 != 60506111) will be corrected by write.
**Disk /dev/mmcblk1: 28.85 GiB, 30979129344 bytes, 60506112 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: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E
Device Start End Sectors Size Type
/dev/mmcblk1p1 4096 8191 4096 2M HiFive BBL
/dev/mmcblk1p2 8192 16383 8192 4M HiFive FSBL
/dev/mmcblk1p3 16384 221183 204800 100M EFI System
/dev/mmcblk1p4 221184 5527518 5306335 2.5G Linux filesystem
root@starfive:~#
創建分區
原來是刪除原來的/目錄的分區,然后重新創建分區,注意刪除/所在的分區時先不要w保存,最后創建新的分區再保存。
*fdisk mmcbllk1*
root@starfive:~# fdisk mmcbllk1
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open mmcbllk1: No such file or directory
root@starfive:~# fdisk /dev/mmcblk1
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.
*輸入p查看*
Command (m for help): p
Disk /dev/mmcblk1: 28.85 GiB, 30979129344 bytes, 60506112 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: E05DB137-41F7-47A6-B1C1-E9BE91A4BC0E
Device Start End Sectors Size Type
/dev/mmcblk1p1 4096 8191 4096 2M HiFive BBL
/dev/mmcblk1p2 8192 16383 8192 4M HiFive FSBL
/dev/mmcblk1p3 16384 221183 204800 100M EFI System
/dev/mmcblk1p4 221184 5527518 5306335 2.5G Linux filesystem
*輸入d,然后輸入4刪除分區4*
Command (m for help): d
Partition number (1-4, default 4): 4
Partition 4 has been deleted.
*輸入n然后輸入4重新創建分區4,后面都直接回車按照默認參數*
Command (m for help): n
Partition number (4-128, default 4): 4
First sector (34-60506078, default 221184):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (221184-60506078, default 60504063):
Created a new partition 4 of type 'Linux filesystem' and of size 28.7 GiB.
Partition #4 contains a ext4 signature.
*如下提示輸入y*
Do you want to remove the signature? [Y]es/[N]o: y
The signature will be removed by a write command.
*輸入w寫入分區*
Command (m for help): w
The partition table has been altered.
Syncing disks.
*通知內核同步**partprobe /dev/mmcblk1*
root@starfive:~# partprobe /dev/mmcblk1
*再次查看分區lsblk,可以看到根目錄/增加到了28.7G*
root@starfive:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 256K 0 disk
mtdblock1 31:1 0 3M 0 disk
mtdblock2 31:2 0 1M 0 disk
mmcblk1 179:0 0 28.9G 0 disk
├─mmcblk1p1 179:1 0 2M 0 part
├─mmcblk1p2 179:2 0 4M 0 part
├─mmcblk1p3 179:3 0 100M 0 part
└─mmcblk1p4 179:4 0 28.7G 0 part /
*擴容** resize2fs /dev/mmcblk1p4*
root@starfive:~# resize2fs /dev/mmcblk1p4
`resize2fs 1.46.6-rc1 (12-Sep-202[ 1019.864399] EXT4-fs (mmcblk1p4): resizing filesystem from 663291 to 7535360 blocks`
2)
Filesystem at /dev/mmcblk1p4 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
[ 1020.838282] EXT4-fs (mmcblk1p4): resized filesystem to 7535360
The filesystem on /dev/mmcblk1p4 is now 7535360 (4k) blocks long.
總結
通過闡述分區在重新創建分區,最后resize2fs擴展文件系統大小。
擴容后此時根目錄就夠用了,可以愉快的install程序了。
審核編輯:湯梓紅
聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。
舉報投訴
-
計算機
+關注
關注
19文章
7488瀏覽量
87849 -
軟件
+關注
關注
69文章
4921瀏覽量
87394 -
程序
+關注
關注
117文章
3785瀏覽量
81003 -
RISC-V
+關注
關注
45文章
2270瀏覽量
46129
發布評論請先 登錄
相關推薦
昉·星光單板計算機正式發售,加速RISC-V生態發展
在RISC-V Summit 2021大會上,賽昉科技(簡稱“賽昉”)作為中國RISC-V軟硬件生態的領導者,宣布“昉·
發表于 12-09 09:22
?1291次閱讀
【昉·星光 2 高性能RISC-V單板計算機體驗】VisionFive2開箱+安裝Ubuntu
【昉·星光 2 高性能RISC-V單板計算機體驗】VisionFive2開箱+安裝Ubuntu
發表于 02-21 17:49
【RISC-V專題】賽昉科技昉·星光RISC-V單板計算機首發試用
!
上海賽昉科技作為此次活動的合作廠商,同步上線昉·星光RISC-V單板計算機(VisionFive
發表于 04-14 15:17
RISC-V VisionFive (昉星光單板計算機)系列課程
利用賽昉科技VisionFive單板計算機學習Linux系統第一期:交叉編譯是什么第二期:學習和使用RISC-V(第一部分)第三期:在VisionF
發表于 04-15 15:01
【RISC-V專題】昉·星光 2(VisionFive 2)RISC-V單板計算機免費試用
VisionFive 2是全球首款集成3D GPU的高性能量產RISC-V 單板計算機 。與上一代相比,VisionFive
發表于 05-16 11:26
【昉·星光 2 高性能RISC-V單板計算機體驗】2更換Debian操作系統
接上兩篇:【昉·星光 2 高性能RISC-V單板計算機體驗】1初識賽昉科技StarFive -
發表于 08-31 00:03
【RISC-V + OpenCV 計算機視覺】用 VisionFive 2 昉·星光 2 進行物體識別
廣泛應用于視頻監控、自動駕駛等領域。
基于Debain操作系統和OpenCV框架,賽昉科技在VisionFive 2(昉·星光
發表于 09-08 11:42
評論