stage4-openrc-plasma.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. merge-usr
  3. dracut --force --no-hostonly --kver $(ls /lib/modules/)
  4. echo "root:87658765XeniaLinux" | chpasswd
  5. chown root:root /etc/sudoers
  6. cp /etc/passwd /.recovery/etc/passwd
  7. cp /etc/shadow /.recovery/etc/shadow
  8. echo "recovery:x:1000:1000::/home/recovery:/bin/bash" >> /.recovery/etc/passwd
  9. echo "recovery:$6$ovJXS/P4rKaURNaD$IUmaP2JW5uiJgrFVr31bEMb6kEF.ARL.x23m.qvyJ3.oRRbJ1qQ/pU5R2VocEzunYqSGF/YvLFGqF5gn0BQY90:19574::::::" >> /.recovery/etc/shadow
  10. sed s/wheel:x:10:root/wheel:x:10:root,recovery/ /etc/group > /.recovery/etc/group
  11. echo "recovery:x:1000:" >> /.recovery/etc/group
  12. chown 1000:1000 -R /.recovery/home/recovery
  13. chown portage:portage /var/cache/distfiles
  14. cp /usr/share/i18n/SUPPORTED /etc/locale.gen
  15. locale-gen
  16. rm /boot/*.old
  17. cp /boot/vmlinuz* /boot/vmlinuz
  18. cp /boot/initramfs* /boot/initramfs.img
  19. cp /boot/System* /boot/System.map
  20. cp /boot/config* /boot/config
  21. flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
  22. #eselect repository add xenia-overlay git https://gitlab.com/xenia-group/xenia-overlay.git
  23. #emaint sync --repo xenia-overlay
  24. sed -i 's/gdm/sddm/' /etc/conf.d/display-manager
  25. chown --from=1001:1001 root:root /etc -R
  26. chown --from=1001:1001 root:root /
  27. chown --from=1001:1001 root:root /boot -R
  28. chown --from=1001:1001 root:root /overlay -R
  29. chown --from=1001:1001 root:root /roots -R
  30. chown --from=1001:1001 root:root /usr -R
  31. chown --from=1001:1001 root:root /var -R
  32. chown --from=1000:1000 root:root /etc -R
  33. chown --from=1000:1000 root:root /
  34. chown --from=1000:1000 root:root /boot -R
  35. chown --from=1000:1000 root:root /overlay -R
  36. chown --from=1000:1000 root:root /roots -R
  37. chown --from=1000:1000 root:root /usr -R
  38. chown --from=1000:1000 root:root /var -R