-
Notifications
You must be signed in to change notification settings - Fork 12
mizy overlay filesystem usage
Daniel Mahony edited this page Jan 31, 2019
·
3 revisions
-
overlay info
- show some info about overlay image -
overlay save -f
- save change to persistent storage -
overlay.gz2jffs
- convert tar.gz user data to jffs (last system can store user data as raw tar.gz format just on block device without any file system )
MMC storage, user data in jffs
[email protected]:/etc/rc.local.d# overlay info
[i] dev /dev/mmcblk0
==miZy mmc header
16777216
orange_pi_zero_miZy-sys2info-id-.MMC.hybrid.16M.8192.bin
miZy_spi_image_builder Fri Nov 2 20:44:11 2018 ## hyphop ##
==
[i] parts: uboot=524288;script=65536;dtb=65536;kernel=3801088;initrd=7798784;user=4521984
[i] total size: 16777216
[i] user data offset: 12255232
[i] user data size: 4521984
[i] LOOP: /dev/loop0
[i] MTD: /dev/mtd7
[i] MTDBLK: /dev/mtdblock7
/dev/mtdblock7 /tmp/user.MMC jffs2 ro,noatime 0 0
/dev/mtdblock7 4416 272 4144 6% /tmp/user.MMC
MMC storage, if user data in tar.gz
overlay info
[i] dev /dev/mmcblk0
==miZy mmc header
16777216
orange_pi_zero_miZy-sys2info-id-.MMC.hybrid.16M.8192.bin
miZy_spi_image_builder Fri Nov 2 20:44:11 2018 ## hyphop ##
==
[i] parts: uboot=524288;script=65536;dtb=65536;kernel=3801088;initrd=7798784;user=4521984
[i] total size: 16777216
[i] user data offset: 12255232
[i] user data size: 4521984
[i] LOOP:
[i] MTD:
[i] MTDBLK:
convert gz to jffs
overlay.gz2jffs yes
[i] check /dev/loop0 gz: yes
[i] usage /opt/overlay.gz2jffs yes
[email protected]:/etc/rc.local.d# overlay.gz2jffs yes
[i] check /dev/loop0 gz: yes
ff* => dd of=/dev/mmcblk0 count=552 bs=8192 seek=1497
551+1 records in
551+1 records out
4519936 bytes (4.3MB) copied, 2.009147 seconds, 2.1MB/s
[i] check /dev/loop0 gz:
[i] force mode
rsync -av --delete --inplace /overlay /tmp/user
[i] /dev/mtdblock7 /tmp/user.MMC jffs2 ro,noatime 0 0
[w] /tmp/user mounted as read only
[i] force mode / remount ro to rw /tmp/user.MMC
sending incremental file list
overlay/
overlay/etc/
overlay/etc/hostname
overlay/etc/rc.local
sent 14,870 bytes received 207 bytes 30,154.00 bytes/sec
total size is 14,102 speedup is 0.94
[i] force mode / remount rw to ro /tmp/user.MMC
mount
- rootfs on / type rootfs (rw)
- /dev/root on / type squashfs (ro,relatime)
- devtmpfs on /dev type devtmpfs (rw,relatime,size=185408k,nr_inodes=46352,mode=755)
- none on /proc type proc (rw,relatime)
- tmp on /mnt type tmpfs (rw,relatime)
- /dev/ram0 on /rom type squashfs (ro,relatime)
- tmp-overlay on /overlay type tmpfs (rw,relatime)
- overlayfs on / type overlayfs (rw,sync,noatime,lowerdir=/mnt/ro,upperdir=/mnt/rw)
- sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
- cgroup on /sys/fs/cgroup type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,blkio,freezer,devices,memory,cpuacct,cpu,cpuset)
- tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
- tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
- devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
- debugfs on /sys/kernel/debug type debugfs (rw,noatime)
----------------------------------------
< ROOT FS OVERLAY >
----------------------------------------
RAM-RO SQUSHFS | RAM-RW (online changes)
----------------------------------------
STORAGES | SPI | SD | MMC | USB | ...
----------------------------------------