stage4-systemd-plasma.sh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/bash
  2. dracut --force --no-hostonly --kver $(ls /lib/modules/)
  3. echo "root:87658765XeniaLinux" | chpasswd
  4. chown root:root /etc/sudoers
  5. mkdir /opt
  6. mkdir /usr/opt
  7. cp -r /opt/* /usr/opt
  8. rm -rf /opt
  9. ln -sf /usr/opt /
  10. cp /etc/passwd /.recovery/etc/passwd
  11. cp /etc/shadow /.recovery/etc/shadow
  12. echo "recovery:x:1000:1000::/home/recovery:/bin/bash" >> /.recovery/etc/passwd
  13. echo "recovery:$6$ovJXS/P4rKaURNaD$IUmaP2JW5uiJgrFVr31bEMb6kEF.ARL.x23m.qvyJ3.oRRbJ1qQ/pU5R2VocEzunYqSGF/YvLFGqF5gn0BQY90:19574::::::" >> /.recovery/etc/shadow
  14. sed s/wheel:x:10:root/wheel:x:10:root,recovery/ /etc/group > /.recovery/etc/group
  15. echo "recovery:x:1000:" >> /.recovery/etc/group
  16. chown 1000:1000 -R /.recovery/home/recovery
  17. chown portage:portage /var/cache/distfiles
  18. cp /usr/share/i18n/SUPPORTED /etc/locale.gen
  19. locale-gen
  20. systemctl enable bluetooth
  21. systemctl enable NetworkManager
  22. systemctl enable cups
  23. systemctl enable systemd-timesyncd
  24. systemctl enable sddm
  25. systemctl enable lvm2-monitor
  26. systemctl enable qemu-guest-agent
  27. systemctl enable spice-vdagentd
  28. systemctl enable zfs.target
  29. systemctl enable zfs-import-cache
  30. systemctl enable zfs-mount
  31. systemctl enable zfs-import.target
  32. systemctl --global enable pipewire.socket pipewire-pulse.socket wireplumber.service
  33. rm /boot/*.old
  34. cp /boot/vmlinuz* /boot/vmlinuz
  35. cp /boot/initramfs* /boot/initramfs.img
  36. cp /boot/System* /boot/System.map
  37. cp /boot/config* /boot/config
  38. flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
  39. #eselect repository add xenia-overlay git https://gitlab.com/xenia-group/xenia-overlay.git
  40. #emaint sync --repo xenia-overlay
  41. sed -i 's/gdm/sddm/' /etc/conf.d/display-manager
  42. chown --from=1001:1001 root:root /etc -R
  43. chown --from=1001:1001 root:root /
  44. chown --from=1001:1001 root:root /boot -R
  45. chown --from=1001:1001 root:root /overlay -R
  46. chown --from=1001:1001 root:root /roots -R
  47. chown --from=1001:1001 root:root /usr -R
  48. chown --from=1001:1001 root:root /var -R
  49. chown --from=1000:1000 root:root /etc -R
  50. chown --from=1000:1000 root:root /
  51. chown --from=1000:1000 root:root /boot -R
  52. chown --from=1000:1000 root:root /overlay -R
  53. chown --from=1000:1000 root:root /roots -R
  54. chown --from=1000:1000 root:root /usr -R
  55. chown --from=1000:1000 root:root /var -R