SHARE
TWEET

Untitled

a guest Apr 18th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. # using a particular version of linux removes unneeded depends
  4. p2="linux5.0 syslinux runit-void xbps"
  5.  
  6. # changing p1 might need changes lower down
  7. p1="base-files musl busybox"
  8.  
  9. for f in dev proc sys
  10. do
  11.     mkdir /mnt/$f
  12.     mount -B /$f /mnt/$f
  13. done
  14.  
  15. mkdir -p /mnt/var/db/xbps/keys
  16. mkdir -p /mnt/usr/share
  17. cp /var/db/xbps/xeys/* /mnt/var/db/xbps/keys
  18. cp -a /usr/share/xbps.d /mnt/usr/share
  19.  
  20. xbps-install -r /mnt -SyU $p1
  21. /mnt/bin/busybox --list | while read app
  22. do
  23.     ln busybox /mnt/bin/$app
  24. done
  25. xbps-install -r /mnt -SyU $p2
  26. xbps-reconfigure -r /mnt -f base-files
  27. chroot /mnt xbps-reconfigure -a
  28.  
  29. vi /mnt/etc/rc.conf
  30. echo void > /mnt/etc/hostname
  31. echo "root:root" | chpasswd -r /mnt
  32.  
  33. mkdir -p /mnt/boot/extlinux
  34. chroot /mnt extlinux -i /boot/extlinux
  35. cat > /mnt/boot/extlinux/extlinux.conf << EOF
  36. DEFAULT void
  37.  
  38. LABEL void
  39.     LINUX /$(cd /mnt/boot && echo vmlinuz*)
  40.     APPEND root=/dev/sda1 ro quiet
  41. EOF
  42.  
  43. umount /mnt/sys /mnt/proc /mnt/dev /mnt
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top