commit 02cfd959d2b8c4678e515c80ba8858177f97de1e Author: Sohrab Behdani Date: Wed Mar 20 01:50:30 2024 +0330 initial push diff --git a/README.md b/README.md new file mode 100644 index 0000000..b4c53d1 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# ParchLinux TUI installer + +```bash +pacman -S git glibc dialog +git clone https://github.com/parchlinux/parchinstall +cd parchinstall +./setup + +``` diff --git a/etc/nvidia_340_pci_ids b/etc/nvidia_340_pci_ids new file mode 100644 index 0000000..984f35e --- /dev/null +++ b/etc/nvidia_340_pci_ids @@ -0,0 +1,283 @@ +Credits to the anarchy-linux project for this list (https://github.com/deadhead420/anarchy-linux/blob/master/etc/nvidia340.xx) +NVIDIA 340.xx chipset / PCI ID list + +NVIDIA GPU product Device PCI ID Subdevice PCI ID +---------------------------------------------------- +GeForce 8800 GTX 0x0191 +GeForce 8800 GTS 0x0193 +GeForce 8800 Ultra 0x0194 +Tesla C870 0x0197 +Quadro FX 5600 0x019D +Quadro FX 4600 0x019E +GeForce 8600 GTS 0x0400 +GeForce 8600 GT 0x0401 +GeForce 8600 GT 0x0402 +GeForce 8600 GS 0x0403 +GeForce 8400 GS 0x0404 +GeForce 9500M GS 0x0405 +GeForce 8300 GS 0x0406 +GeForce 8600M GT 0x0407 +GeForce 9650M GS 0x0408 +GeForce 8700M GT 0x0409 +Quadro FX 370 0x040A +Quadro NVS 320M 0x040B +Quadro FX 570M 0x040C +Quadro FX 1600M 0x040D +Quadro FX 570 0x040E +Quadro FX 1700 0x040F +GeForce GT 330 0x0410 +GeForce 8400 SE 0x0420 +GeForce 8500 GT 0x0421 +GeForce 8400 GS 0x0422 +GeForce 8300 GS 0x0423 +GeForce 8400 GS 0x0424 +GeForce 8600M GS 0x0425 +GeForce 8400M GT 0x0426 +GeForce 8400M GS 0x0427 +GeForce 8400M G 0x0428 +Quadro NVS 140M 0x0429 +Quadro NVS 130M 0x042A +Quadro NVS 135M 0x042B +GeForce 9400 GT 0x042C +Quadro FX 360M 0x042D +GeForce 9300M G 0x042E +Quadro NVS 290 0x042F +GeForce GTX 295 0x05E0 +GeForce GTX 280 0x05E1 +GeForce GTX 260 0x05E2 +GeForce GTX 285 0x05E3 +GeForce GTX 275 0x05E6 +Tesla C1060 0x05E7 +Tesla T10 Processor 0x05E7 0x0595 +Tesla T10 Processor 0x05E7 0x068F +Tesla M1060 0x05E7 0x0697 +Tesla M1060 0x05E7 0x0714 +Tesla M1060 0x05E7 0x0743 +GeForce GTX 260 0x05EA +GeForce GTX 295 0x05EB +Quadroplex 2200 D2 0x05ED +Quadroplex 2200 S4 0x05F8 +Quadro CX 0x05F9 +Quadro FX 5800 0x05FD +Quadro FX 4800 0x05FE +Quadro FX 3800 0x05FF +GeForce 8800 GTS 512 0x0600 +GeForce 9800 GT 0x0601 +GeForce 8800 GT 0x0602 +GeForce GT 230 0x0603 +GeForce 9800 GX2 0x0604 +GeForce 9800 GT 0x0605 +GeForce 8800 GS 0x0606 +GeForce GTS 240 0x0607 +GeForce 9800M GTX 0x0608 +GeForce 8800M GTS 0x0609 +GeForce 8800 GS 0x0609 0x00A7 +GeForce GTX 280M 0x060A +GeForce 9800M GT 0x060B +GeForce 8800M GTX 0x060C +GeForce 8800 GS 0x060D +GeForce GTX 285M 0x060F +GeForce 9600 GSO 0x0610 +GeForce 8800 GT 0x0611 +GeForce 9800 GTX/9800 GTX+ 0x0612 +GeForce 9800 GTX+ 0x0613 +GeForce 9800 GT 0x0614 +GeForce GTS 250 0x0615 +GeForce 9800M GTX 0x0617 +GeForce GTX 260M 0x0618 +Quadro FX 4700 X2 0x0619 +Quadro FX 3700 0x061A +Quadro VX 200 0x061B +Quadro FX 3600M 0x061C +Quadro FX 2800M 0x061D +Quadro FX 3700M 0x061E +Quadro FX 3800M 0x061F +GeForce GT 230 0x0621 +GeForce 9600 GT 0x0622 +GeForce 9600 GS 0x0623 +GeForce 9600 GSO 512 0x0625 +GeForce GT 130 0x0626 +GeForce GT 140 0x0627 +GeForce 9800M GTS 0x0628 +GeForce 9700M GTS 0x062A +GeForce 9800M GS 0x062B +GeForce 9800M GTS 0x062C +GeForce 9600 GT 0x062D +GeForce 9600 GT 0x062E +GeForce GT 130 0x062E 0x0605 +GeForce 9700 S 0x0630 +GeForce GTS 160M 0x0631 +GeForce GTS 150M 0x0632 +GeForce 9600 GSO 0x0635 +GeForce 9600 GT 0x0637 +Quadro FX 1800 0x0638 +Quadro FX 2700M 0x063A +GeForce 9500 GT 0x0640 +GeForce 9400 GT 0x0641 +GeForce 9500 GT 0x0643 +GeForce 9500 GS 0x0644 +GeForce 9500 GS 0x0645 +GeForce GT 120 0x0646 +GeForce 9600M GT 0x0647 +GeForce 9600M GS 0x0648 +GeForce 9600M GT 0x0649 +GeForce GT 220M 0x0649 0x202D +GeForce 9700M GT 0x064A +GeForce 9500M G 0x064B +GeForce 9650M GT 0x064C +GeForce G 110M 0x0651 +GeForce GT 130M 0x0652 +GeForce GT 240M LE 0x0652 0x0850 +GeForce GT 120M 0x0653 +GeForce GT 220M 0x0654 +GeForce GT 320M 0x0654 0x14A2 +GeForce GT 320M 0x0654 0x14D2 +GeForce GT 120 0x0655 0x0633 +GeForce GT 120 0x0656 0x0693 +Quadro FX 380 0x0658 +Quadro FX 580 0x0659 +Quadro FX 1700M 0x065A +GeForce 9400 GT 0x065B +Quadro FX 770M 0x065C +GeForce 9300 GE 0x06E0 +GeForce 9300 GS 0x06E1 +GeForce 8400 0x06E2 +GeForce 8400 SE 0x06E3 +GeForce 8400 GS 0x06E4 +GeForce 9300M GS 0x06E5 +GeForce G100 0x06E6 +GeForce 9300 SE 0x06E7 +GeForce 9200M GS 0x06E8 +GeForce 9200M GE 0x06E8 0x360B +GeForce 9300M GS 0x06E9 +Quadro NVS 150M 0x06EA +Quadro NVS 160M 0x06EB +GeForce G 105M 0x06EC +GeForce G 103M 0x06EF +GeForce G105M 0x06F1 +Quadro NVS 420 0x06F8 +Quadro FX 370 LP 0x06F9 +Quadro FX 370 Low Profile 0x06F9 0x060D +Quadro NVS 450 0x06FA +Quadro FX 370M 0x06FB +Quadro NVS 295 0x06FD +HICx16 + Graphics 0x06FF +HICx8 + Graphics 0x06FF 0x0711 +GeForce 8200M 0x0840 +GeForce 9100M G 0x0844 +GeForce 8200M G 0x0845 +GeForce 9200 0x0846 +GeForce 9100 0x0847 +GeForce 8300 0x0848 +GeForce 8200 0x0849 +nForce 730a 0x084A +GeForce 9200 0x084B +nForce 980a/780a SLI 0x084C +nForce 750a SLI 0x084D +GeForce 8100 / nForce 720a 0x084F +GeForce 9400 0x0860 +GeForce 9400 0x0861 +GeForce 9400M G 0x0862 +GeForce 9400M 0x0863 +GeForce 9300 0x0864 +ION 0x0865 +GeForce 9400M G 0x0866 +GeForce 9400M 0x0866 0x00B1 +GeForce 9400 0x0867 +nForce 760i SLI 0x0868 +GeForce 9400 0x0869 +GeForce 9400 0x086A +GeForce 9300 / nForce 730i 0x086C +GeForce 9200 0x086D +GeForce 9100M G 0x086E +GeForce 8200M G 0x086F +GeForce 9400M 0x0870 +GeForce 9200 0x0871 +GeForce G102M 0x0872 +GeForce G205M 0x0872 0x1C42 +GeForce G102M 0x0873 +GeForce G205M 0x0873 0x1C52 +ION 0x0874 +ION 0x0876 +GeForce 9400 0x087A +ION 0x087D +ION LE 0x087E +ION LE 0x087F +GeForce 320M 0x08A0 +GeForce 320M 0x08A2 +GeForce 320M 0x08A3 +GeForce 320M 0x08A4 +GeForce 320M 0x08A5 +GeForce GT 220 0x0A20 +GeForce 315 0x0A22 +GeForce 210 0x0A23 +GeForce 405 0x0A26 +GeForce 405 0x0A27 +GeForce GT 230M 0x0A28 +GeForce GT 330M 0x0A29 +GeForce GT 230M 0x0A2A +GeForce GT 330M 0x0A2B +NVS 5100M 0x0A2C +GeForce GT 320M 0x0A2D +GeForce GT 415 0x0A32 +GeForce GT 240M 0x0A34 +GeForce GT 325M 0x0A35 +Quadro 400 0x0A38 +Quadro FX 880M 0x0A3C +GeForce G210 0x0A60 +GeForce 205 0x0A62 +GeForce 310 0x0A63 +Second Generation ION 0x0A64 +GeForce 210 0x0A65 +GeForce 310 0x0A66 +GeForce 315 0x0A67 +GeForce G105M 0x0A68 +GeForce G105M 0x0A69 +NVS 2100M 0x0A6A +NVS 3100M 0x0A6C +GeForce 305M 0x0A6E +Second Generation ION 0x0A6E 0x3607 +Second Generation ION 0x0A6F +GeForce 310M 0x0A70 +Second Generation ION 0x0A70 0x3605 +Second Generation ION 0x0A70 0x3617 +GeForce 305M 0x0A71 +GeForce 310M 0x0A72 +GeForce 305M 0x0A73 +Second Generation ION 0x0A73 0x3607 +Second Generation ION 0x0A73 0x3610 +GeForce G210M 0x0A74 +GeForce G210 0x0A74 0x903A +GeForce 310M 0x0A75 +Second Generation ION 0x0A75 0x3605 +Second Generation ION 0x0A76 +Quadro FX 380 LP 0x0A78 +GeForce 315M 0x0A7A +GeForce 405 0x0A7A 0x0003 +GeForce 405M 0x0A7A 0x3950 +GeForce 405M 0x0A7A 0x397D +GeForce 405 0x0A7A 0x3980 +GeForce 405 0x0A7A 0x8006 +GeForce 405 0x0A7A 0x90B4 +GeForce 405 0x0A7A 0xAA51 +GeForce 405 0x0A7A 0xAA58 +GeForce 405 0x0A7A 0xAC71 +GeForce 405 0x0A7A 0xAC82 +Quadro FX 380M 0x0A7C +GeForce GT 330 0x0CA0 +GeForce GT 320 0x0CA2 +GeForce GT 240 0x0CA3 +GeForce GT 340 0x0CA4 +GeForce GT 220 0x0CA5 +GeForce GT 330 0x0CA7 +GeForce GTS 260M 0x0CA8 +GeForce GTS 250M 0x0CA9 +GeForce GT 220 0x0CAC +GeForce GT 335M 0x0CAF +GeForce GTS 350M 0x0CB0 +GeForce GTS 360M 0x0CB1 +Quadro FX 1800M 0x0CBC +GeForce 9300 GS 0x10C0 +GeForce 8400GS 0x10C3 +GeForce 405 0x10C5 +NVS 300 0x10D8 diff --git a/etc/nvidia_390_pci_ids b/etc/nvidia_390_pci_ids new file mode 100644 index 0000000..af7bb9c --- /dev/null +++ b/etc/nvidia_390_pci_ids @@ -0,0 +1,870 @@ +Credits to the anarchy-linux project for this list (https://github.com/deadhead420/anarchy-linux/blob/master/etc/nvidia390.xx) +NVIDIA 390.xx chipset / PCI ID list + +NVIDIA GPU product Device PCI ID Subdevice PCI ID +---------------------------------------------------- + +GeForce GTX 480 06C0 +GeForce GTX 465 06C4 +GeForce GTX 480M 06CA +GeForce GTX 470 06CD +GeForce GT 440 0DC0 +GeForce GTS 450 0DC4 +GeForce GTS 450 0DC5 +GeForce GTS 450 0DC6 +GeForce GT 555M 0DCD +GeForce GT 555M 0DCE +GeForce GTX 460M 0DD1 +GeForce GT 445M 0DD2 +GeForce GT 435M 0DD3 +GeForce GT 550M 0DD6 +GeForce GT 440 0DE0 +GeForce GT 430 0DE1 +GeForce GT 420 0DE2 +GeForce GT 635M 0DE3 +GeForce GT 520 0DE4 +GeForce GT 530 0DE5 +GeForce GT 610 0DE7 +GeForce GT 620M 0DE8 +GeForce GT 630M 0DE9 +GeForce GT 620M 0DE9 1025 0692 +GeForce GT 620M 0DE9 1025 0725 +GeForce GT 620M 0DE9 1025 0728 +GeForce GT 620M 0DE9 1025 072B +GeForce GT 620M 0DE9 1025 072E +GeForce GT 620M 0DE9 1025 0753 +GeForce GT 620M 0DE9 1025 0754 +GeForce GT 640M LE 0DE9 17AA 3977 +GeForce GT 635M 0DE9 1B0A 2210 +GeForce 610M 0DEA +GeForce 615 0DEA 17AA 365A +GeForce 615 0DEA 17AA 365B +GeForce 615 0DEA 17AA 365E +GeForce 615 0DEA 17AA 3660 +GeForce 615 0DEA 17AA 366C +GeForce GT 555M 0DEB +GeForce GT 525M 0DEC +GeForce GT 520M 0DED +GeForce GT 415M 0DEE +GeForce GT 425M 0DF0 +GeForce GT 420M 0DF1 +GeForce GT 435M 0DF2 +GeForce GT 420M 0DF3 +GeForce GT 540M 0DF4 +GeForce GT 630M 0DF4 152D 0952 +GeForce GT 630M 0DF4 152D 0953 +GeForce GT 525M 0DF5 +GeForce GT 550M 0DF6 +GeForce GT 520M 0DF7 +GeForce GTX 460 0E22 +GeForce GTX 460 SE 0E23 +GeForce GTX 460 0E24 +GeForce GTX 470M 0E30 +GeForce GTX 485M 0E31 +GeForce GT 630 0F00 +GeForce GT 620 0F01 +GeForce GT 730 0F02 +GeForce GT 610 0F03 +GeForce GT 640 0FC0 +GeForce GT 640 0FC1 +GeForce GT 630 0FC2 +GeForce GTX 650 0FC6 +GeForce GT 740 0FC8 +GeForce GT 730 0FC9 +GeForce GT 755M 0FCD +GeForce GT 640M LE 0FCE +GeForce GT 650M 0FD1 +GeForce GT 640M 0FD2 +GeForce GT 640M LE 0FD2 1028 0595 +GeForce GT 640M LE 0FD2 1028 05B2 +GeForce GT 640M LE 0FD3 +GeForce GTX 660M 0FD4 +GeForce GT 650M 0FD5 +GeForce GT 640M 0FD8 +GeForce GT 645M 0FD9 +GeForce GT 740M 0FDF +GeForce GTX 660M 0FE0 +GeForce GT 730M 0FE1 +GeForce GT 745M 0FE2 +GeForce GT 745M 0FE3 +GeForce GT 745A 0FE3 103C 2B16 +GeForce GT 745A 0FE3 17AA 3675 +GeForce GT 750M 0FE4 +GeForce GT 750M 0FE9 +GeForce GT 755M 0FEA +GeForce 710A 0FEC +GeForce 820M 0FED +GeForce 810M 0FEE +GeForce GTX TITAN Z 1001 +GeForce GTX 780 1004 +GeForce GTX TITAN 1005 +GeForce GTX 780 1007 +GeForce GTX 780 Ti 1008 +GeForce GTX 780 Ti 100A +GeForce GTX TITAN Black 100C +GeForce GT 520 1040 +GeForce 510 1042 +GeForce 605 1048 +GeForce GT 620 1049 +GeForce GT 610 104A +GeForce GT 625 (OEM) 104B +GeForce GT 625 104B 1043 844C +GeForce GT 625 104B 1043 846B +GeForce GT 625 104B 1462 B590 +GeForce GT 625 104B 174B 0625 +GeForce GT 625 104B 174B A625 +GeForce GT 705 104C +GeForce GT 520M 1050 +GeForce GT 520MX 1051 +GeForce GT 520M 1052 +GeForce 410M 1054 +GeForce 410M 1055 +GeForce 610M 1058 +GeForce 610 1058 103C 2AF1 +GeForce 800A 1058 17AA 3682 +GeForce 705A 1058 17AA 3692 +GeForce 800A 1058 17AA 3695 +GeForce 800A 1058 17AA 36A8 +GeForce 800A 1058 17AA 36AC +GeForce 800A 1058 17AA 36AD +GeForce 800A 1058 705A 3682 +GeForce 610M 1059 +GeForce 610M 105A +GeForce 705M 105B +GeForce 705A 105B 103C 2AFB +GeForce 800A 105B 17AA 30B1 +GeForce 705A 105B 17AA 30F3 +GeForce 800A 105B 17AA 36A1 +GeForce GTX 580 1080 +GeForce GTX 570 1081 +GeForce GTX 560 Ti 1082 +GeForce GTX 560 1084 +GeForce GTX 570 1086 +GeForce GTX 560 Ti 1087 +GeForce GTX 590 1088 +GeForce GTX 580 1089 +GeForce GTX 580 108B +GeForce 820M 1140 1019 0799 +GeForce GT 720M 1140 1019 999F +GeForce GT 620M 1140 1025 0600 +GeForce GT 620M 1140 1025 0606 +GeForce GT 620M 1140 1025 064A +GeForce GT 620M 1140 1025 064C +GeForce GT 620M 1140 1025 067A +GeForce GT 620M 1140 1025 0680 +GeForce 710M 1140 1025 0686 +GeForce 710M 1140 1025 0689 +GeForce 710M 1140 1025 068B +GeForce 710M 1140 1025 068D +GeForce 710M 1140 1025 068E +GeForce 710M 1140 1025 0691 +GeForce GT 620M 1140 1025 0692 +GeForce GT 620M 1140 1025 0694 +GeForce GT 620M 1140 1025 0702 +GeForce GT 620M 1140 1025 0719 +GeForce GT 620M 1140 1025 0725 +GeForce GT 620M 1140 1025 0728 +GeForce GT 620M 1140 1025 072B +GeForce GT 620M 1140 1025 072E +GeForce GT 620M 1140 1025 0732 +GeForce GT 720M 1140 1025 0763 +GeForce 710M 1140 1025 0773 +GeForce 710M 1140 1025 0774 +GeForce GT 720M 1140 1025 0776 +GeForce 710M 1140 1025 077A +GeForce 710M 1140 1025 077B +GeForce 710M 1140 1025 077C +GeForce 710M 1140 1025 077D +GeForce 710M 1140 1025 077E +GeForce 710M 1140 1025 077F +GeForce GT 720M 1140 1025 0781 +GeForce GT 720M 1140 1025 0798 +GeForce GT 720M 1140 1025 0799 +GeForce GT 720M 1140 1025 079B +GeForce GT 720M 1140 1025 079C +GeForce GT 720M 1140 1025 0807 +GeForce 820M 1140 1025 0821 +GeForce GT 720M 1140 1025 0823 +GeForce GT 720M 1140 1025 0830 +GeForce GT 720M 1140 1025 0833 +GeForce GT 720M 1140 1025 0837 +GeForce 820M 1140 1025 083E +GeForce 710M 1140 1025 0841 +GeForce 820M 1140 1025 0853 +GeForce 820M 1140 1025 0854 +GeForce 820M 1140 1025 0855 +GeForce 820M 1140 1025 0856 +GeForce 820M 1140 1025 0857 +GeForce 820M 1140 1025 0858 +GeForce 820M 1140 1025 0863 +GeForce 820M 1140 1025 0868 +GeForce 810M 1140 1025 0869 +GeForce 820M 1140 1025 0873 +GeForce 820M 1140 1025 0878 +GeForce 820M 1140 1025 087B +GeForce 820M 1140 1025 087F +GeForce 820M 1140 1025 0881 +GeForce 820M 1140 1025 0885 +GeForce 820M 1140 1025 088A +GeForce 820M 1140 1025 089B +GeForce 820M 1140 1025 0921 +GeForce 810M 1140 1025 092E +GeForce 820M 1140 1025 092F +GeForce 820M 1140 1025 0932 +GeForce 820M 1140 1025 093A +GeForce 820M 1140 1025 093C +GeForce 820M 1140 1025 093F +GeForce 820M 1140 1025 0941 +GeForce 820M 1140 1025 0945 +GeForce 820M 1140 1025 0954 +GeForce 820M 1140 1025 0965 +GeForce GT 630M 1140 1028 054D +GeForce GT 630M 1140 1028 054E +GeForce GT 620M 1140 1028 0554 +GeForce GT 620M 1140 1028 0557 +GeForce GT 625M 1140 1028 0562 +GeForce GT 630M 1140 1028 0565 +GeForce GT 630M 1140 1028 0568 +GeForce GT 630M 1140 1028 0590 +GeForce GT 625M 1140 1028 0592 +GeForce GT 625M 1140 1028 0594 +GeForce GT 625M 1140 1028 0595 +GeForce GT 625M 1140 1028 05A2 +GeForce GT 625M 1140 1028 05B1 +GeForce GT 625M 1140 1028 05B3 +GeForce GT 630M 1140 1028 05DA +GeForce GT 720M 1140 1028 05DE +GeForce GT 720M 1140 1028 05E0 +GeForce GT 630M 1140 1028 05E8 +GeForce GT 720M 1140 1028 05F4 +GeForce GT 720M 1140 1028 060F +GeForce GT 720M 1140 1028 062F +GeForce 820M 1140 1028 064E +GeForce 820M 1140 1028 0652 +GeForce 820M 1140 1028 0653 +GeForce 820M 1140 1028 0655 +GeForce 820M 1140 1028 065E +GeForce 820M 1140 1028 0662 +GeForce 820M 1140 1028 068D +GeForce 820M 1140 1028 06AD +GeForce 820M 1140 1028 06AE +GeForce 820M 1140 1028 06AF +GeForce 820M 1140 1028 06B0 +GeForce 820M 1140 1028 06C0 +GeForce 820M 1140 1028 06C1 +GeForce GT 630M 1140 103C 18EF +GeForce GT 630M 1140 103C 18F9 +GeForce GT 630M 1140 103C 18FB +GeForce GT 630M 1140 103C 18FD +GeForce GT 630M 1140 103C 18FF +GeForce 820M 1140 103C 218A +GeForce 820M 1140 103C 21BB +GeForce 820M 1140 103C 21BC +GeForce 820M 1140 103C 220E +GeForce 820M 1140 103C 2210 +GeForce 820M 1140 103C 2212 +GeForce 820M 1140 103C 2214 +GeForce 820M 1140 103C 2218 +GeForce 820M 1140 103C 225B +GeForce 820M 1140 103C 225D +GeForce 820M 1140 103C 226D +GeForce 820M 1140 103C 226F +GeForce 820M 1140 103C 22D2 +GeForce 820M 1140 103C 22D9 +GeForce 820M 1140 103C 2335 +GeForce 820M 1140 103C 2337 +GeForce GT 720A 1140 103C 2AEF +GeForce 710A 1140 103C 2AF9 +GeForce GT 720M 1140 1043 11FD +GeForce GT 720M 1140 1043 124D +GeForce GT 720M 1140 1043 126D +GeForce GT 720M 1140 1043 131D +GeForce GT 720M 1140 1043 13FD +GeForce GT 720M 1140 1043 14C7 +GeForce GT 620M 1140 1043 1507 +GeForce 820M 1140 1043 15AD +GeForce 820M 1140 1043 15ED +GeForce 820M 1140 1043 160D +GeForce 820M 1140 1043 163D +GeForce 820M 1140 1043 165D +GeForce 820M 1140 1043 166D +GeForce 820M 1140 1043 16CD +GeForce 820M 1140 1043 16DD +GeForce 820M 1140 1043 170D +GeForce 820M 1140 1043 176D +GeForce 820M 1140 1043 178D +GeForce 820M 1140 1043 179D +GeForce GT 620M 1140 1043 2132 +GeForce GT 720M 1140 1043 21BA +GeForce GT 720M 1140 1043 21FA +GeForce GT 720M 1140 1043 220A +GeForce GT 720M 1140 1043 221A +GeForce GT 710M 1140 1043 223A +GeForce GT 710M 1140 1043 224A +GeForce 820M 1140 1043 227A +GeForce 820M 1140 1043 228A +GeForce 820M 1140 1043 22FA +GeForce 820M 1140 1043 232A +GeForce 820M 1140 1043 233A +GeForce 820M 1140 1043 235A +GeForce 820M 1140 1043 236A +GeForce 820M 1140 1043 238A +GeForce GT 720M 1140 1043 8595 +GeForce GT 720M 1140 1043 85EA +GeForce 820M 1140 1043 85EB +GeForce 820M 1140 1043 85EC +GeForce GT 720M 1140 1043 85EE +GeForce 820M 1140 1043 85F3 +GeForce 820M 1140 1043 860E +GeForce 820M 1140 1043 861A +GeForce 820M 1140 1043 861B +GeForce 820M 1140 1043 8628 +GeForce 820M 1140 1043 8643 +GeForce 820M 1140 1043 864C +GeForce 820M 1140 1043 8652 +GeForce 820M 1140 1043 8660 +GeForce 820M 1140 1043 8661 +GeForce GT 720M 1140 105B 0DAC +GeForce GT 720M 1140 105B 0DAD +GeForce GT 720M 1140 105B 0EF3 +GeForce GT 720M 1140 10CF 17F5 +GeForce 710M 1140 1179 FA01 +GeForce 710M 1140 1179 FA02 +GeForce 710M 1140 1179 FA03 +GeForce 710M 1140 1179 FA05 +GeForce 710M 1140 1179 FA11 +GeForce 710M 1140 1179 FA13 +GeForce 710M 1140 1179 FA18 +GeForce 710M 1140 1179 FA19 +GeForce 710M 1140 1179 FA21 +GeForce 710M 1140 1179 FA23 +GeForce 710M 1140 1179 FA2A +GeForce 710M 1140 1179 FA32 +GeForce 710M 1140 1179 FA33 +GeForce 710M 1140 1179 FA36 +GeForce 710M 1140 1179 FA38 +GeForce 710M 1140 1179 FA42 +GeForce 710M 1140 1179 FA43 +GeForce 710M 1140 1179 FA45 +GeForce 710M 1140 1179 FA47 +GeForce 710M 1140 1179 FA49 +GeForce 710M 1140 1179 FA58 +GeForce 710M 1140 1179 FA59 +GeForce 710M 1140 1179 FA88 +GeForce 710M 1140 1179 FA89 +GeForce GT 620M 1140 144D B092 +GeForce GT 630M 1140 144D C0D5 +GeForce GT 620M 1140 144D C0D7 +GeForce 820M 1140 144D C10D +GeForce GT 620M 1140 144D C652 +GeForce 710M 1140 144D C709 +GeForce 710M 1140 144D C711 +GeForce 710M 1140 144D C736 +GeForce 710M 1140 144D C737 +GeForce 820M 1140 144D C745 +GeForce 820M 1140 144D C750 +GeForce GT 710M 1140 1462 10B8 +GeForce GT 720M 1140 1462 10E9 +GeForce 820M 1140 1462 1116 +GeForce 720M 1140 1462 AA33 +GeForce GT 720M 1140 1462 AAA2 +GeForce 820M 1140 1462 AAA3 +GeForce GT 720M 1140 1462 ACB2 +GeForce GT 720M 1140 1462 ACC1 +GeForce 720M 1140 1462 AE61 +GeForce GT 720M 1140 1462 AE65 +GeForce 820M 1140 1462 AE6A +GeForce GT 720M 1140 1462 AE71 +GeForce 820M 1140 14C0 0083 +GeForce 620M 1140 152D 0926 +GeForce GT 630M 1140 152D 0982 +GeForce GT 630M 1140 152D 0983 +GeForce GT 820M 1140 152D 1005 +GeForce 710M 1140 152D 1012 +GeForce 820M 1140 152D 1019 +GeForce GT 630M 1140 152D 1030 +GeForce 710M 1140 152D 1055 +GeForce GT 720M 1140 152D 1067 +GeForce 820M 1140 152D 1092 +GeForce GT 720M 1140 17AA 2213 +GeForce GT 720M 1140 17AA 2220 +GeForce GT 720A 1140 17AA 309C +GeForce 820A 1140 17AA 30B4 +GeForce 720A 1140 17AA 30B7 +GeForce 820A 1140 17AA 30E4 +GeForce 820A 1140 17AA 361B +GeForce 820A 1140 17AA 361C +GeForce 820A 1140 17AA 361D +GeForce GT 620M 1140 17AA 3656 +GeForce 705M 1140 17AA 365A +GeForce 800M 1140 17AA 365E +GeForce 820A 1140 17AA 3661 +GeForce 800M 1140 17AA 366C +GeForce 800M 1140 17AA 3685 +GeForce 800M 1140 17AA 3686 +GeForce 705A 1140 17AA 3687 +GeForce 820A 1140 17AA 3696 +GeForce 820A 1140 17AA 369B +GeForce 820A 1140 17AA 369C +GeForce 820A 1140 17AA 369D +GeForce 820A 1140 17AA 369E +GeForce 820A 1140 17AA 36A6 +GeForce 820A 1140 17AA 36A7 +GeForce 820A 1140 17AA 36A9 +GeForce 820A 1140 17AA 36AF +GeForce 820A 1140 17AA 36B0 +GeForce 820A 1140 17AA 36B6 +GeForce GT 720M 1140 17AA 3800 +GeForce GT 720M 1140 17AA 3801 +GeForce GT 720M 1140 17AA 3802 +GeForce GT 720M 1140 17AA 3803 +GeForce GT 720M 1140 17AA 3804 +GeForce GT 720M 1140 17AA 3806 +GeForce GT 720M 1140 17AA 3808 +GeForce GT 820M 1140 17AA 380D +GeForce GT 820M 1140 17AA 380E +GeForce GT 820M 1140 17AA 380F +GeForce GT 820M 1140 17AA 3811 +GeForce 820M 1140 17AA 3812 +GeForce 820M 1140 17AA 3813 +GeForce 820M 1140 17AA 3816 +GeForce 820M 1140 17AA 3817 +GeForce 820M 1140 17AA 3818 +GeForce 820M 1140 17AA 381A +GeForce 820M 1140 17AA 381C +GeForce 820M 1140 17AA 381D +GeForce 610M 1140 17AA 3901 +GeForce 710M 1140 17AA 3902 +GeForce 710M 1140 17AA 3903 +GeForce GT 625M 1140 17AA 3904 +GeForce GT 720M 1140 17AA 3905 +GeForce 820M 1140 17AA 3907 +GeForce GT 720M 1140 17AA 3910 +GeForce GT 720M 1140 17AA 3912 +GeForce 820M 1140 17AA 3913 +GeForce 820M 1140 17AA 3915 +GeForce 610M 1140 17AA 3983 +GeForce 610M 1140 17AA 5001 +GeForce GT 720M 1140 17AA 5003 +GeForce 705M 1140 17AA 5005 +GeForce GT 620M 1140 17AA 500D +GeForce 710M 1140 17AA 5014 +GeForce 710M 1140 17AA 5017 +GeForce 710M 1140 17AA 5019 +GeForce 710M 1140 17AA 501A +GeForce GT 720M 1140 17AA 501F +GeForce 710M 1140 17AA 5025 +GeForce 710M 1140 17AA 5027 +GeForce 710M 1140 17AA 502A +GeForce GT 720M 1140 17AA 502B +GeForce 710M 1140 17AA 502D +GeForce GT 720M 1140 17AA 502E +GeForce GT 720M 1140 17AA 502F +GeForce 705M 1140 17AA 5030 +GeForce 705M 1140 17AA 5031 +GeForce 820M 1140 17AA 5032 +GeForce 820M 1140 17AA 5033 +GeForce 710M 1140 17AA 503E +GeForce 820M 1140 17AA 503F +GeForce 820M 1140 17AA 5040 +GeForce 710M 1140 1854 0177 +GeForce 710M 1140 1854 0180 +GeForce GT 720M 1140 1854 0190 +GeForce GT 720M 1140 1854 0192 +GeForce 820M 1140 1854 0224 +GeForce 820M 1140 1B0A 01C0 +GeForce GT 620M 1140 1B0A 20DD +GeForce GT 620M 1140 1B0A 20DF +GeForce 820M 1140 1B0A 210E +GeForce GT 720M 1140 1B0A 2202 +GeForce 820M 1140 1B0A 90D7 +GeForce 820M 1140 1B0A 90DD +GeForce 820M 1140 1B50 5530 +GeForce GT 720M 1140 1B6C 5031 +GeForce 820M 1140 1BAB 0106 +GeForce 810M 1140 1D05 1013 +GeForce GTX 680 1180 +GeForce GTX 660 Ti 1183 +GeForce GTX 770 1184 +GeForce GTX 660 1185 +GeForce GTX 760 1185 10DE 106F +GeForce GTX 760 1187 +GeForce GTX 690 1188 +GeForce GTX 670 1189 +GeForce GTX 760 Ti OEM 1189 10DE 1074 +GeForce GTX 760 (192-bit) 118E +GeForce GTX 760 Ti OEM 1193 +GeForce GTX 660 1195 +GeForce GTX 880M 1198 +GeForce GTX 870M 1199 +GeForce GTX 760 1199 1458 D001 +GeForce GTX 860M 119A +GeForce GTX 775M 119D +GeForce GTX 780M 119E +GeForce GTX 780M 119F +GeForce GTX 680M 11A0 +GeForce GTX 670MX 11A1 +GeForce GTX 675MX 11A2 +GeForce GTX 680MX 11A3 +GeForce GTX 675MX 11A7 +GeForce GTX 660 11C0 +GeForce GTX 650 Ti BOOST 11C2 +GeForce GTX 650 Ti 11C3 +GeForce GTX 645 11C4 +GeForce GT 740 11C5 +GeForce GTX 650 Ti 11C6 +GeForce GTX 650 11C8 +GeForce GT 740 11CB +GeForce GTX 770M 11E0 +GeForce GTX 765M 11E1 +GeForce GTX 765M 11E2 +GeForce GTX 760M 11E3 +GeForce GTX 760A 11E3 17AA 3683 +GeForce GTX 560 Ti 1200 +GeForce GTX 560 1201 +GeForce GTX 460 SE v2 1203 +GeForce GTX 460 v2 1205 +GeForce GTX 555 1206 +GeForce GT 645 1207 +GeForce GTX 560 SE 1208 +GeForce GTX 570M 1210 +GeForce GTX 580M 1211 +GeForce GTX 675M 1212 +GeForce GTX 670M 1213 +GeForce GT 545 1241 +GeForce GT 545 1243 +GeForce GTX 550 Ti 1244 +GeForce GTS 450 1245 +GeForce GT 550M 1246 +GeForce GT 555M 1247 +GeForce GT 635M 1247 1043 212A +GeForce GT 635M 1247 1043 212B +GeForce GT 635M 1247 1043 212C +GeForce GT 555M 1248 +GeForce GTS 450 1249 +GeForce GT 640 124B +GeForce GT 555M 124D +GeForce GT 635M 124D 1462 10CC +GeForce GTX 560M 1251 +GeForce GT 635 1280 +GeForce GT 710 1281 +GeForce GT 640 1282 +GeForce GT 630 1284 +GeForce GT 720 1286 +GeForce GT 730 1287 +GeForce GT 720 1288 +GeForce GT 710 1289 +GeForce GT 710 128B +GeForce GT 730M 1290 +GeForce 730A 1290 103C 2AFA +GeForce GT 735M 1291 +GeForce GT 740M 1292 +GeForce GT 740A 1292 17AA 3675 +GeForce GT 740A 1292 17AA 367C +GeForce GT 740A 1292 17AA 3684 +GeForce GT 730M 1293 +GeForce 710M 1295 +GeForce 710A 1295 103C 2B0D +GeForce 710A 1295 103C 2B0F +GeForce 810A 1295 103C 2B20 +GeForce 810A 1295 103C 2B21 +GeForce 805A 1295 17AA 367A +GeForce 710A 1295 17AA 367C +GeForce 825M 1296 +GeForce GT 720M 1298 +GeForce 920M 1299 +GeForce 920A 1299 17AA 30BB +GeForce 920A 1299 17AA 30DA +GeForce 920A 1299 17AA 30DC +GeForce 920A 1299 17AA 30DD +GeForce 920A 1299 17AA 30DF +GeForce 920A 1299 17AA 3117 +GeForce 920A 1299 17AA 361B +GeForce 920A 1299 17AA 362D +GeForce 920A 1299 17AA 362E +GeForce 920A 1299 17AA 3630 +GeForce 920A 1299 17AA 3637 +GeForce 920A 1299 17AA 369B +GeForce 920A 1299 17AA 36A7 +GeForce 920A 1299 17AA 36AF +GeForce 920A 1299 17AA 36F0 +GeForce GT 730 1299 1B0A 01C6 +GeForce 910M 129A +GeForce 830M 1340 +GeForce 830A 1340 103C 2B2B +GeForce 840M 1341 +GeForce 840A 1341 17AA 3697 +GeForce 840A 1341 17AA 3699 +GeForce 840A 1341 17AA 369C +GeForce 840A 1341 17AA 36AF +GeForce 845M 1344 +GeForce 930M 1346 +GeForce 930A 1346 17AA 30BA +GeForce 930A 1346 17AA 362C +GeForce 930A 1346 17AA 362F +GeForce 930A 1346 17AA 3636 +GeForce 940M 1347 +GeForce 940A 1347 17AA 36B9 +GeForce 940A 1347 17AA 36BA +GeForce 945M 1348 +GeForce 945A 1348 103C 2B5C +GeForce 930M 1349 +GeForce 930A 1349 17AA 3124 +GeForce 930A 1349 17AA 364B +GeForce 930A 1349 17AA 36C3 +GeForce 930A 1349 17AA 36D1 +GeForce 930A 1349 17AA 36D8 +GeForce 940MX 134B +GeForce GPU 134B 1414 0008 +GeForce 940MX 134D +GeForce 930MX 134E +GeForce 920MX 134F +GeForce 940A 137D 17AA 3699 +GeForce GTX 750 Ti 1380 +GeForce GTX 750 1381 +GeForce GTX 745 1382 +GeForce 845M 1390 +GeForce GTX 850M 1391 +GeForce GTX 850A 1391 17AA 3697 +GeForce GTX 860M 1392 +GeForce GPU 1392 1028 066A +GeForce GTX 750 Ti 1392 1043 861E +GeForce GTX 750 Ti 1392 1043 86D9 +GeForce 840M 1393 +GeForce 845M 1398 +GeForce 945M 1399 +GeForce GTX 950M 139A +GeForce GTX 950A 139A 17AA 362C +GeForce GTX 950A 139A 17AA 362F +GeForce GTX 950A 139A 17AA 363F +GeForce GTX 950A 139A 17AA 3640 +GeForce GTX 950A 139A 17AA 3647 +GeForce GTX 950A 139A 17AA 36B9 +GeForce GTX 960M 139B +GeForce GTX 750 Ti 139B 1025 107A +GeForce GTX 860M 139B 1028 06A3 +GeForce GTX 960A 139B 103C 2B4C +GeForce GTX 750Ti 139B 17AA 3649 +GeForce GTX 960A 139B 17AA 36BF +GeForce GTX 750 Ti 139B 19DA C248 +GeForce GTX 750Ti 139B 1AFA 8A75 +GeForce 940M 139C +GeForce GTX 750 Ti 139D +GeForce GTX 980 13C0 +GeForce GTX 970 13C2 +GeForce GTX 980M 13D7 +GeForce GTX 970M 13D8 +GeForce GTX 960 13D8 1462 1198 +GeForce GTX 960 13D8 1462 1199 +GeForce GTX 960 13D8 19DA B282 +GeForce GTX 960 13D8 19DA B284 +GeForce GTX 960 13D8 19DA B286 +GeForce GTX 965M 13D9 +GeForce GTX 980 13DA +GeForce GTX 960 1401 F +GeForce GTX 950 1402 F +GeForce GTX 960 1406 F +GeForce GTX 750 1407 +GeForce GTX 965M 1427 +GeForce GTX 950 1427 1458 D003 F +GeForce GTX 980M 1617 +GeForce GTX 970M 1618 +GeForce GTX 965M 1619 +GeForce GTX 980 161A +GeForce GTX 965M 1667 +GeForce MX130 174D +GeForce MX110 174E +GeForce 940MX 179C +GeForce GTX TITAN X 17C2 +GeForce GTX 980 Ti 17C8 +TITAN X (Pascal) 1B00 +TITAN Xp 1B02 +TITAN Xp COLLECTORS EDITION 1B02 10DE 123E +TITAN Xp COLLECTORS EDITION 1B02 10DE 123F +GeForce GTX 1080 Ti 1B06 +GeForce GTX 1080 1B80 +GeForce GTX 1070 1B81 +GeForce GTX 1070 Ti 1B82 +GeForce GTX 1060 3GB 1B84 +P104-100 1B87 +GeForce GTX 1080 1BA0 +GeForce GTX 1070 1BA1 +GeForce GTX 1070 with MaxQ Design 1BA1 1458 1651 +GeForce GTX 1070 with Max-Q Design 1BA1 1462 11E8 +GeForce GTX 1070 with Max-Q Design 1BA1 1462 11E9 +GeForce GTX 1070 with Max-Q Design 1BA1 1558 9501 +GeForce GTX 1070 with Max-Q Design 1BA1 1D05 1032 +P104-101 1BC7 +GeForce GTX 1080 1BE0 +GeForce GTX 1080 with Max-Q Design 1BE0 1025 1221 +GeForce GTX 1080 with Max-Q Design 1BE0 1025 123E +GeForce GTX 1080 with Max-Q Design 1BE0 1028 07C0 +GeForce GTX 1080 with Max-Q Design 1BE0 1043 1BF0 +GeForce GTX 1080 with Max-Q Design 1BE0 1458 355B +GeForce GTX 1070 1BE1 +GeForce GTX 1070 with Max-Q Design 1BE1 1043 16F0 +GeForce GTX 1060 3GB 1C02 +GeForce GTX 1060 6GB 1C03 +GeForce GTX 1060 5GB 1C04 +GeForce GTX 1060 6GB 1C06 +P106-100 1C07 +P106-090 1C09 +GeForce GTX 1060 1C20 +GeForce GTX 1060 with Max-Q Design 1C20 1028 0802 +GeForce GTX 1060 with Max-Q Design 1C20 1028 0803 +GeForce GTX 1060 with Max-Q Design 1C20 17AA 39B9 +GeForce GTX 1050 Ti 1C21 +GeForce GTX 1050 1C22 +GeForce GTX 1060 1C60 +GeForce GTX 1060 with Max-Q Design 1C60 103C 8390 +GeForce GTX 1050 Ti 1C61 +GeForce GTX 1050 1C62 +GeForce GTX 1050 1C81 +GeForce GTX 1050 Ti 1C82 +GeForce GTX 1050 Ti 1C8C +GeForce GTX 1050 Ti with Max-Q Design 1C8C 17AA 39FF +GeForce GTX 1050 1C8D +GeForce GT 1030 1D01 +GeForce MX150 1D10 +GeForce MX150 1D12 +Quadro 6000 06D8 +Quadro 5000 06D9 +Quadro 5000M 06DA +Quadro 6000 06DC +Quadro 4000 06DD +Quadro 2000 0DD8 +Quadro 2000D 0DD8 10DE 0914 +Quadro 2000M 0DDA +Quadro 600 0DF8 +Quadro 500M 0DF9 +Quadro 1000M 0DFA +Quadro 3000M 0E3A +Quadro 4000M 0E3B +Quadro K420 0FF3 +Quadro K1100M 0FF6 +Quadro K500M 0FF8 +Quadro K2000D 0FF9 +Quadro K600 0FFA +Quadro K2000M 0FFB +Quadro K1000M 0FFC +Quadro K2000 0FFE +Quadro 410 0FFF +Quadro K6000 103A +Quadro K5200 103C +Quadro 5010M 109A +Quadro 7000 109B +Quadro K4200 11B4 +Quadro K3100M 11B6 +Quadro K4100M 11B7 +Quadro K5100M 11B8 +Quadro K5000 11BA +Quadro K5000M 11BC +Quadro K4000M 11BD +Quadro K3000M 11BE +Quadro K4000 11FA +Quadro K2100M 11FC +Quadro K610M 12B9 +Quadro K510M 12BA +Quadro K620M 137A 17AA 2225 +Quadro M500M 137A 17AA 2232 +Quadro M500M 137A 17AA 505A +Quadro M520 137B +Quadro M2000M 13B0 +Quadro M1000M 13B1 +Quadro M600M 13B2 +Quadro K2200M 13B3 +Quadro M620 13B4 +Quadro M1200 13B6 +Quadro K2200 13BA +Quadro K620 13BB +Quadro K1200 13BC +Quadro M5000 13F0 +Quadro M4000 13F1 +Quadro M5000M 13F8 +Quadro M5000 SE 13F8 10DE 11DD +Quadro M4000M 13F9 +Quadro M3000M 13FA +Quadro M3000 SE 13FA 10DE 11C9 +Quadro M5500 13FB +Quadro M2000 1430 F +Quadro GP100 15F0 G +Quadro M6000 17F0 +Quadro M6000 24GB 17F1 +Quadro P6000 1B30 +Quadro P5000 1BB0 +Quadro P4000 1BB1 +Quadro P5200 1BB5 +Quadro P5000 1BB6 +Quadro P4000 1BB7 +Quadro P4000 with Max-Q Design 1BB7 1462 11E9 +Quadro P4000 with Max-Q Design 1BB7 1558 9501 +Quadro P3000 1BB8 +Quadro P2000 1C30 +Quadro P1000 1CB1 +Quadro P600 1CB2 +Quadro P400 1CB3 +Quadro P620 1CB6 +Quadro P500 1D33 +NVS 5400M 0DEF +NVS 5200M 0DFC +NVS 510 0FFD +NVS 4200M 1056 +NVS 4200M 1057 +NVS 315 107C +NVS 310 107D +NVS 5200M 1140 1043 10DD +NVS 5200M 1140 1043 10ED +NVS 5200M 1140 1043 2136 +NVS 5200M 1140 144D C0E2 +NVS 5200M 1140 144D C0E3 +NVS 5200M 1140 144D C0E4 +NVS 5200M 1140 17AA 2200 +NVS 810 13B9 +Tesla C2050 / C2070 06D1 +Tesla C2050 06D1 10DE 0771 +Tesla C2070 06D1 10DE 0772 +Tesla M2070 06D2 +Tesla X2070 06D2 10DE 088F +Tesla T20 Processor 06DE +Tesla S2050 06DE 10DE 0773 +Tesla M2050 06DE 10DE 082F +Tesla X2070 06DE 10DE 0840 +Tesla M2050 06DE 10DE 0842 +Tesla M2050 06DE 10DE 0846 +Tesla M2050 06DE 10DE 0866 +Tesla M2050 06DE 10DE 0907 +Tesla M2050 06DE 10DE 091E +Tesla M2070-Q 06DF +Tesla K20Xm 1021 +Tesla K20c 1022 +Tesla K40m 1023 +Tesla K40c 1024 +Tesla K20s 1026 +Tesla K40st 1027 +Tesla K20m 1028 +Tesla K40s 1029 +Tesla K40t 102A +Tesla K80 102D +Tesla M2090 1091 +Tesla X2090 1091 10DE 088E +Tesla X2090 1091 10DE 0891 +Tesla X2090 1091 10DE 0974 +Tesla X2090 1091 10DE 098D +Tesla M2075 1094 +Tesla C2075 1096 +Tesla C2050 1096 10DE 0911 +Tesla K10 118F +Tesla K8 1194 +Tesla M60 13F2 +Tesla M6 13F3 +Tesla M4 1431 F +Quadro M2200 1436 F +Tesla P100-PCIE-12GB 15F7 G +Tesla P100-PCIE-16GB 15F8 G +Tesla P100-SXM2-16GB 15F9 G +Tesla M40 17FD +Tesla M40 24GB 17FD 10DE 1173 +Tesla P40 1B38 +Tesla P4 1BB3 +Tesla P6 1BB4 +GRID K520 118A diff --git a/etc/reserved_usernames b/etc/reserved_usernames new file mode 100644 index 0000000..ce55d7c --- /dev/null +++ b/etc/reserved_usernames @@ -0,0 +1,121 @@ +# List of reserved usernames used to avoid any conflict when creating a user. +# https://salsa.debian.org/installer-team/user-setup/raw/master/reserved-usernames + +# Static users from base-passwd/passwd.master (3.5.41). +root +daemon +bin +sys +sync +games +man +lp +mail +news +uucp +proxy +www-data +backup +list +irc +gnats +nobody + +# Other static groups from base-passwd/group.master (3.5.41). +adm +tty +disk +kmem +dialout +fax +voice +cdrom +floppy +tape +sudo +audio +dip +operator +src +shadow +utmp +video +sasl +plugdev +staff +users +nogroup + +# Reserved usernames listed in base-passwd/README (3.5.41). +netplan +ftn +mysql +tac-plus +alias +qmail +qmaild +qmails +qmailr +qmailq +qmaill +qmailp +asterisk +vpopmail +vchkpw +slurm +hacluster +haclient +grsec-tpe +grsec-sock-all +grsec-sock-clt +grsec-sock-srv +grsec-proc +ceph +opensrf +libvirt-qemu + +# Ubuntu creates the admin group and adds the first user to it in order to +# grant them sudo privileges. +admin + +# Other miscellaneous system users/groups created by common packages. While +# it's useful to add things here that people might run into, it's not +# absolutely critical; the worst that will happen is that the installation +# will fail at some later point. +Debian-exim +bind +crontab +cupsys +dcc +dhcp +dictd +dnsmasq +dovecot +fetchmail +firebird +ftp +fuse +gdm +haldaemon +hplilp +identd +jwhois +klog +lpadmin +messagebus +mythtv +netdev +powerdev +radvd +saned +sbuild +scanner +slocate +ssh +sshd +ssl-cert +sslwrap +statd +syslog +telnetd +tftpd diff --git a/etc/setup.conf b/etc/setup.conf new file mode 100644 index 0000000..9ac5a08 --- /dev/null +++ b/etc/setup.conf @@ -0,0 +1,32 @@ +#!/bin/bash +# arch-setup configuration file. It defines variables used by the installer. + +# Essential packages +BASE_PACKAGES=('base' 'parch-branding' 'parch-pacman' 'neofetch-git' 'parch-emoji-ios' 'vazirmatn-fonts' 'base-devel' 'iwd' 'linux' 'linux-firmware' 'grub' 'networkmanager') +BASE_ESSENTIALS=('man-db' 'man-pages' 'texinfo' 'nano') +# Packages that will be installed whenever a GUI is installed +DESKTOP_DEFAULTS=('gvfs' 'pavucontrol' 'pulseaudio' 'pulseaudio-alsa' 'ttf-dejavu' 'xdg-user-dirs' 'xf86-input-libinput' 'xorg-apps' 'xorg-server' 'xterm') +UEFI=false +bluetooth=false +installed=false +mounted=false + +# LVM naming +LVM_GROUP="arch_vg" +LVM_ROOT="root" +LVM_SWAP="swap" +CRYPT_DEVICE_NAME="cryptlvm" + +# System info +architecture=$(lscpu | grep 'Architecture' | awk '{print $2}') +hypervisor=$(systemd-detect-virt) + +# Check for UEFI +if [ -d /sys/firmware/efi ]; then + UEFI=true +fi + +# Check for bluetooth support +if dmesg | grep -iq "blue"; then + bluetooth=true +fi diff --git a/setup b/setup new file mode 100755 index 0000000..fd99225 --- /dev/null +++ b/setup @@ -0,0 +1,1206 @@ +#!/bin/bash + +# Load the configuration file +init() { + DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + source "$DIR"/etc/setup.conf + clear ; setfont Lat2-Terminus16.psfu.gz + dialog --title "Welcome to Parch Linux Installer" \ + --ok-label "Begin Installation" --msgbox "Navigating the installer is \ +easy.\nYou may select options using the ARROW keys and SPACE or \ +ENTER.\nAlternate keys may also be used: '+', '-', and TAB." 7 70 +} + +# Proceed with installation only if there is an internet connection +check_connection() { + dialog --infobox "Checking internet connection..." 3 50 + # Check if a web page is available + if ! nc -zw1 archlinux.org 443; then + dialog --title "Connect to the Internet" \ + --msgbox "The installer was unable to detect a working internet \ +connection. The installation media supports wired network devices on \ +boot. Make sure the cable is plugged in. Wireless users should use the \ +'iwctl' command to connect to a wireless connection.\n\nOnce you have \ +a working internet connection, retry running the installer." 10 80 + reset ; exit 1 + fi +} + +# Check and disable any active mountpoints +check_mountpoints() { + if mountpoint -q /mnt; then + dialog --infobox "Unmounting active mountpoints on $DISK..." 3 50 + umount -R /mnt + fi + + if free | awk '/^Swap:/ {exit !$2}'; then + swapoff -a + fi +} + +# Check for LVM on the system to avoid conflicts +check_lvm_status() { + # Check for an existing volume group on the selected disk + if vgs --noheading --nosuffix -o pv_name | grep -q "$DISK"; then + vg_on_pv=$(pvs -o pv_name,vg_name | grep "$DISK" | awk '{print $2}') + dialog --title "WARNING: LVM Exists on $DISK" \ + --yesno "A volume group ($vg_on_pv) was detected on the selected disk \ +($DISK).\n\nIn order to proceed, the volume group ($vg_on_pv) needs to be \ +removed and all data will be lost!\n\nAre you sure you want to remove the \ +volume group '$vg_on_pv'?" 11 75 + if [ $? -eq 0 ]; then + dialog --infobox "Removing $vg_on_pv from $DISK..." 3 50 + vgchange -y -an "$vg_on_pv" &> /dev/null + vgremove -y "$vg_on_pv" &> /dev/null + else + dialog --title "ERROR: Unable to Partition $DISK" \ + --msgbox "The installer can't proceed while LVM is active on \ +$DISK.\n\nIf you have any active LVM devices, please make sure they are not in \ +use and backup any data on the volume group before running the installer." 8 80 + reset ; exit 1 + fi + fi + + # Check for a volume group with the same name on the system when creating LVM + if [ "$PARTITION_LAYOUT" != "Basic" ]; then + if vgs "$LVM_GROUP" &> /dev/null; then + dialog --title "WARNING: LVM Volume Group Exists" \ + --yesno "A volume group with the name '$LVM_GROUP' already exists on \ +your system.\n\nIn order to proceed, the volume group ($LVM_GROUP) needs to be \ +overwritten and all data will be lost!\n\nAre you sure you want to overwrite \ +the volume group '$LVM_GROUP'?" 11 80 + if [ $? -eq 0 ]; then + dialog --infobox "Removing $LVM_GROUP from $DISK..." 3 50 + vgchange -y -an "$LVM_GROUP" &> /dev/null + vgremove -y "$LVM_GROUP" &> /dev/null + else + dialog --title "ERROR: Unable to Partition $DISK" \ + --msgbox "The installer can't partition the disk because a volume \ +group with the name '$LVM_GROUP' already exists on your system.\n\nIf you have \ +any active LVM devices, please make sure they are not in use and backup any \ +data on the volume group before running the installer." 9 80 + reset ; exit 1 + fi + fi + fi +} + +# Prompt the user to set their keyboard layout +set_keymap() { + while true; do + KEYMAP=$(dialog --title "Set the Keyboard Layout" --nocancel \ + --default-item "us" --menu "Select a keymap that corresponds to your \ +keyboard layout. Choose 'other' if your keymap is not listed. If you are \ +unsure, the default is 'us' (United States/QWERTY).\n\nKeymap:" 22 57 10 \ +"fr" "French" \ +"de" "German" \ +"gr" "Greek" \ +"hu" "Hungarian" \ +"it" "Italian" \ +"pl" "Polish" \ +"ru" "Russian" \ +"es" "Spanish" \ +"us" "United States" \ +"other" "View all available keymaps" 3>&1 1>&2 2>&3) + + if [ "$KEYMAP" = "other" ]; then + keymaps=() + for map in $(localectl list-keymaps); do + keymaps+=("$map" "") + done + KEYMAP=$(dialog --title "Set the Keyboard Layout" --cancel-label "Back" \ + --menu "Select a keymap that corresponds to your keyboard layout. The \ +default is 'us' (United States/QWERTY)." 30 60 25 \ +"${keymaps[@]}" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + break + fi + else + break + fi + done + dialog --infobox "Setting keymap to $KEYMAP..." 3 50 + localectl set-keymap "$KEYMAP" + loadkeys "$KEYMAP" +} + +# Prompt the user to set the system locale +set_locale() { + while true; do + LOCALE=$(dialog --title "Set the System Locale" --nocancel \ + --default-item "en_US.UTF-8" --menu "Select a locale that corresponds \ +to your language and region. The locale you select will define the language \ +used by the system and other region specific information. Choose 'other' if \ +your language and/or region is not listed. If you are unsure, the default is \ +'en_US.UTF-8'.\n\nLocale:" 30 65 16 \ +"zh_CN.UTF-8" "Chinese (Simplified)" \ +"en_AU.UTF-8" "English (Australia)" \ +"en_CA.UTF-8" "English (Canada)" \ +"en_US.UTF-8" "English (United States)" \ +"en_GB.UTF-8" "English (Great Britain)" \ +"fr_FR.UTF-8" "French (France)" \ +"de_DE.UTF-8" "German (Germany)" \ +"it_IT.UTF-8" "Italian (Italy)" \ +"ja_JP.UTF-8" "Japanese (Japan)" \ +"pt_BR.UTF-8" "Portuguese (Brazil)" \ +"pt_PT.UTF-8" "Portuguese (Portugal)" \ +"ru_RU.UTF-8" "Russian (Russia)" \ +"es_MX.UTF-8" "Spanish (Mexico)" \ +"es_ES.UTF-8" "Spanish (Spain)" \ +"sv_SE.UTF-8" "Swedish (Sweden)" \ +"other" "View all available locales" 3>&1 1>&2 2>&3) + + if [ "$LOCALE" = "other" ]; then + locales=() + # Read each entry in /etc/locale.gen and remove comments and spaces + while read -r line; do + locales+=("$line" "") + done < <(grep -E "^#?[a-z].*UTF-8" /etc/locale.gen | sed -e 's/#//' -e 's/\s.*$//') + LOCALE=$(dialog --title "Set the System Locale" --cancel-label "Back" \ + --menu "Select a locale that corresponds to your language and region. \ +The locale you select will define the language used by the system and other +region specific information. If you are unsure, the default is \ +'en_US.UTF-8'.\n\nLocale:" 30 65 16 \ +"${locales[@]}" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + break + fi + else + break + fi + done +} + +# Prompt the user to set the system time zone +set_timezone() { + utc_enabled=true + regions=() + for region in \ + $(find /usr/share/zoneinfo -mindepth 1 -maxdepth 1 -type d -printf '%f\n' \ + | grep -E -v '/$|posix|right' \ + | sort); do + regions+=("$region" "") + done + regions+=("other" "") + + while true; do + ZONE=$(dialog --title "Set the Time Zone" --nocancel \ + --menu "Select your time zone.\nIf your region is not listed, select \ +'other'.\n\nTime zone:" 27 50 17 \ +"${regions[@]}" 3>&1 1>&2 2>&3) + + if [ "$ZONE" != "other" ]; then + zone_regions=() + for zone_region in \ + $(find /usr/share/zoneinfo/"${ZONE}" -mindepth 1 -maxdepth 1 -printf '%f\n' \ + | sort); do + zone_regions+=("$zone_region" "") + done + SUBZONE=$(dialog --title "Set the Time Zone" --cancel-label "Back" \ + --menu "Select your time zone.\n\nTime zone:" 27 50 17 \ +"${zone_regions[@]}" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + if [ -d /usr/share/zoneinfo/"${ZONE}/${SUBZONE}" ]; then + subzone_regions=() + for subzone_region in \ + $(find /usr/share/zoneinfo/"${ZONE}/${SUBZONE}" -mindepth 1 -maxdepth 1 -printf '%f\n' \ + | sort); do + subzone_regions+=("$subzone_region" "") + done + SUBZONE_SUBREGION=$(dialog --title "Set the Time Zone" \ + --cancel-label "Back" \ + --menu "Select your time zone.\n\nTime zone:" 27 50 17 \ +"${subzone_regions[@]}" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + ZONE="${ZONE}/${SUBZONE}/${SUBZONE_SUBREGION}" + break + fi + else + ZONE="${ZONE}/${SUBZONE}" + break + fi + fi + else + for other_region in \ + $(find /usr/share/zoneinfo -mindepth 1 -maxdepth 1 -type f -printf '%f\n' \ + | grep -E -v '/$|iso3166.tab|leapseconds|posixrules|tzdata.zi|zone.tab|zone1970.tab' \ + | sort); do + other_regions+=("$other_region" "") + done + ZONE=$(dialog --title "Set the Time Zone" --cancel-label "Back" \ + --menu "Select your time zone.\n\nTime zone:" 27 50 17 \ +"${other_regions[@]}" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + ZONE="${ZONE}" + break + fi + fi + done + + dialog --title "Set the Hardware Clock" --nocancel \ + --yesno "Would you like to set the hardware clock from the system \ +clock using UTC time?\nIf you select no, local time will be used \ +instead.\n\nIf you are unsure, UTC time is the default." 8 85 + if [ $? -ne 0 ]; then + utc_enabled=false + fi +} + +# Prompt the user to set the system hostname +set_hostname() { + while true; do + HOST_NAME=$(dialog --title "Set the Hostname" --nocancel \ + --inputbox "Please enter the hostname for this system.\n\nThe hostname \ +is a single word that identifies your system to the network.\n\nHostname:" \ +12 80 "Parch" 3>&1 1>&2 2>&3) + + # Hostname must be alpha-numeric and may contain a dash only in between + if printf "%s" "$HOST_NAME" | grep -Eoq "^[a-zA-Z0-9-]{1,63}$" \ + && [ "${HOST_NAME:0:1}" != "-" ] \ + && [ "${HOST_NAME: -1}" != "-" ]; then + break + else + dialog --title "ERROR: Invalid Hostname Format" \ + --msgbox "You entered an invalid hostname.\n\nA valid hostname may \ +contain only the numbers 0-9, upper and lowercase letters (A-Z and a-z), and \ +the minus sign. It must be at most 63 characters long, and may not begin \ +or end with a minus sign." 9 75 + fi + done +} + +# Prompt the user to create a password for the superuser account +set_root_passwd(){ + inputs_match=false + while ! $inputs_match; do + input=$(dialog --title "Set the Root Password" --clear --stdout --nocancel \ + --insecure --passwordbox "Please enter a password for 'root', the \ +system administrative account.\n\nRoot password:" 10 75) + confirm_input=$(dialog --title "Set the Root Password" --clear --stdout \ + --insecure --passwordbox "Re-enter password to verify:" 8 55) + + if [ -z "$input" ]; then + dialog --title "ERROR: Empty Password" \ + --msgbox "You are not allowed to have an empty password." 5 55 + elif [ "$input" != "$confirm_input" ]; then + dialog --title "ERROR: Passwords Do No Match" \ + --msgbox "The two passwords you entered did not match." 5 55 + else + root_passwd="$input" + inputs_match=true + fi + done +} + +# Prompt the user to create an unprivileged user account +create_user() { + while true; do + FULL_NAME=$(dialog --title "Create a User Account" --nocancel \ + --inputbox "The installer will create a user account for you. This is \ +the main user account that you will login to and use for non-administrative \ +activities.\n\nPlease enter the real name for this user. This information \ +will be used for any program that uses the user's real name such as email. \ +Entering your full name here is recommended; however, it may be left \ +blank.\n\nFull name for the new user:" 15 80 3>&1 1>&2 2>&3) + + USER_NAME=$(dialog --title "Create a User Account" \ + --cancel-label "Back" --inputbox "Please enter a username for the new \ +account.\n\nThe username should start with a lower-case letter, which can be \ +followed by any combination of numbers, more lower-case letters, or the dash \ +symbol.\n\nUsername for your account:" 13 80 3>&1 1>&2 2>&3) + + if [ $? -eq 0 ]; then + # Username must start with lowercase letter. May contain lowercase + # alpha-numerics and dashes + if printf "%s" "$USER_NAME" | grep -Eoq "^[a-z][a-z0-9-]*$" \ + && [ "${#USER_NAME}" -lt 33 ]; then + # The reserved_username file contains usernames that should be avoided + if grep -Fxq "$USER_NAME" "$DIR"/etc/reserved_usernames; then + dialog --title "ERROR: Reserved Username" \ + --msgbox "The username you entered ($USER_NAME) is reserved for \ +use by the system. Please select a different one." 6 70 + else + inputs_match=false + while ! $inputs_match; do + input=$(dialog --title "Set the Password for $USER_NAME" --clear \ + --stdout --nocancel --insecure --passwordbox "Please enter a \ +password for '$USER_NAME'.\n\nChoose a password for the new user:" 10 70) + confirm_input=$(dialog --title "Set the Password for $USER_NAME" \ + --clear --stdout --insecure \ + --passwordbox "Re-enter password to verify:" 8 55) + + if [ -z "$input" ]; then + dialog --title "ERROR: Empty Password" \ + --msgbox "You are not allowed to have an empty password." 5 55 + elif [ "$input" != "$confirm_input" ]; then + dialog --title "ERROR: Passwords Do No Match" \ + --msgbox "The two passwords you entered did not match." 5 55 + else + user_passwd="$input" + inputs_match=true + fi + done + break + fi + else + dialog --title "ERROR: Invalid Username Format" \ + --msgbox "You entered an invalid username.\n\nThe username must \ +start with a lower-case letter, which can be followed by any combination of \ +numbers, more lower-case letters, or the dash symbol, and must be no more \ +than 32 characters long." 9 80 + fi + fi + done +} + +# Prepare the user's selected disk for partitioning +prepare_disk() { + SWAP="-" + swap_enabled=false + block_devices=() + # List all available block devices excluding 'rom' and 'loop' + for device in $(lsblk -d -n -p -r -e 7,11 -o NAME); do + device_size=$(lsblk -d -n -r -o SIZE "$device") + block_devices+=("$device" "$device_size") + done + + check_mountpoints + while true; do + PARTITION_LAYOUT=$(dialog --title "Partition the Disks" \ + --cancel-label "Exit to Menu" \ + --menu "The installer will now automatically partition a disk for you. \ +If you have no preference or are unsure about which partition layout to \ +choose, the 'Basic' layout is the simplest and should be enough for most use \ +cases.\n\nPartition layout:" 14 80 3 \ +"Basic" "Use entire disk" \ +"LVM" "Use entire disk and set up LVM" \ +"Encrypted" "Use entire disk and set up encrypted LVM" 3>&1 1>&2 2>&3) + + if [ $? -eq 0 ]; then + DISK=$(dialog --title "Set the Installation Disk" --cancel-label "Back" \ + --menu "Select the disk for Parch Linux to be installed on. Note that \ +the disk you select will be erased, but not until you have confirmed the \ +changes.\n\nDisk to partition:" 16 55 5 \ +"${block_devices[@]}" 3>&1 1>&2 2>&3) + + if [ $? -eq 0 ]; then + # NVME devices use nvme0n1p1, p2, p3 etc. for partition naming + PREFIX="" + if [[ "$DISK" == *"nvme"* ]]; then + PREFIX="p" + fi + + FILE_SYSTEM=$(dialog --title "Set the Filesystem for $DISK_ROOT" \ + --nocancel --menu "Select the type of filesystem to use for the \ +specified device. If you are unsure, 'ext4' is the default.\n\nFilesystem \ +type:" 15 68 5 \ +"ext4" "Ext4 journaling filesystem" \ +"ext3" "Ext3 journaling filesystem" \ +"ext2" "Standard Linux Ext2 filesystem" \ +"btrfs" "Btrfs Copy-on-Write B-tree filesystem" \ +"xfs" "SGI's journaling filesystem" 3>&1 1>&2 2>&3) + + dialog --title "Create a Swap Partition" \ + --yesno "Would you like to create an optional swap partition? If \ +you are unsure, it is recommended to create one." 6 57 + if [ $? -eq 0 ]; then + # Get the amount of RAM in the system to use as default swap size + mem_total=$(free --giga | awk '/^Mem:/{print $2}') + if [ "$mem_total" != "0" ]; then + mem_total="${mem_total}G" + else + mem_total=$(free --mega | awk '/^Mem:/{print $2}') + mem_total="${mem_total}M" + fi + + while true; do + SWAP=$(dialog --title "Allocate Swap Space" \ + --inputbox "Specify how much swap space to allocate. If you are \ +unsure, the default is to have swap space equal to the amount of RAM in your \ +system.\n\nSwap partition size (use 'M' for MiB or 'G' for GiB):" 11 80 \ +"$mem_total" 3>&1 1>&2 2>&3) + + if [ $? -eq 0 ]; then + disk_size_bytes=$(lsblk -b -d -n -o SIZE "$DISK") + disk_size_mibs=$((disk_size_bytes/1024/1024)) + disk_size_gibs=$((disk_size_mibs/1024)) + swap_size=$(printf "%s" "$SWAP" | tr -c -d '[:digit:]') + + # Input validation for swap size + if printf "%s" "$SWAP" | grep -Eoq "^[0-9]+[MG]$" \ + && [ "${swap_size:0:1}" != "0" ]; then + if [ "${SWAP: -1}" = "M" ] \ + && [ "$swap_size" -lt $((disk_size_mibs - 2048)) ]; then + swap_enabled=true + break + elif [ "${SWAP: -1}" = "G" ] \ + && [ "$swap_size" -lt $((disk_size_gibs - 2)) ]; then + swap_enabled=true + break + else + dialog --title "ERROR: Not Enough Disk Space" \ + --msgbox "The amount you entered exceeds the amount of \ +space available on the disk. Note that the installer sets aside an additional \ +2 GiB to have enough space for the base installation." 8 60 + fi + else + dialog --title "ERROR: Invalid Format" \ + --msgbox "You entered an invalid format. Make sure to use \ +'M' for 'MiB' or 'G' for 'GiB'." 6 60 + fi + else + break + fi + done + fi + + dialog --title "Confirm the Partition Layout for $DISK" --defaultno \ + --yesno "WARNING: All data on the selected disk will be lost! Make \ +sure to review your changes before continuing.\n\nDisk to partition: \ +$DISK\nPartition layout: $PARTITION_LAYOUT\nFilesystem type: \ +$FILE_SYSTEM\nSwap size: $SWAP\n\nAre you sure you want to write the \ +changes to the disk?" 13 60 + if [ $? -eq 0 ]; then + check_lvm_status + dialog --infobox "Formatting $DISK..." 3 50 + sgdisk --zap-all "$DISK" &> /dev/null + wipefs -a "$DISK" &> /dev/null + dialog --infobox "Partitioning $DISK..." 3 50 + create_partition_label + case "$PARTITION_LAYOUT" in + "Basic") create_basic_layout ;; + "LVM") create_lvm_layout ;; + "Encrypted") create_encrypted_layout ;; + esac + break + else + main_menu + fi + fi + else + main_menu + fi + done +} + +# Create a new partition label on the selected disk +create_partition_label() { + # UEFI systems use GPT partitioning and BIOS/CSM systems use MBR + if $UEFI; then + parted -s "$DISK" mklabel gpt &> /dev/null + else + parted -s "$DISK" mklabel msdos &> /dev/null + fi + if [ $? -ne 0 ]; then + dialog --title "ERROR: Unable to Partition $DISK" \ + --msgbox "The installer encountered an error while partitioning \ +$DISK.\n\nMake sure the disk you selected is not active before running the \ +installer. If this error keeps occuring, please reboot your machine and try \ +again." 8 80 + reset ; exit 1 + fi +} + +# Partition the selected disk where everything is installed on one partition +create_basic_layout() { + if $UEFI; then + BOOT_PART="${DISK}${PREFIX}1" + ROOT_PART="${DISK}${PREFIX}2" + if $swap_enabled; then + SWAP_PART="${DISK}${PREFIX}3" + sgdisk -n 1:0:+512M -n 2:0:-"$SWAP" -n 3:-"$SWAP":-0 \ + -t 1:ef00 -t 2:8300 -t 3:8200 "$DISK" &> /dev/null + mkswap "$SWAP_PART" &> /dev/null + swapon "$SWAP_PART" + else + sgdisk -n 1:0:+512M -n 2:0:0 -t 1:ef00 -t 2:8300 "$DISK" &> /dev/null + fi + mkfs.fat -F32 "$BOOT_PART" &> /dev/null + else + ROOT_PART="${DISK}${PREFIX}1" + if $swap_enabled; then + SWAP_PART="${DISK}${PREFIX}2" + echo -e "n\np\n1\n\n-${SWAP}\nn\np\n2\n\n\nt\n2\n82\nw" \ + | fdisk "$DISK" &> /dev/null + mkswap "$SWAP_PART" &> /dev/null + swapon "$SWAP_PART" + else + echo -e "n\np\n1\n\n\nw" | fdisk "$DISK" &> /dev/null + fi + fi + + case "$FILE_SYSTEM" in + btrfs|xfs) mkfs."$FILE_SYSTEM" -f "$ROOT_PART" &> /dev/null ;; + *) mkfs."$FILE_SYSTEM" "$ROOT_PART" &> /dev/null ;; + esac + mount "$ROOT_PART" /mnt + if [ $? -eq 0 ]; then + mounted=true + fi + if $UEFI; then + mkdir /mnt/boot + mount "$BOOT_PART" /mnt/boot + fi +} + +# Partition the selected disk and configure LVM +create_lvm_layout() { + if $UEFI; then + BOOT_PART="${DISK}${PREFIX}1" + ROOT_PART="${DISK}${PREFIX}2" + sgdisk -n 1:0:+512M -n 2:0:0 -t 1:ef00 -t 2:8e00 "$DISK" &> /dev/null + mkfs.fat -F32 "$BOOT_PART" &> /dev/null + else + ROOT_PART="${DISK}${PREFIX}1" + echo -e "n\np\n1\n\n\nt\n8e\nw" | fdisk "$DISK" &> /dev/null + fi + + dialog --infobox "Configuring LVM on $ROOT_PART..." 3 50 + pvcreate -y "$ROOT_PART" &> /dev/null + vgcreate -y "$LVM_GROUP" "$ROOT_PART" &> /dev/null + if $swap_enabled; then + lvcreate -y -L "$SWAP" "$LVM_GROUP" -n "$LVM_SWAP" &> /dev/null + lvcreate -y -l 100%FREE "$LVM_GROUP" -n "$LVM_ROOT" &> /dev/null + mkswap "/dev/${LVM_GROUP}/${LVM_SWAP}" &> /dev/null + swapon "/dev/${LVM_GROUP}/${LVM_SWAP}" + else + lvcreate -y -l 100%FREE "$LVM_GROUP" -n "$LVM_ROOT" &> /dev/null + fi + + case "$FILE_SYSTEM" in + btrfs|xfs) mkfs."$FILE_SYSTEM" -f "/dev/${LVM_GROUP}/${LVM_ROOT}" &> /dev/null ;; + *) mkfs."$FILE_SYSTEM" "/dev/${LVM_GROUP}/${LVM_ROOT}" &> /dev/null ;; + esac + mount "/dev/${LVM_GROUP}/${LVM_ROOT}" /mnt + if [ $? -eq 0 ]; then + mounted=true + fi + if $UEFI; then + mkdir /mnt/boot + mount "$BOOT_PART" /mnt/boot + fi +} + +# Partition the selected disk and set up root disk encryption (LVM on LUKS) +create_encrypted_layout() { + # /boot is left unencrypted + BOOT_PART="${DISK}${PREFIX}1" + ROOT_PART="${DISK}${PREFIX}2" + if $UEFI; then + sgdisk -n 1:0:+512M -n 2:0:0 -t 1:ef00 -t 2:8e00 "$DISK" &> /dev/null + mkfs.fat -F32 "$BOOT_PART" &> /dev/null + else + echo -e "n\np\n1\n\n+512M\nn\np\n2\n\n\nt\n2\n8e\nw" | fdisk "$DISK" &> /dev/null + mkfs.ext4 "$BOOT_PART" &> /dev/null + fi + + inputs_match=false + while ! $inputs_match; do + input=$(dialog --title "Encrypt $ROOT_PART" --clear --stdout \ + --insecure --passwordbox "Enter a passphrase to encrypt \ +$ROOT_PART.\n\nThe overall strength of the encryption process depends \ +strongly on this passphrase, therefore you should set a passphrase that is \ +not easy to guess.\n\nNote that the passphrase you enter will be required \ +each time on boot.\n\nEncryption passphrase:" 15 80) + + if [ $? -eq 0 ]; then + confirm_input=$(dialog --title "Encrypt $ROOT_PART" --clear --stdout \ + --insecure --passwordbox "Re-enter passphrase to verify:" 8 55) + + if [ -z "$input" ]; then + dialog --title "ERROR: Empty Passphrase" \ + --msgbox "You are not allowed to have an empty passphrase." 5 55 + elif [ "$input" != "$confirm_input" ]; then + dialog --title "ERROR: Passphrases Do No Match" \ + --msgbox "The two passphrases you entered did not match." 5 55 + elif [ "${#input}" -lt 8 ]; then + dialog --title "WARNING: Weak Passphrase" --defaultno \ + --yesno "The passphrase you entered is less than 8 characters which \ +is considered insecure.\n\nContinue using a weak passphrase?" 8 60 + if [ $? -eq 0 ]; then + inputs_match=true + fi + else + inputs_match=true + fi + else + dialog --title "Revert Partition Changes" --defaultno \ + --yesno "Are you sure you want to cancel the encryption \ +process? If you choose yes, you will be returned to the partition menu." 7 65 + if [ $? -eq 0 ]; then + prepare_disk + fi + fi + done + + dialog --infobox "Encrypting $ROOT_PART..." 3 50 + printf "%s" "$input" | cryptsetup luksFormat "$ROOT_PART" - &> /dev/null + printf "%s" "$input" | cryptsetup open "$ROOT_PART" "$CRYPT_DEVICE_NAME" - + dialog --infobox "Configuring LVM on $ROOT_PART..." 3 50 + pvcreate -y "/dev/mapper/${CRYPT_DEVICE_NAME}" &> /dev/null + vgcreate -y "$LVM_GROUP" "/dev/mapper/${CRYPT_DEVICE_NAME}" &> /dev/null + + if $swap_enabled; then + lvcreate -y -L "$SWAP" "$LVM_GROUP" -n "$LVM_SWAP" &> /dev/null + lvcreate -y -l 100%FREE "$LVM_GROUP" -n "$LVM_ROOT" &> /dev/null + mkswap "/dev/mapper/${LVM_GROUP}-${LVM_SWAP}" &> /dev/null + swapon "/dev/mapper/${LVM_GROUP}-${LVM_SWAP}" + else + lvcreate -y -l 100%FREE "$LVM_GROUP" -n "$LVM_ROOT" &> /dev/null + fi + + case "$FILE_SYSTEM" in + btrfs|xfs) mkfs."$FILE_SYSTEM" -f "/dev/mapper/${LVM_GROUP}-${LVM_ROOT}" &> /dev/null ;; + *) mkfs."$FILE_SYSTEM" "/dev/mapper/${LVM_GROUP}-${LVM_ROOT}" &> /dev/null ;; + esac + mount "/dev/mapper/${LVM_GROUP}-${LVM_ROOT}" /mnt + if [ $? -eq 0 ]; then + mounted=true + fi + mkdir /mnt/boot + mount "$BOOT_PART" /mnt/boot +} + +# Use the reflector script to update the pacman mirror list +update_mirrorlist() { + dialog --title "Update the Mirror List" \ + --yesno "Would you like to update the Parch Linux mirror list?\n\nUpdating \ +the mirror list will speed up the download of packages. If you select no, \ +your download speed may be affected." 8 70 + + if [ $? -eq 0 ]; then + dialog --infobox "Updating pacman mirror list..." 3 50 + # Sort the 50 most recently synchronized HTTPS mirrors by download speed + reflector --latest 50 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + fi +} + +# Prompt the user to install the base packages for the system +configure_install() { + bluetooth_enabled=false + dm_enabled=false + multilib=false + DESKTOP_PACKAGES=() + + if $UEFI; then + DESKTOP_PACKAGES+=('efibootmgr') + fi + + if [ "$PARTITION_LAYOUT" = "LVM" ]; then + DESKTOP_PACKAGES+=('lvm2') + elif [ "$PARTITION_LAYOUT" = "Encrypted" ]; then + DESKTOP_PACKAGES+=('lvm2' 'cryptsetup') + fi + + if [ "$FILE_SYSTEM" = "btrfs" ]; then + DESKTOP_PACKAGES+=('btrfs-progs') + elif [ "$FILE_SYSTEM" = "xfs" ]; then + DESKTOP_PACKAGES+=('xfsprogs') + fi + + if [ "$architecture" = "x86_64" ]; then + dialog --title "Enable multilib" \ + --yesno "Would you like to enable the 'multilib' repository?\n\nBy \ +default, Arch only includes 64-bit software in its repositories. The \ +'multilib' repository contains 32-bit software that is compatible on a 64-bit \ +system (e.g. wine, steam, etc)." 9 70 + if [ $? -eq 0 ]; then + multilib=true + fi + fi + + while true; do + DESKTOP=$(dialog --title "Choose your Graphical Environment" --no-cancel \ + --menu "Select the style of graphical environment you wish to \ +use.\n\nGraphical environment:" 12 75 3 \ +"Desktop Environment" "Traditional complete graphical user interface" \ +"Window Manager" "Standalone minimal graphical user interface" \ +"None" "Command-line only interface" 3>&1 1>&2 2>&3) + + if [ "$DESKTOP" = "Desktop Environment" ]; then + GUI=$(dialog --title "Select a Desktop Environment" \ + --cancel-label "Back" \ + --menu "Select a desktop environment to install:" 15 65 8 \ +"Budgie" "Modern GNOME based desktop" \ +"Cinnamon" "Traditional desktop experience" \ +"GNOME" "Modern simplicity focused desktop" \ +"KDE Plasma" "Full featured QT based desktop" \ +"LXDE" "Lightweight and efficient desktop" \ +"LXQT" "Lightweight and efficient QT based desktop" \ +"MATE" "Continuation of the GNOME 2 desktop" \ +"Xfce" "Lightweight and modular desktop" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + break + fi + elif [ "$DESKTOP" = "Window Manager" ]; then + GUI=$(dialog --title "Select a Window Manager" \ + --cancel-label "Back" \ + --menu "Select a window manager to install:" 13 75 6 \ +"awesome" "Highly configurable, dynamic window manager" \ +"bspwm" "Tiling window manager based on binary space partitioning" \ +"Fluxbox" "Stacking window manager based on Blackbox" \ +"i3" "Dynamic tiling window manager inspired by wmii" \ +"Openbox" "Highly configurable, stacking window manager" \ +"xmonad" "Dynamic tiling window manager configured in Haskell" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + break + fi + else + break + fi + done + + if [ "$DESKTOP" != "None" ]; then + DESKTOP_PACKAGES+=("${DESKTOP_DEFAULTS[@]}") + case "$GUI" in + "Budgie") DESKTOP_PACKAGES+=('budgie-desktop' 'gnome-control-center') + dialog --title "Install Extras" --yesno "Would you like to \ +install the 'gnome' group?\n\nIt contains additional utilities and \ +applications that integrate well with the Budgie desktop." 8 60 + if [ $? -eq 0 ]; then + DESKTOP_PACKAGES+=('gnome') + fi + xinit_config="export XDG_CURRENT_DESKTOP=Budgie:GNOME ; exec budgie-desktop" + ;; + "Cinnamon") DESKTOP_PACKAGES+=('cinnamon' 'cinnamon-translations' 'nemo-fileroller') + xinit_config="exec cinnamon-session" + ;; + "GNOME") DESKTOP_PACKAGES+=('gnome') + dialog --title "Install Extras" --yesno "Would you like to \ +install the 'gnome-extra' group?\n\nIt contains additional utilities and \ +applications that integrate well with the GNOME desktop." 8 60 + if [ $? -eq 0 ]; then + DESKTOP_PACKAGES+=('gnome-extra') + fi + xinit_config="exec gnome-session" + ;; + "KDE Plasma") DESKTOP_PACKAGES+=('plasma') + dialog --title "Install Extras" --yesno "Would you like \ +to install the 'kde-applications' group?\n\nIt contains additional utilities \ +and applications that integrate well with the Plasma desktop." 8 60 + if [ $? -eq 0 ]; then + DESKTOP_PACKAGES+=('kde-applications') + fi + xinit_config="exec startkde" + ;; + "LXDE") DESKTOP_PACKAGES+=('lxde') + xinit_config="exec startlxde" + ;; + "LXQT") DESKTOP_PACKAGES+=('lxqt' 'breeze-icons') + xinit_config="exec startlxqt" + ;; + "MATE") DESKTOP_PACKAGES+=('mate' 'gtk-engines' 'gtk-engine-murrine') + dialog --title "Install Extras" --yesno "Would you like to \ +install the 'mate-extra' group?\n\nIt contains additional utilities and \ +applications that integrate well with the MATE desktop." 8 60 + if [ $? -eq 0 ]; then + DESKTOP_PACKAGES+=('mate-extra') + fi + xinit_config="exec mate-session" + ;; + "Xfce") DESKTOP_PACKAGES+=('xfce4') + dialog --title "Install Extras" --yesno "Would you like to \ +install the 'xfce4-goodies' group?\n\nIt contains additional utilities and \ +applications that integrate well with the Xfce desktop." 8 60 + if [ $? -eq 0 ]; then + DESKTOP_PACKAGES+=('xfce4-goodies') + fi + xinit_config="exec startxfce4" + ;; + "awesome") DESKTOP_PACKAGES+=('awesome') + xinit_config="exec awesome" + ;; + "bspwm") DESKTOP_PACKAGES+=('bspwm' 'sxhkd') + xinit_config="sxhkd & ; exec bspwm" + ;; + "Fluxbox") DESKTOP_PACKAGES+=('fluxbox') + xinit_config="exec startfluxbox" + ;; + "i3") DESKTOP_PACKAGES+=('i3') + xinit_config="exec i3" + ;; + "Openbox") DESKTOP_PACKAGES+=('openbox') + xinit_config="exec openbox-session" + ;; + "xmonad") DESKTOP_PACKAGES+=('xmonad' 'xmonad-contrib') + xinit_config="exec xmonad" + ;; + esac + + # GNOME already has networkmanager applet built-in. Plasma uses plasma-nm + if [ "$GUI" != "GNOME" ]; then + if [ "$GUI" = "KDE Plasma" ]; then + DESKTOP_PACKAGES+=('plasma-nm') + else + DESKTOP_PACKAGES+=('network-manager-applet' 'gnome-keyring') + fi + fi + + # Check for available bluetooth devices + if $bluetooth; then + dialog --title "Enable Bluetooth" \ + --yesno "The installer has detected Bluetooth support on your \ +system.\n\nWould you like to install and enable the Bluetooth service?" 7 65 + if [ $? -eq 0 ]; then + bluetooth_enabled=true + DESKTOP_PACKAGES+=('bluez' 'bluez-utils' 'pulseaudio-bluetooth') + dialog --title "Install Bluetooth Manager" \ + --yesno "Would you like to install a graphical Bluetooth \ +manager?\n\nThe utility that best integrates with the desktop environment \ +you selected will be installed." 8 60 + if [ $? -eq 0 ]; then + case "$GUI" in + "Budgie"|"GNOME") DESKTOP_PACKAGES+=('gnome-bluetooth') ;; + "Cinnamon") DESKTOP_PACKAGES+=('blueberry') ;; + "KDE Plasma") DESKTOP_PACKAGES+=('bluedevil') ;; + *) DESKTOP_PACKAGES+=('blueman') ;; + esac + fi + fi + fi + + dialog --title "Install a Display Manager" \ + --yesno "Would you like to install a graphical login manager?\n\nIf you \ +select no, 'xinit' will be installed so you can manually start Xorg with the\ +'startx' command." 8 60 + if [ $? -eq 0 ]; then + DM=$(dialog --title "Install a Display Manager" \ + --menu "Select a display manager to install:" 10 50 3 \ +"gdm" "GNOME Display Manager" \ +"lightdm" "Lightweight Display Manager" \ +"sddm" "Simple Desktop Display Manager" 3>&1 1>&2 2>&3) + if [ $? -eq 0 ]; then + dm_enabled=true + case "$DM" in + "gdm") DESKTOP_PACKAGES+=('gdm') ;; + "lightdm") DESKTOP_PACKAGES+=('lightdm' 'lightdm-gtk-greeter' 'lightdm-gtk-greeter-settings') ;; + "sddm") DESKTOP_PACKAGES+=('sddm') ;; + esac + else + DESKTOP_PACKAGES+=('xorg-xinit') + dialog --title "xinit" \ + --msgbox "No display manager selected. Installing 'xorg-xinit'. The \ +installer will create a xinitrc file for you.\n\nYou will need to use the \ +'startx' command to start the graphical environment once you login." 9 57 + fi + else + DESKTOP_PACKAGES+=('xorg-xinit') + dialog --title "xinit" \ + --msgbox "No display manager selected. Installing 'xorg-xinit'. The \ +installer will create a xinitrc file for you.\n\nYou will need to use the \ +'startx' command to start the graphical environment once you login." 9 57 + fi + + # Intel/AMD/NVIDIA drivers are not installed on virtual machines + if [ "$hypervisor" = "none" ]; then + if lspci | grep "VGA" | grep -iq "Intel"; then + DESKTOP_PACKAGES+=('xf86-video-intel') + fi + + if lspci | grep "VGA" | grep -iq "NVIDIA"; then + gpu_driver=$(dialog --title "Install Graphics Driver" --no-cancel \ + --menu "The installer has detected an NVIDIA graphics card on your \ +system.\n\nYou may choose to install either the open-source or proprietary \ +driver. If you are unsure, the proprietary driver usually offers the best \ +performance.\n\nGraphics driver:" 16 70 3 \ +"NVIDIA" "Proprietary NVIDIA driver" \ +"Nouveau" "Open-source Nouveau driver" \ +"None" "-" 3>&1 1>&2 2>&3) + if [ "$gpu_driver" = "NVIDIA" ]; then + # Get only the GPU PCI device ID + gpu_pci_id=$(lspci -nn | grep -ioP 'VGA.*NVIDIA.*\[\K[\w:]+' | sed 's/.*://') + # Automatically install the correct driver based on the PCI ID data + if grep -Fq "$gpu_pci_id" "$DIR"/etc/nvidia_390_pci_ids; then + DESKTOP_PACKAGES+=('nvidia-390xx' 'nvidia-390xx-utils' 'nvidia-390xx-settings') + elif grep -Fq "$gpu_pci_id" "$DIR"/etc/nvidia_340_pci_ids; then + # Support for nvidia-340xx has been dropped, use nouveau + dialog --title "Install Graphics Driver" \ + --msgbox "Proprietary driver support has ended for your graphics \ +card.\n\nThe open-source Nouveau driver will be installed." 7 65 + DESKTOP_PACKAGES+=('xf86-video-nouveau' 'mesa') + else + DESKTOP_PACKAGES+=('nvidia' 'nvidia-utils' 'nvidia-settings') + fi + else + DESKTOP_PACKAGES+=('xf86-video-nouveau' 'mesa') + fi + elif lspci | grep "VGA" | grep -q "ATI\|AMD"; then + gpu_driver=$(dialog --title "Install Graphics Driver" --no-cancel \ + --menu "The installer has detected an ATI/AMD graphics card on your \ +system.\nThe appropriate driver to install depends on how modern your GPU \ +is.\n\nIf you are unsure, the ATI driver is generally more stable and \ +supports the majority of ATI/AMD GPUs. If you have one of the latest AMD GPUs \ +(Volcanic Islands or newer), then you should install the AMDGPU \ +driver.\n\nGraphics driver:" 17 75 3 \ +"ATI" "Open-source ATI/AMD Radeon driver" \ +"AMDGPU" "Open-source driver for the latest AMD GPUs" \ +"None" "-" 3>&1 1>&2 2>&3) + if [ "$gpu_driver" = "ATI" ]; then + DESKTOP_PACKAGES+=('xf86-video-ati' 'mesa') + else + DESKTOP_PACKAGES+=('xf86-video-amdgpu' 'mesa') + fi + fi + else + dialog --title "Virtual Machine Detected" \ + --msgbox "The installer has detected a virtualized environment: \ +$hypervisor\n\nAny required drivers or utilities will be \ +installed for you." 7 70 + case "$hypervisor" in + "vmware") DESKTOP_PACKAGES+=('open-vm-tools' 'xf86-video-vmware' 'xf86-input-vmmouse' 'mesa' 'gtkmm' 'gtkmm3') ;; + "oracle") DESKTOP_PACKAGES+=('virtualbox-guest-utils' 'virtualbox-guest-dkms') ;; + "parallels") DESKTOP_PACKAGES+=('xf86-video-vesa') ;; + *) DESKTOP_PACKAGES+=('xf86-video-fbdev') ;; + esac + fi + fi +} + +install_base() { + while true; do + dialog --title "Installation Summary" \ + --yesno "The base system is ready to be installed on $DISK.\nThe \ +following packages will be installed:\n\n${BASE_PACKAGES[*]} \ +${BASE_ESSENTIALS[*]} ${DESKTOP_PACKAGES[*]}\n\nInstall Parch Linux?" 0 0 + if [ $? -eq 0 ]; then + clear + pacstrap /mnt "${BASE_PACKAGES[@]}" "${BASE_ESSENTIALS[@]}" "${DESKTOP_PACKAGES[@]}" + if [ $? -eq 0 ]; then + installed=true + else + dialog --title "ERROR: Install Failed" \ + --msgbox "Parch Linux failed to install on $DISK.\n\nThe installer \ +encountered an error while executing pacstrap." 7 65 + reset ; exit 1 + fi + break + else + dialog --title "Cancel Installation" \ + --yesno "Are you sure you want to exit to the main menu?" 5 55 + if [ $? -eq 0 ]; then + main_menu + fi + fi + done +} + +# Apply the user's system settings +configure_system() { + dialog --infobox "Generating the fstab file..." 3 50 + # Generate the fstab file + genfstab -U -p /mnt >> /mnt/etc/fstab + + dialog --infobox "Adjusting time zone and system clock..." 3 50 + # Set the time zone and adjust the hardware clock to the system time (UTC) + ln -sf /usr/share/zoneinfo/"$ZONE" /mnt/etc/localtime + if $utc_enabled; then + arch-chroot /mnt hwclock --systohc --utc + else + arch-chroot /mnt hwclock --systohc --localtime + fi + + dialog --infobox "Generating locales..." 3 50 + # Set locale and keyboard layout if applicable and generate the locales + sed -i "s/#en_US.UTF-8/en_US.UTF-8/" /mnt/etc/locale.gen + if [ "$LOCALE" != "en_US.UTF-8" ]; then + sed -i "s/#$LOCALE/$LOCALE/" /mnt/etc/locale.gen + fi + echo "LANG=$LOCALE" > /mnt/etc/locale.conf + if [ "$KEYMAP" != "us" ]; then + echo "KEYMAP=$KEYMAP" > /mnt/etc/vconsole.conf + if [ "$DESKTOP" != "None" ]; then + echo -e "Section \"InputClass\"\nIdentifier \"system-keyboard\"\nMatchIsKeyboard \"on\"\nOption \"XkbLayout\" \"$KEYMAP\"\nEndSection" > /mnt/etc/X11/xorg.conf.d/00-keyboard.conf + fi + fi + arch-chroot /mnt locale-gen &> /dev/null + + dialog --infobox "Configuring system hostname..." 3 50 + # Set the hostname and add a matching entry to /etc/hosts + echo "$HOST_NAME" > /mnt/etc/hostname + echo -e "127.0.0.1\tlocalhost\n::1\t\tlocalhost\n127.0.1.1\t$HOST_NAME.localdomain\t$HOST_NAME" >> /mnt/etc/hosts + + # Modify mkinitcpio.conf hooks if required and generate a new initramfs + if [ "$PARTITION_LAYOUT" != "Basic" ]; then + dialog --infobox "Recreating the initramfs image..." 3 50 + if [ "$PARTITION_LAYOUT" = "LVM" ]; then + sed -i "s/HOOKS=.*/HOOKS=(base udev autodetect modconf block lvm2 filesystems fsck)/" /mnt/etc/mkinitcpio.conf + elif [ "$PARTITION_LAYOUT" = "Encrypted" ]; then + sed -i "s/HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)/" /mnt/etc/mkinitcpio.conf + fi + arch-chroot /mnt mkinitcpio -p linux &> /dev/null + fi + + dialog --infobox "Installing GRUB to $DISK..." 3 50 + # Append the required kernel parameters to unlock an encrypted partition + if [ "$PARTITION_LAYOUT" = "Encrypted" ]; then + root_part_uuid=$(blkid -s UUID -o value "$ROOT_PART") + sed -i "s/GRUB_CMDLINE_LINUX=\"\(.*\)\"/GRUB_CMDLINE_LINUX=\"\1 cryptdevice=UUID=$root_part_uuid:$CRYPT_DEVICE_NAME root=\/dev\/mapper\/$LVM_GROUP-$LVM_ROOT\"/" /mnt/etc/default/grub + fi + + # Remove the 'quiet' parameter to have a verbose output during boot + sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=\).*/\1\"\"/g' /mnt/etc/default/grub + sed -i s/GRUB_DISTRIBUTOR=\"Arch\"/GRUB_DISTRIBUTOR=\"Parch\"/g etc/default/grub + + # Install GRUB to the target disk and generate the main configuration file + if $UEFI; then + arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB &> /dev/null + else + arch-chroot /mnt grub-install --target=i386-pc "$DISK" &> /dev/null + fi + dialog --infobox "Generating the GRUB configuration file..." 3 50 + arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg &> /dev/null + + dialog --infobox "Configuring user accounts..." 3 50 + # Set the root password and create a user account + arch-chroot /mnt chpasswd <<<"root:$root_passwd" + # User is added to the 'wheel' group and is granted root privileges with sudo + if [ -z "$FULL_NAME" ]; then + arch-chroot /mnt useradd -m -g users -G wheel -s /bin/bash "$USER_NAME" + else + arch-chroot /mnt useradd -m -g users -G wheel -c "$FULL_NAME" -s /bin/bash "$USER_NAME" + fi + arch-chroot /mnt chpasswd <<<"$USER_NAME:$user_passwd" + sed -i '/^# %wheel ALL=(ALL:ALL) ALL/s/^# //' /mnt/etc/sudoers + + # Uncomment multilib in pacman.conf and refresh the database + if $multilib; then + sed -i "/\[multilib\]/,/Include/"'s/^#//' /mnt/etc/pacman.conf + dialog --infobox "Refreshing pacman database..." 3 50 + arch-chroot /mnt pacman -Sy &> /dev/null + fi + + dialog --infobox "Enabling NetworkManager service..." 3 50 + arch-chroot /mnt systemctl enable NetworkManager.service &> /dev/null + + if $bluetooth_enabled; then + dialog --infobox "Enabling Bluetooth service..." 3 50 + arch-chroot /mnt systemctl enable bluetooth.service &> /dev/null + fi + + # xinitrc is created in user's home directory if display manager is not set + if [ "$DESKTOP" != "None" ] && ! $dm_enabled; then + dialog --infobox "Generating the xinitrc file..." 3 50 + echo "$xinit_config" > /mnt/home/"$USER_NAME"/.xinitrc + elif $dm_enabled; then + dialog --infobox "Enabling display manager service..." 3 50 + arch-chroot /mnt systemctl enable "$DM".service &> /dev/null + fi + + if [ "$hypervisor" != "none" ]; then + if [ "$hypervisor" = "oracle" ]; then + dialog --infobox "Enabling VirtualBox modules..." 3 50 + arch-chroot /mnt systemctl enable vboxservice.service &> /dev/null + elif [ "$hypervisor" = "vmware" ]; then + dialog --infobox "Enabling VMware Open-VM-Tools..." 3 50 + arch-chroot /mnt systemctl enable vmtoolsd.service &> /dev/null + arch-chroot /mnt systemctl enable vmware-vmblock-fuse.service &> /dev/null + fi + fi +} + +# System power menu +reboot_system() { + if $installed; then + while true; do + choice=$(dialog --title "Reboot System" --nocancel \ + --menu "Parch Linux has finished installing.\nYou must restart your \ +system to boot Arch.\n\nPlease select one of the following options:" 13 60 3 \ +"Reboot" "Reboot system" \ +"Poweroff" "Poweroff system" \ +"Exit" "Unmount system and exit to CLI" 3>&1 1>&2 2>&3) + + dialog --infobox "Unmounting partitions on /mnt..." 3 50 + umount -R /mnt + case "$choice" in + "Reboot") reset ; reboot ; exit ;; + "Poweroff") reset ; poweroff ; exit ;; + "Exit") reset ; exit ;; + esac + done + else + dialog --title "Reboot System" \ + --yesno "The installation is incomplete.\n\nAre you sure you want to \ +reboot your system?" 7 60 + if [ $? -eq 0 ]; then + check_mountpoints + reset ; reboot ; exit + fi + fi +} + +# Menu which allows the user to navigate the installer +main_menu() { + while true; do + choice=$(dialog --title "Main Menu" --nocancel \ + --menu "Select an option below using the UP/DOWN keys and SPACE or \ +ENTER.\nAlternate keys may also be used: '+', '-', and TAB." 19 70 11 \ +"KEYMAP" "Set the keyboard layout" \ +"LOCALE" "Set the system locale" \ +"TIMEZONE" "Set the system time zone" \ +"HOSTNAME" "Set the system's hostname" \ +"ROOT PASSWORD" "Set the root password" \ +"CREATE USER" "Create your user account" \ +"PARTITION" "Partition the installation drive" \ +"UPDATE MIRRORS" "Update the pacman mirror list" \ +"INSTALL" "Install Parch Linux" \ +"REBOOT" "Reboot system" \ +"EXIT" "Exit Parch Linux Installer" 3>&1 1>&2 2>&3) + + case "$choice" in + "KEYMAP") set_keymap ;; + "LOCALE") set_locale ;; + "TIMEZONE") set_timezone ;; + "HOSTNAME") set_hostname ;; + "ROOT PASSWORD") set_root_passwd ;; + "CREATE USER") create_user ;; + "PARTITION") if $mounted; then + dialog --title "Partition the Disks" \ + --yesno "A disk is mounted on the system and ready for \ +installation.\n\nAre you sure you want to return to partitioning?" 7 70 + if [ $? -eq 0 ]; then + mounted=false + prepare_disk + fi + else + prepare_disk + fi + ;; + "UPDATE MIRRORS") update_mirrorlist ;; + "INSTALL") if $mounted; then + configure_install + install_base + configure_system + reboot_system + else + dialog --title "ERROR: No Filesytem Mounted" \ + --yesno "The installer was unable to detect a \ +mounted filesystem.\n\nReturn to partitioning?" 7 60 + if [ $? -eq 0 ]; then + prepare_disk + fi + fi + ;; + "REBOOT") reboot_system ;; + "EXIT") reset ; exit ;; + esac + done +} + +main() { + init + check_connection + set_keymap + set_locale + set_timezone + set_hostname + set_root_passwd + create_user + prepare_disk + update_mirrorlist + configure_install + install_base + configure_system + reboot_system +} + +main