Sample Header Ad - 728x90

Any way to create zram disk (not swap) during boot time except via script?

1 vote
1 answer
330 views
https://askubuntu.com/questions/130374/ramdisk-compressed-writeable-no-swap Gives script to make zram disk (load module, set parameter, format block device, mount). Is there any way to have same result via /etc/fstab? I guess if not best way to run the script is via Systemd (system is Linux Mint)? TIA Edited part of the script:
modprobe zram num_devices=1 
echo 256M > /sys/block/zram0/disksize
mke2fs -q -m 0 -b 4096 -O sparse_super -L zram /dev/zram0
mount -o discard /dev/zram0 /mount_point
Asked by Alex Martian (1287 rep)
Nov 11, 2022, 09:51 AM
Last activity: Nov 12, 2022, 07:02 AM