stage4-systemd.sh 2.1 KB

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