To avoid posts by spam, a message body without the word #FuguIta is rejected. Please include the word in your message text.
URLs in the body of the message will also be judged as spam. If you wish to express a URL, please omit the scheme (http://, https://, etc.).
kaw (2022-12-28 (Wed) 01:30:25)
When remastering LiveUSB using usbfadm, you can now specify whether MFS or TMPFS is the file system to mount on /ram. The default is MFS.fugu-demo# usbfadm : sd1d : fugu-demo ->newdrive : Type of /ram: 1: [MFS] 2: TMPFS -> :Also, when creating LiveDVD images with remaster_dvd.sh, the command line option -m can now be used to specify the same.
fugu-demo# remaster_dvd.sh -h Usage: remaster_dvd.sh [-m mfs|tmpfs] fugu-demo# remaster_dvd.sh -m tmpfs Changing file system of /ram: from mfs to tmpfs mkhybrid 1.12b5.1 Scanning . Scanning ./etc :#FuguIta
kaw (2022-12-19 (Mon) 15:35:41)
A few weeks ago, a fix was committed for kernel panics caused by TMPFS operations.
https://marc.info/?l=openbsd-cvs&m=166853221306810&w=2
Therefore, in this release FuguIta-*-202212191, TMPFS is now enabled on the FuguIta kernel.
At boot time, /ram is mounted with MFS as before, but to enable TMPFS mounting instead, rewrite the value of memfstype in the system image file fuguita-7.2-ARCH.ffsimg.
The procedure is as follows
To modify LiveUSB, on running FuguIta LiveUSB:# mount -uw /sysmedia # mount -uw /fuguita # sed -i.bak -e '/memfstype=/s/=mfs/=tmpfs/' /fuguita/etc/fuguita/global.conf <-- or use your preferred editor # cat /fuguita/etc/fuguita/global.conf fuguita_sys_mb=1010 # size of media.img memfstype=tmpfs # 'mfs' or 'tmpfs' <-- make sure memfstype is set to tmpfs mfs_max_mb=30720 # mfs hard limit - 30GB # mount -ur /fuguita # mount -ur /sysmedia # rebootTo generate modified ISO image, on running FuguIta LiveUSB or LiveDVD:
# cd / # pax -rwpe sysmedia WORKDIR <-- WORKDIR is the directory that can have the capacity more than about 2GB # cd WORKDIR/sysmedia # vnconfig vnd0 fuguita-7.2-amd64.ffsimg vnd0 # mount /dev/vnd0a /mnt # sed -i.bak -e '/memfstype=/s/=mfs/=tmpfs/' /mnt/etc/fuguita/global.confg <-- or use your preferred editor # cat /mnt/etc/fuguita/global.conf fuguita_sys_mb=1010 # size of media.img memfstype=tmpfs # 'mfs' or 'tmpfs' <-- make sure memfstype is set to tmpfs mfs_max_mb=30720 # mfs hard limit - 30GB # umount /mnt # vnconfig -u vnd0 # remaster_dvd.sh <-- generate ISO image mkhybrid 1.12b5.1 Scanning . Scanning ./etc Size of boot image is 4 sectors -> No-emulation CD boot sector Total translation table size: 0 Total rockridge attributes bytes: 1028 Total directory bytes: 2048 Path table size(bytes): 22 512769 extents written (1001 Mb) # ls -l .. <-- the ISO image is generated at parent directory total 2052114 -rw-r--r-- 1 root wheel 1050150912 Dec 18 06:13 FuguIta-7.2-amd64-202212181.iso drwxr-xr-x 3 root wheel 512 Oct 22 17:09 sysmediaWhen booting with modified media, size of tmpfs is prompted.
available memory: 239M Enter tmpfs size (0M is auto). You can add suffix K, M, or G. % is a percentage of memory size. and %% is a percentage of the total memory and swap. otherwise considered "megabytes" [default: 0M] -> set tmpfs size to 0MBWith the procedures described above, you can use FuguIta with TMPFS. Although note that TMPFS is not completely stable. TMPFS may cause kernel panic when it is heavily being paged out and in. For example, this problem can be reproduced by executing following test script.
#!/bin/sh # test directory located in tmpfs # testdir=/ram # in case of FuguIta cd $testdir || exit 1 df -h swapctl -lk blk=64 # block size of dd write in MB i=1 while [[ $(df -h | awk '$6 ~ /\/ram$/ { print 0+$5 }') < 95 ]]; do echo "====trying ${i}*${blk}MB ====" dd if=/dev/zero of=zerofill_${i} bs=1m count=$blk || break df -h swapctl -lk i=$((i+1)) done
Former articles are at FuguIta/BBS/12.