CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 7235|回复: 1

求助,自制livesuit后,硬盘空间不够,求助nand调整方法,谢谢

[复制链接]
发表于 2018-7-29 12:02:27 | 显示全部楼层 |阅读模式
本帖最后由 wrient 于 2018-8-26 21:57 编辑

简单说是使用原有的img文件,经过imgrepacker解包后,挂载rootfs.fex,再删除所有文件,经过debootstrap生成根文件系统,在imgrepacker打包img文件,通过PhoenixSuit输入cubietruck,但是磁盘分区变了,不知道怎么调整回来,按道理,都没有生成ext4格式文件,仅仅删除,不至于变化,解决不了,特来求助。

参考http://www.cubie.cc/forum.php?mo ... 1918&extra=page%3D1与其它帖子,但是nand空间大小始终调整不了,也看了mk_ext4_rootfs.sh里面,没有设置根目录/的挂载大小,sys_partition试了也没有用的。

制作代码如下:
  1. debootstrap --foreign --no-check-gpg --arch=armhf stretch ~/stretch http://ftp.cn.debian.org/debian/
  2. #tar -c * |gzip -9 > ../debian-armhf-stage1.tar.gz
  3. cp /usr/bin/qemu-arm-static usr/bin/
  4. chroot . /debootstrap/debootstrap --second-stage
  5. file bin/bash
  6. #tar -c * |gzip -9 > ../debian-armhf-stage2.tar.gz
  7. export LC_ALL=C
  8. cp etc/apt/sources.list etc/apt/sources.list.bak
  9. cat << EOT > etc/apt/sources.list
  10. deb http://mirrors.ustc.edu.cn/debian/ stretch main
  11. deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main
  12. deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main
  13. deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main
  14. EOT
  15. chroot . apt-get update
  16. chroot . apt-get install -y locales openssh-server fbset tree curl wget locate
  17. echo "cubietruck" > etc/hostname
  18. cp etc/network/interfaces etc/network/interfaces.bak
  19. cat << EOT > etc/network/interfaces
  20. auto lo eth0
  21. iface lo inet loopback
  22. iface eth0 inet dhcp
  23. EOT
  24. chroot . passwd root
  25. #chroot . vi etc/ssh/sshd_config -->PermitRootLogin
  26. chroot . apt-get clean
  27. cat << EOT > etc/modules
  28. gpio_sunxi
  29. pwm_sunxi
  30. sunxi_gmac
  31. disp
  32. lcd
  33. hdmi
  34. ump
  35. mali
  36. sunxi_cedar_mod
  37. EOT
  38. # 复制 /lib/modules、<span style="line-height: 1.5;">etc/modprobe.d</span><span style="line-height: 1.5;">文件夹</span>
复制代码
显示分区如下:
  1. root@cubietruck:~# fdisk -l
  2. Disk /dev/nand: 3.7 GiB, 3984588800 bytes, 7782400 sectors
  3. Units: sectors of 1 * 512 = 512 bytes
  4. Sector size (logical/physical): 512 bytes / 512 bytes
  5. I/O size (minimum/optimal): 512 bytes / 512 bytes
  6. root@cubietruck:~# du
  7. 12      .
  8. root@cubietruck:~# df
  9. Filesystem     1K-blocks   Used Available Use% Mounted on
  10. /dev/root         780084 414392    326064  56% /
  11. devtmpfs          909424      0    909424   0% /dev
  12. tmpfs            1007840      0   1007840   0% /dev/shm
  13. tmpfs            1007840   8464    999376   1% /run
  14. tmpfs               5120      0      5120   0% /run/lock
  15. tmpfs            1007840      0   1007840   0% /sys/fs/cgroup
  16. tmpfs              20480      0     20480   0% /tmp
  17. tmpfs             201568      0    201568   0% /run/user/0
  18. root@cubietruck:~#
复制代码

回复

使用道具 举报

 楼主| 发表于 2018-7-30 21:56:39 | 显示全部楼层
本帖最后由 wrient 于 2018-8-9 20:53 编辑

有人知道木。。。。。。

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-4-19 10:09 , Processed in 0.023363 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部