wrient 发表于 2018-7-29 12:02:27

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

本帖最后由 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试了也没有用的。

制作代码如下:debootstrap --foreign --no-check-gpg --arch=armhf stretch ~/stretch http://ftp.cn.debian.org/debian/
#tar -c * |gzip -9 > ../debian-armhf-stage1.tar.gz
cp /usr/bin/qemu-arm-static usr/bin/
chroot . /debootstrap/debootstrap --second-stage
file bin/bash
#tar -c * |gzip -9 > ../debian-armhf-stage2.tar.gz
export LC_ALL=C
cp etc/apt/sources.list etc/apt/sources.list.bak
cat << EOT > etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/debian/ stretch main
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main
deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main
deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main
EOT
chroot . apt-get update
chroot . apt-get install -y locales openssh-server fbset tree curl wget locate
echo "cubietruck" > etc/hostname
cp etc/network/interfaces etc/network/interfaces.bak
cat << EOT > etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
EOT
chroot . passwd root
#chroot . vi etc/ssh/sshd_config -->PermitRootLogin
chroot . apt-get clean
cat << EOT > etc/modules
gpio_sunxi
pwm_sunxi
sunxi_gmac
disp
lcd
hdmi
ump
mali
sunxi_cedar_mod
EOT
# 复制 /lib/modules、<span style="line-height: 1.5;">etc/modprobe.d</span><span style="line-height: 1.5;">文件夹</span>显示分区如下:root@cubietruck:~# fdisk -l
Disk /dev/nand: 3.7 GiB, 3984588800 bytes, 7782400 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
root@cubietruck:~# du
12      .
root@cubietruck:~# df
Filesystem   1K-blocks   Used Available Use% Mounted on
/dev/root         780084 414392    32606456% /
devtmpfs          909424      0    909424   0% /dev
tmpfs            1007840      0   1007840   0% /dev/shm
tmpfs            1007840   8464    999376   1% /run
tmpfs               5120      0      5120   0% /run/lock
tmpfs            1007840      0   1007840   0% /sys/fs/cgroup
tmpfs            20480      0   20480   0% /tmp
tmpfs             201568      0    201568   0% /run/user/0
root@cubietruck:~#

wrient 发表于 2018-7-30 21:56:39

本帖最后由 wrient 于 2018-8-9 20:53 编辑

有人知道木。。。。。。

页: [1]
查看完整版本: 求助,自制livesuit后,硬盘空间不够,求助nand调整方法,谢谢