Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/mkarchiso486
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-09-02 09:06:48 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-09-02 09:06:48 +0200
commit15adaba9eaa6a98c8b55bc5c5f73c3a9e0e55e7a (patch)
tree27fbb1ba9151d1871572aa9275271ccf306ec47a /mkarchiso486
parentfa4481b0da5442f152b179dfc0e52b6ec033cf60 (diff)
moved i486-iso stuff into iso subdir
Diffstat (limited to 'mkarchiso486')
-rwxr-xr-xmkarchiso48699
1 files changed, 0 insertions, 99 deletions
diff --git a/mkarchiso486 b/mkarchiso486
deleted file mode 100755
index 1d12302..0000000
--- a/mkarchiso486
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-BASE=/root/archi486
-ROOTFS="$BASE/airootfs"
-ROOTMNT="$BASE/mnt"
-
-umount "$ROOTMNT"
-rm -rf "$ROOTFS"
-rm -f "$BASE/pacman-i486.conf"
-rm -f "$BASE/mirrorlist32"
-
-if test ! -d "$ROOTMNT"; then
- mkdir "$ROOTMNT"
-fi
-
-# get and patch mirrorlist for Archlinux32
-if test ! -d "$ROOTFS"; then
- mkdir "$ROOTFS"
-fi
-
-if test ! -f "$BASE/mirrorlist32"; then
- wget -O "$BASE/mirrorlist32" "https://www.archlinux32.org/mirrorlist/?country=all&protocol=http&protocol=https&ip_version=4&ip_version=6"
- sed -i '/https.*mirror.archlinux32.org/s/#Server/Server/' "$BASE/mirrorlist32"
-fi
-
-echo "Patch host pacman.conf for installation of i486 chroot.."
-cp /etc/pacman.conf "$BASE/pacman-i486.conf"
-sed -i 's/^Architecture.*=.*/Architecture = i486/' "$BASE/pacman-i486.conf"
-sed -i "s|/etc/pacman.d/mirrorlist|$BASE/mirrorlist32|" "$BASE/pacman-i486.conf"
-sed -i 's|.*ParallelDownloads.*|ParallelDownloads = 1|' "$BASE/pacman-i486.conf"
-
-pacstrap -C "$BASE/pacman-i486.conf" -G -M "$ROOTFS" base linux
-
-echo "Cleaning up root filesystem to fit to an ISO.."
-rm -rf "$ROOTFS/var/cache/pacman/pkg/"*
-
-echo "Patching pacman.conf and mirrorlist on the ISO.."
-sed -i 's/^Architecture.*=.*/Architecture = i486/' "$ROOTFS/etc/pacman.conf"
-sed -i 's/^#\(Server.*=.*https:\/\/.*mirror\.archlinux32.org.*\)/\1/' "$ROOTFS/etc/pacman.d/mirrorlist"
-sed -i 's|.*ParallelDownloads.*|ParallelDownloads = 1|' "$ROOTFS/etc/pacman.conf"
-
-mount --bind "$ROOTFS" "$ROOTMNT"
-
-echo "Preparing keyring inside chroot.."
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'pacman-key --init'
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'pacman-key --populate archlinux'
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'pacman-key --populate archlinux32'
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'pacman -Syyu --noconfirm syslinux dhclient dhcpcd pciutils nano joe vi arch-install-scripts openssh'
-
-echo "Install configuration.."
-for i in 1 2 3 4; do
- mkdir -p "$ROOTFS"/etc/systemd/system/getty@tty$i.service.d
- cp $BASE/autologin.conf "$ROOTFS"/etc/systemd/system/getty@tty$i.service.d/.
-done
-cp $BASE/resolv.conf "$ROOTFS"/etc/resolv.conf
-cp $BASE/sshd_config "$ROOTFS"/etc/ssh/sshd_config
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'ssh-keygen -b 2048 -t rsa -f etc/ssh/ssh_host_rsa_key -N ""'
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'ssh-keygen -b 1024 -t dsa -f etc/ssh/ssh_host_dsa_key -N ""'
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'ssh-keygen -b 521 -t ecdsa -f etc/ssh/ssh_host_ecdsa_key -N ""'
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'ssh-keygen -b 2048 -t ed25519 -f etc/ssh/ssh_host_ed25519_key -N ""'
-chmod 0400 "$ROOTFS"/etc/ssh/ssh_host_*_key
-cp $BASE/motd "$ROOTFS"/etc/motd
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'echo "root:arch" | /usr/bin/chpasswd'
-cp $BASE/system-login "$ROOTMNT"/etc/pam.d/system-login
-
-echo "Installining syslinux (isolinux).."
-if test ! -d "$ROOTFS/isolinux"; then
- mkdir "$ROOTFS/isolinux"
-fi
-for file in isolinux.bin ldlinux.c32; do
- cp "$ROOTFS"/usr/lib/syslinux/bios/"$file" "$ROOTFS/isolinux"
-done
-cp "$BASE"/isolinux-i486.cfg "$ROOTFS/isolinux/isolinux.cfg"
-
-echo "Creating ramdisk for ISO.."
-cp "$BASE"/mkinitcpio-i486.conf "$ROOTFS/etc/mkinitcpio.conf"
-linux32 arch-chroot "$ROOTMNT" /bin/bash -c 'mkinitcpio -P'
-
-umount "$ROOTMNT"
-
-echo "Creating ISO.."
-TODAY=`date +'%Y.%m.%d'`
-cd "$ROOTFS"
-iso_label="ARCH_$(date +%Y%m)"
-iso_publisher="Arch Linux <http://www.archlinux32.org>"
-iso_application="ArchLinux32 i486 Live/Rescue CD"
-mkisofs -o "$BASE/archlinux32-$TODAY-i486.iso" \
- -b "isolinux/isolinux.bin" \
- -c "isolinux/boot.cat" \
- -volid "${iso_label}" \
- -appid "${iso_application}" \
- -publisher "${iso_publisher}" \
- -preparer "prepared by mkarchiso" \
- -no-emul-boot -boot-load-size 4 -boot-info-table \
- -R -full-iso9660-filenames -iso-level 3 \
- "."
-cd ..
-
-echo "Done."