Fix zram: remove udev rule, use zram-configurator
This commit is contained in:
parent
965afbe2ad
commit
a945145e04
|
@ -63,7 +63,7 @@ chroot "$rootdir" sed -i "s/#ParallelDownloads/ParallelDownloads/g" /etc/pacman.
|
|||
log "Update key store"
|
||||
chroot "$rootdir" pacman -Sy archlinux-keyring archlinuxarm-keyring --noconfirm
|
||||
log "Updating system and installing needed packages"
|
||||
chroot "$rootdir" pacman -Syu sudo bluez bluez-utils vulkan-freedreno networkmanager --noconfirm
|
||||
chroot "$rootdir" pacman -Syu sudo bluez bluez-utils vulkan-freedreno networkmanager zram-generator --noconfirm
|
||||
|
||||
# Install nabu specific packages
|
||||
log "Installing nabu kernel, modules, firmwares and userspace daemons"
|
||||
|
@ -73,7 +73,7 @@ rm "$rootdir"/opt/*.zst
|
|||
|
||||
# Enable userspace daemons
|
||||
log "Enabling userspace daemons"
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs bluetooth NetworkManager
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs bluetooth NetworkManager systemd-zram-setup@zram0.service
|
||||
|
||||
# Clean pacman cache
|
||||
log "Cleaning pacman cache"
|
||||
|
@ -88,7 +88,7 @@ cp ./drop/00_image_builder "$rootdir/etc/sudoers.d/00_image_builder"
|
|||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
|
||||
|
||||
# Generate en_US locale
|
||||
log "Generating en_US locale"
|
||||
|
|
|
@ -57,7 +57,7 @@ chroot "$rootdir" sed -i "s/#ParallelDownloads/ParallelDownloads/g" /etc/pacman.
|
|||
log "Update key store"
|
||||
chroot "$rootdir" pacman -Sy archlinux-keyring archlinuxarm-keyring --noconfirm
|
||||
log "Updating system and installing needed packages"
|
||||
chroot "$rootdir" pacman -Syu sudo gdm gnome-menus gnome-backgrounds gnome-control-center gnome-keyring xdg-user-dirs-gtk nautilus xdg-desktop-portal-gnome gnome-console bluez bluez-utils vulkan-freedreno networkmanager --noconfirm
|
||||
chroot "$rootdir" pacman -Syu sudo gdm gnome-menus gnome-backgrounds gnome-control-center gnome-keyring xdg-user-dirs-gtk nautilus xdg-desktop-portal-gnome gnome-console bluez bluez-utils vulkan-freedreno networkmanager zram-generator --noconfirm
|
||||
|
||||
# Install nabu specific packages
|
||||
log "Installing nabu kernel, modules, firmwares and userspace daemons"
|
||||
|
@ -67,7 +67,7 @@ rm "$rootdir"/opt/*.zst
|
|||
|
||||
# Enable userspace daemons
|
||||
log "Enabling userspace daemons"
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs gdm bluetooth NetworkManager
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs gdm bluetooth NetworkManager systemd-zram-setup@zram0.service
|
||||
|
||||
# Clean pacman cache
|
||||
log "Cleaning pacman cache"
|
||||
|
@ -82,7 +82,7 @@ cp ./drop/00_image_builder "$rootdir/etc/sudoers.d/00_image_builder"
|
|||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
|
||||
|
||||
# Generate en_US locale
|
||||
log "Generating en_US locale"
|
||||
|
|
|
@ -57,7 +57,7 @@ chroot "$rootdir" sed -i "s/#ParallelDownloads/ParallelDownloads/g" /etc/pacman.
|
|||
log "Update key store"
|
||||
chroot "$rootdir" pacman -Sy archlinux-keyring archlinuxarm-keyring --noconfirm
|
||||
log "Updating system and installing needed packages"
|
||||
chroot "$rootdir" pacman -Syu sudo plasma grub konsole dolphin ark bluez bluez-utils xorg-xrandr xorg-xinput qt5-virtualkeyboard vulkan-freedreno networkmanager --noconfirm
|
||||
chroot "$rootdir" pacman -Syu sudo plasma grub konsole dolphin ark bluez bluez-utils xorg-xrandr xorg-xinput qt5-virtualkeyboard vulkan-freedreno networkmanager zram-generator --noconfirm
|
||||
|
||||
# Install nabu specific packages
|
||||
log "Installing nabu kernel, modules, firmwares and userspace daemons"
|
||||
|
@ -67,7 +67,7 @@ rm "$rootdir"/opt/*.zst
|
|||
|
||||
# Enable userspace daemons
|
||||
log "Enabling userspace daemons"
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs sddm bluetooth NetworkManager
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs sddm bluetooth NetworkManager systemd-zram-setup@zram0.service
|
||||
|
||||
# Clean pacman cache
|
||||
log "Cleaning pacman cache"
|
||||
|
@ -82,7 +82,7 @@ cp ./drop/00_image_builder "$rootdir/etc/sudoers.d/00_image_builder"
|
|||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
|
||||
|
||||
# Generate en_US locale
|
||||
log "Generating en_US locale"
|
||||
|
|
|
@ -89,7 +89,7 @@ cp ./drop/00_image_builder "$rootdir/etc/sudoers.d/00_image_builder"
|
|||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
|
||||
|
||||
# +++ Rotate gdm
|
||||
log "Configuring gdm and gnome"
|
||||
|
|
|
@ -48,7 +48,7 @@ echo "127.0.0.1 localhost
|
|||
log "Updating system and installing needed packages"
|
||||
chroot "$rootdir" apt update
|
||||
chroot "$rootdir" apt upgrade -y
|
||||
chroot "$rootdir" apt install -y ubuntu-desktop bash-completion sudo ssh nano
|
||||
chroot "$rootdir" apt install -y ubuntu-desktop bash-completion sudo ssh nano rust-zram-generator
|
||||
|
||||
# Install nabu specific packages
|
||||
log "Installing nabu kernel, modules, firmwares and userspace daemons"
|
||||
|
@ -63,13 +63,13 @@ chroot "$rootdir" apt clean
|
|||
# Enable userspace daemons
|
||||
log "Generating fstab"
|
||||
log "Enabling userspace daemons"
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs
|
||||
chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs systemd-zram-setup@zram0.service
|
||||
|
||||
gen_fstab "$rootdir"
|
||||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
|
||||
|
||||
# +++ Rotate gdm
|
||||
log "Configuring gdm and gnome"
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# /etc/udev/rules.d/99-zram.rules
|
||||
ACTION=="add", KERNEL=="zram0", ATTR{comp_algorithm}="zstd", ATTR{disksize}="4G", RUN="/usr/bin/mkswap -U clear /dev/%k", TAG+="systemd"
|
3
drop/zram-generator.conf
Normal file
3
drop/zram-generator.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# /etc/systemd/zram-generator.conf
|
||||
[zram0]
|
||||
zram-size = ram
|
Loading…
Reference in a new issue