0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

【昉·星光 2(VisionFive 2)RISC-V单板计算机】根目录扩容-愉快的install大型软件

嵌入式USB开发 来源:嵌入式USB开发 作者:嵌入式USB开发 2023-07-18 07:20 次阅读

问题

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

    文章

    6649

    浏览量

    84534
  • 软件
    +关注

    关注

    67

    文章

    4348

    浏览量

    85624
  • 程序
    +关注

    关注

    114

    文章

    3631

    浏览量

    79543
  • RISC-V
    +关注

    关注

    41

    文章

    1901

    浏览量

    45045
收藏 人收藏

    评论

    相关推荐

    【昉·星光 2(VisionFive 2)RISC-V单板计算机】尝试玩3D赛车-帧率有点低

    【昉·星光 2(VisionFive 2)RISC-V单板计算机】尝试玩3D赛车-帧率有点低
    的头像 发表于 07-21 09:05 883次阅读
    【昉·<b class='flag-5'>星光</b> 2(<b class='flag-5'>VisionFive</b> 2)<b class='flag-5'>RISC-V</b><b class='flag-5'>单板计算机</b>】尝试玩3D赛车-帧率有点低

    【昉·星光 2(VisionFive 2)RISC-V单板计算机】SDL开发

    【昉·星光 2(VisionFive 2)RISC-V单板计算机】SDL开发
    的头像 发表于 07-21 09:08 954次阅读
    【昉·<b class='flag-5'>星光</b> 2(<b class='flag-5'>VisionFive</b> 2)<b class='flag-5'>RISC-V</b><b class='flag-5'>单板计算机</b>】SDL开发

    ·星光 2 高性能RISC-V单板计算机试用体验】开箱及装载Debian系统

    上周收到了·星光 2高性能RISC-V单板计算机开发板,在此非常感谢赛科技提供的试用机会。开
    发表于 01-24 00:32

    ·星光 2 高性能RISC-V单板计算机体验】VisionFive2开箱+安装Ubuntu

    ·星光 2 高性能RISC-V单板计算机体验】VisionFive2开箱+安装Ubuntu
    发表于 02-21 17:49

    ·星光 2 高性能RISC-V单板计算机体验】为 Ubuntu 安装 Docker 及常用软件

    ·星光 2 高性能RISC-V单板计算机体验】为 Ubuntu 安装 Docker 及常用软件
    发表于 02-21 17:54

    科技·星光RISC-V单板计算机首发试用

    ·星光VisionFive全球第一代高性价比的可运行Linux的RISC-V单板计算机,采用64位RI
    发表于 04-12 10:14

    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单板计算机试用体验】开箱报告

    前几天收到了赛科技·星光RISC-V单板计算机,给大家做一下简单介绍。其主要接口和功能有1.2.4 GHz 无线及蓝牙 4.2(BLE)
    发表于 06-26 22:14

    【赛科技·星光RISC-V单板计算机试用体验】开箱+心得

    【赛科技·星光RISC-V单板计算机试用体验】开箱+心得2022年4月14日上午,我从发烧友研习社公众号看到了“【重磅集结】14款
    发表于 07-06 20:54

    RISC-V专题】·星光 2VisionFive 2RISC-V单板计算机免费试用

    VisionFive 2是全球首款集成3D GPU的高性能量产RISC-V 单板计算机 。与上一代相比,VisionFive
    发表于 05-16 11:26

    ·星光 2 高性能RISC-V单板计算机体验】使用之一:星光 2开箱之硬件分析

    ·星光 2 是全球首款集成了GPU的高性能RISC-V单板计算机。与·
    发表于 07-28 15:02

    ·星光 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

    VisionFive 2单板计算机成功支持Docker容器解决方案

    科技进一步获取。 关于 VisionFive 2 VisionFive 2 是全球第一款集成 3D GPU 的高性能量产
    发表于 09-08 11:45