-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-ultralite
157 lines (149 loc) · 3.44 KB
/
config-ultralite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
ISO_ARCH=x86_64
pre_build() {
# add custom/rootoverlay to airootfs
cp -rvT /custom/rootoverlay airootfs
[ -d "/custom/rootoverlays/$LIVECD_PROFILE" ] && cp -rvT "/custom/rootoverlays/$LIVECD_PROFILE" airootfs
# grub: no beep
sed -i '/^# GRUB init tune for accessibility$/,/^$/s/^play/# play/g' grub/grub.cfg
# sdboot: no beep
sed -i 's/beep on/beep off/g' efiboot/loader/loader.conf
# drop speech from sdboot, just forget about grub and syslinux, writing sed is hard
rm -f efiboot/loader/entries/archiso-x86_64-speech-linux.conf
# drop kms from mkinitcpio.conf
sed -i 's/kms //g' airootfs/etc/mkinitcpio.conf.d/archiso.conf
# add archiso_pxe_dns to mkinitcpio.conf
sed -i 's/archiso_pxe_common/archiso_pxe_dns archiso_pxe_common/g' airootfs/etc/mkinitcpio.conf.d/archiso.conf
# add ntfs-3g to mkinitcpio.conf
echo >> airootfs/etc/mkinitcpio.conf.d/archiso.conf
echo 'BINARIES+=(mount.ntfs)' >> airootfs/etc/mkinitcpio.conf.d/archiso.conf
# no customize_airootfs.sh? no problem
mkdir -p airootfs/etc/pacman.d/hooks
cat << EOF > airootfs/etc/pacman.d/hooks/zzzz98-customize-airootfs.hook
# remove from airootfs!
[Trigger]
Operation = Install
Type = Package
Target = bash-completion
[Action]
Description = Running customize-airootfs...
When = PostTransaction
Exec = /bin/sh -c "chsh -s /bin/bash root && \
cp -rT /etc/skel /root/ && \
echo /root/.automated_script.sh >> /root/.bashrc && \
systemctl disable sshd && \
echo c2VkIC1lICcvTU9EVUxFU19ERUNPTVBSRVNTL2lpZiB0cnVlOyB0aGVuJyAtZSAnL01PRFVMRVNfREVDT01QUkVTUy9kJyAtZSAnL0dlbmVyYXRpbmcgbW9kdWxlIGRlcGVuZGVuY2llcy9pZmluZCAiJEJVSUxEUk9PVFwvJF9kX2ttb2R1bGVkaXIiIC10eXBlIGYgLW5hbWUgIioua28iIC1wcmludDAgfHhhcmdzIC0wIC1QIiQobnByb2MpIiAtSXt9IHh6IC0teDg2IC0tbHptYTIge30nIC1pLmJhayAvdXNyL2xpYi9pbml0Y3Bpby9mdW5jdGlvbnMK |base64 -d |/bin/sh && \
{ diff -u /usr/lib/initcpio/functions{.bak,} || true; } && \
mkinitcpio -P && \
passwd -d root && \
find /etc/systemd/system -xtype l -delete -print"
EOF
# pkglist check
compatver=v81
compatlink="https://gitlab.archlinux.org/archlinux/archiso/-/blob/${compatver}/configs/releng/packages.x86_64"
compatraw="https://gitlab.archlinux.org/archlinux/archiso/-/raw/${compatver}/configs/releng/packages.x86_64"
curl -L -o packages.x86_64.compat "$compatraw"
diff packages.x86_64 packages.x86_64.compat
rm packages.x86_64.compat
# alter packages
cat << EOF >> packages.x86_64
nano
bash-completion
EOF
cat << EOF > packages.x86_64.remove
b43-fwcutter
bind
broadcom-wl
clonezilla
crda
darkhttpd
ddrescue
dhclient
edk2-shell
efibootmgr
fsarchiver
grml-zsh-config
hdparm
ipw2100-fw
ipw2200-fw
iwd
kitty-terminfo
lftp
linux-firmware
lynx
man-db
man-pages
mc
memtest86+
ndisc6
nmap
nvme-cli
openconnect
openvpn
partclone
parted
partimage
pptpclient
reflector
rsync
rxvt-unicode-terminfo
sdparm
sg3_utils
smartmontools
systemd-resolvconf
tcpdump
terminus-font
testdisk
usb_modeswitch
usbutils
vim
vpnc
wireless-regdb
wireless_tools
wpa_supplicant
xl2tpd
zsh
amd-ucode
intel-ucode
alsa-utils
brltty
espeakup
fatresize
gpart
livecd-sounds
squashfs-tools
tmux
udftools
cloud-init
usbmuxd
sof-firmware
modemmanager
archinstall
libusb-compat
pcsclite
libfido2
tpm2-tss
qemu-guest-agent
virtualbox-guest-utils-nox
iw
screen
pv
grub
refind
linux-firmware-marvell
dmidecode
hyperv
open-iscsi
open-vm-tools
ipw2100-fw
ipw2200-fw
memtest86+-efi
foot-terminfo
openpgp-card-tools
sequoia-sq
tpm2-tools
bolt
ldns
reiserfsprogs
gnu-netcat
EOF
}