Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: aus9 on May 21, 2023, 03:09:07 AM
-
Hi
I have forgotten most things about piCore so if you think its written somewhere and I have failed to understand, have a laugh and then tell me straight please.
if you see any config wrong....because I have failed to spot ....assume I am an idiot tell me please
I have a model B 4G Ram and a 32G sdcard. I read the readme that suggested you add NOZSWAP bootcode to stop /dev/zram0 (swapfile) but I noticed the following
dmesg | grep swap
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1920x1080M@60,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:4B:4A:65 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 zswap.compressor=lz4 zswap.zpool=z3fold console=tty1 root=/dev/ram0 rootwait quiet nortc loglevel=3 noembed home=/dev/mmcblk0p2 NOZSWAP
[ 2.424458] Adding 952176k swap on /dev/zram0. Priority:-2 extents:1 across:952176k SSFS
[ 2.770787] Adding 4661968k swap on /dev/mmcblk0p3. Priority:-3 extents:1 across:4661968k SSFS
I made that swap partition and my /etc/fstab is in back up and reads
# /etc/fstab
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/mmcblk0p1 /mnt/mmcblk0p1 vfat noauto,users,exec,umask=000 0 0
/dev/mmcblk0p2 /mnt/mmcblk0p2 ext4 users,exec 0 1
/dev/mmcblk0p3 swap swap defaults 0 0
I load inxi and util-linux and
inxi --swap
Swap:
ID-1: swap-1 type: zram size: 929.9 MiB used: 0 KiB (0.0%) dev: /dev/zram0
ID-2: swap-2 type: partition size: 4.45 GiB used: 0 KiB (0.0%) dev: /dev/mmcblk0p3/usr/local/sbin/swapon --summary
Filename Type Size Used Priority
/dev/zram0 partition 952176 0 -2
/dev/mmcblk0p3 partition 4661968 0 -3
Can you spot my errors please?
-
Hi aus9
... I read the readme that suggested you add NOZSWAP bootcode to stop /dev/zram0 (swapfile) ...
It's case sensitive. That needs to be:
nozswap
... I made that swap partition and my /etc/fstab is in back up ...
Don't back up /etc/fstab , it will find the swap partition on its own.
-
Hi Rich
piCore 14x README states
By default piCore has a gzip compressed swap in RAM, automatically
sized to 25% of available RAM. This can be disabled with the NOZSWAP
boot code.
I will make your suggested changes, I have to post in Beta so will let Paul_123 know there thanks
anyhow, I was going nuts trying to figure what I did wrong....I am glad I am still innocent ;)
trivia, that file for swap appears to be unchange boot code since 6x as per
http://tinycorelinux.net/6.x/armv6/releases/README
Please mark as solved
Rich, I have deleted home from backup. So will piCore detect /home on mmcblk0p2 as well?
-
Hi aus9
... Please mark as solved ...
Done.
... I have deleted home from backup. So will piCore detect /home on mmcblk0p2 as well?
No. Try adding the boot code:
home=mmcblk0p2
-
Hi Rich
done but raised a minor issue trying to use GUI to delete etc/fstab in aarch64. I used nano instead
-
This is an update after I used a power switch off and on to get around a video crash. I make mistakes so feel free to point them out please
For those interested in having only a swap partition and no swap file read on please
1) I used TC64 gparted to create and format my swap for my sdcard but you can use command line tools
so do that please
2) boot up and you may need to turn off existing swap if its active eg
sudo swapoff /dev/zram0 3) Use root powers to edit /etc/fstab so assuming you have only 3 partitions your swap line reads
/dev/mmcblk0p3 swap swap defaults 0 0
4) Edit /opt/.filetool.lst to add line
etc/fstab
or use GUI cpanel
5) mount /dev/mmcblk0p1 and edit cmdline.txt to include the boot code nozswap
As Rich as kindly pointed out....its all lowercase
6) reboot with backup enabled. I am a visual type person so htop does a good job at showing my swap size
There are command alternatives including
dmesg | swap
-
Hi aus9
... 3) Use root powers to edit /etc/fstab so assuming you have only 3 partitions your swap line reads
/dev/mmcblk0p3 swap swap defaults 0 0
...
Tinycore can find swap partitions and add them to /etc/fstab on its own like this:
sudo rebuildfstab
... 4) Edit /opt/.filetool.lst to add line
etc/fstab
or use GUI cpanel ...
If you back up /etc/fstab here is what happens. During bootup, /etc/init.d/tc-config runs
rebuildfstab creating a fresh /etc/fstab. Just before /etc/init.d/tc-config exits, it runs the
restore and overwrites the fresh data in /etc/fstab with the stale data you backed up.