diff options
| -rw-r--r-- | archlinux.md | 53 | ||||
| -rw-r--r-- | host_vars/mac-archiso.local.yml | bin | 0 -> 1030 bytes | |||
| -rw-r--r-- | host_vars/mac-archiso.local.yml.example | 45 | ||||
| -rw-r--r-- | inventory/hosts.yml | 2 |
4 files changed, 99 insertions, 1 deletions
diff --git a/archlinux.md b/archlinux.md index 7c44d72..ceca6d6 100644 --- a/archlinux.md +++ b/archlinux.md @@ -5,8 +5,11 @@ - Unmount disk (on MacOS ex. `diskutil unmountDisk /dev/diskX`) - Create bootable image from iso `sudo dd if=/path/to/image.iso of=/dev/diskX bs=4M status=progress` - Boot the `archiso` live image from a bootable USB. -- Connect to wireless network (if not connected via LAN). - Set root password (which will be asked to run the install playbook). + +## Generic Machine + +- Connect to wireless network (if not connected via LAN). - `cp host_vars/archiso.local.example host_vars/archiso.local` - Update the `host_vars/archiso.local` file - Run the playbook on the ansible controller @@ -14,6 +17,54 @@ **Example:** ```bash +hostnamectl set-hostname archiso.local passwd iwctl --passphrase <PASSPHRASE> station wlan0 connect <SSID> +dhcpcd wlan0 +``` + +## MacBookPro 2012 (without WIFI) + +- On another machine, download the matching broadcom-wl package (using `scripts/get-broadcom-wl.sh`) +- Copy broadcom-wl package to a FAT32 USB drive +- Remove conflicting kernel modules (`brcmfmac brcmutil b43 ssb bcma wl`) +- Load the broadcom-wl driver from USB +- Connect to wireless network +- `cp host_vars/mac-archiso.local.example host_vars/mac-archiso.local` +- Update the `host_vars/mac-archiso.local` file +- Run the playbook on the ansible controller + +**Example:** + +```bash +hostnamectl set-hostname mac-archiso.local +passwd + +# Get the running kernel version (used to find the right package and insmod path) +uname -r + +# Identify USB partition +lsblk +# Copy driver to MacBookPro archiso +mkdir /mnt/usb +mount /dev/sdb /mnt/usb +cd /tmp +bsdtar -xf /mnt/usb/broadcom-wl-6.30.223.271-<REV>-x86_64.pkg.tar.zst + +# Fix loading the driver +rmmod brcmfmac brcmutil b43 ssb bcma wl +# should be empty +lsmod | grep -E 'brcmfmac|brcmutil|b43|ssb|bcma|wl' +# Insert module +insmod usr/lib/modules/<KERNEL>/extramodules/wl.ko.zst +# bcma auto-reloads, remove it again +rmmod bcma + +# should show wlan0 +rfkill unblock all +ip link + +# Connect to network +iwctl --passphrase <PASSPHRASE> station wlan0 connect <SSID> +dhcpcd wlan0 ``` diff --git a/host_vars/mac-archiso.local.yml b/host_vars/mac-archiso.local.yml Binary files differnew file mode 100644 index 0000000..c685d6a --- /dev/null +++ b/host_vars/mac-archiso.local.yml diff --git a/host_vars/mac-archiso.local.yml.example b/host_vars/mac-archiso.local.yml.example new file mode 100644 index 0000000..86c660a --- /dev/null +++ b/host_vars/mac-archiso.local.yml.example @@ -0,0 +1,45 @@ +--- +hostname: "mac-archlinux.local" +partition_disk: "/dev/sda" +partition_wipe: false +partition_boot: + num: 1 + name: "boot" + flags: [boot, esp] + part_start: "0%" + part_end: "1.0GiB" + fstype: "vfat" + fstype_opts: "-F 32" + dev: "{{ partition_disk }}1" + mount_path: "/mnt/boot/efi" + fstab_opts: "defaults,nodev,nosuid,noexec,umask=0077" +partition_swap: + num: 2 + name: "swap" + flags: [swap] + part_start: "1.0GiB" + part_end: "9.0GiB" + fstype: "ext4" + dev: "{{ partition_disk }}2" + mount_path: "none" +partition_root: + num: 4 + name: "arch-root" + part_start: "59.0GiB" + part_end: "109.0GiB" + fstype: "ext4" + dev: "{{ partition_disk }}4" + mount_path: "/mnt" +partition_extras: + - num: 3 + name: "ubuntu-root" + part_start: "9.0GiB" + part_end: "59.0GiB" + fstype: "ext4" + dev: "{{ partition_disk }}3" + - num: 5 + name: "home" + part_start: "109.0GiB" + part_end: "100%" + fstype: "ext4" + dev: "{{ partition_disk }}4" diff --git a/inventory/hosts.yml b/inventory/hosts.yml index 28e3f10..5bb79b5 100644 --- a/inventory/hosts.yml +++ b/inventory/hosts.yml @@ -4,6 +4,8 @@ live_environments: ansible_connection: ssh ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" hosts: + mac-archiso.local: + ansible_user: root archiso.local: ansible_user: root ubuntuiso.local: |
