Add initial files.
This commit is contained in:
0
airootfs/etc/fstab
Normal file
0
airootfs/etc/fstab
Normal file
1
airootfs/etc/hostname
Normal file
1
airootfs/etc/hostname
Normal file
@@ -0,0 +1 @@
|
||||
archiso
|
1
airootfs/etc/locale.conf
Normal file
1
airootfs/etc/locale.conf
Normal file
@@ -0,0 +1 @@
|
||||
LANG=en_US.UTF-8
|
0
airootfs/etc/machine-id
Normal file
0
airootfs/etc/machine-id
Normal file
7
airootfs/etc/modprobe.d/broadcom-wl.conf
Normal file
7
airootfs/etc/modprobe.d/broadcom-wl.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
# The broadcom-wl package requires some modules to be disabled in order to use
|
||||
# wl. Since the ISO image needs to cover many hardware cases, this file
|
||||
# overrides the default blacklist in /usr/lib/modprobe.d/
|
||||
#
|
||||
# If you need to use wl, you may need to delete this file, then `rmmod` any
|
||||
# already-loaded modules that are now blacklisted before proceeding to modprobe
|
||||
# wl itself.
|
26
airootfs/etc/systemd/scripts/choose-mirror
Executable file
26
airootfs/etc/systemd/scripts/choose-mirror
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
get_cmdline() {
|
||||
local param
|
||||
for param in $(< /proc/cmdline); do
|
||||
case "${param}" in
|
||||
$1=*) echo "${param##*=}";
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
mirror=$(get_cmdline mirror)
|
||||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
|
||||
[[ $mirror ]] || exit 0
|
||||
|
||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
||||
cat >/etc/pacman.d/mirrorlist << EOF
|
||||
#
|
||||
# Arch Linux repository mirrorlist
|
||||
# Generated by archiso
|
||||
#
|
||||
|
||||
Server = ${mirror%%/}/\$repo/os/\$arch
|
||||
EOF
|
10
airootfs/etc/systemd/system/choose-mirror.service
Normal file
10
airootfs/etc/systemd/system/choose-mirror.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Choose mirror from the kernel command line
|
||||
ConditionKernelCommandLine=mirror
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/etc/systemd/scripts/choose-mirror
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
8
airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount
Normal file
8
airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Temporary /etc/pacman.d/gnupg directory
|
||||
|
||||
[Mount]
|
||||
What=tmpfs
|
||||
Where=/etc/pacman.d/gnupg
|
||||
Type=tmpfs
|
||||
Options=mode=0755
|
@@ -0,0 +1,3 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
|
15
airootfs/etc/systemd/system/pacman-init.service
Normal file
15
airootfs/etc/systemd/system/pacman-init.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Initializes Pacman keyring
|
||||
Wants=haveged.service
|
||||
After=haveged.service
|
||||
Requires=etc-pacman.d-gnupg.mount
|
||||
After=etc-pacman.d-gnupg.mount
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/pacman-key --init
|
||||
ExecStart=/usr/bin/pacman-key --populate archlinux
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
airootfs/etc/udev/rules.d/81-dhcpcd.rules
Normal file
1
airootfs/etc/udev/rules.d/81-dhcpcd.rules
Normal file
@@ -0,0 +1 @@
|
||||
ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service"
|
34
airootfs/root/.automated_script.sh
Executable file
34
airootfs/root/.automated_script.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
script_cmdline ()
|
||||
{
|
||||
local param
|
||||
for param in $(< /proc/cmdline); do
|
||||
case "${param}" in
|
||||
script=*) echo "${param#*=}" ; return 0 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
automated_script ()
|
||||
{
|
||||
local script rt
|
||||
script="$(script_cmdline)"
|
||||
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
|
||||
if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
|
||||
wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
|
||||
rt=$?
|
||||
else
|
||||
cp "${script}" /tmp/startup_script
|
||||
rt=$?
|
||||
fi
|
||||
if [[ ${rt} -eq 0 ]]; then
|
||||
chmod +x /tmp/startup_script
|
||||
/tmp/startup_script
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $(tty) == "/dev/tty1" ]]; then
|
||||
automated_script
|
||||
fi
|
1
airootfs/root/.zlogin
Normal file
1
airootfs/root/.zlogin
Normal file
@@ -0,0 +1 @@
|
||||
~/.automated_script.sh
|
23
airootfs/root/customize_airootfs.sh
Executable file
23
airootfs/root/customize_airootfs.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
|
||||
locale-gen
|
||||
|
||||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
||||
|
||||
usermod -s /usr/bin/zsh root
|
||||
cp -aT /etc/skel/ /root/
|
||||
chmod 700 /root
|
||||
|
||||
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
|
||||
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
|
||||
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
|
||||
|
||||
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
|
||||
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
|
||||
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
|
||||
|
||||
systemctl enable pacman-init.service choose-mirror.service
|
||||
systemctl set-default multi-user.target
|
3
airootfs/root/install.txt
Normal file
3
airootfs/root/install.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
View this installation guide online at
|
||||
https://wiki.archlinux.org/index.php/Installation_Guide
|
||||
|
Reference in New Issue
Block a user