Fog

From wikinotes
Revision as of 00:19, 3 March 2022 by Will (talk | contribs)

Archlinux on a macbook. Named after Dean Fog. He's a great magician, but he's also kind of useless.

Instructructions https://wiki.t2linux.org/distributions/arch/installation/

arch install https://wiki.archlinux.org/title/Installation_guide#Set_the_console_keyboard_layout

Install Media

Download install media

raw https://dl.t2linux.org/archlinux/iso/index.html
w/ wifi drivers https://github.com/t2linux/archiso-t2/releases
diskutil list
diskutil unmountDisk /dev/disk2
dd if=path/to/archlinux-version-x86_64.iso of=/dev/rdisk2 bs=1m

Install

# MacBook
- macbook, start bootcamp (preinstalled)
  - drag slider for size (deletes apfs snapshots?)

- disk utility
  - create a partition (any format) for your linux install

- restart, holding cmd+r
  - Utilities > Startup Security Utility:
    - [x] No Security
    - [x] Allow booting from external media

- restart, holding opt
  - you don't need to connect to wifi in bootloader
  - boot from EFI

Some strange notes

- you can't modify your HDD's partition scheme outside of macos's diskutil (ex: fdisk/cfdisk)

Wired Install

NOTE:

If issues with outdated archlinux keyring on host,
and host filesystem not writable,
you can copy /etc/pacman.conf to /mnt/pacman.conf,
create an alternate gpgdir or modify SigLevel,
and invoke pacstrap -C /mnt/pacman.conf ....

timedatectl set-ntp true

curl -o key.asc https://dl.t2linux.org/archlinux/key.asc
pacman-key --add key.asc
pacman-key --lsign 7F9B8FC29F78B339

# only works if HDD writable
pacman -Sy archlinux-keyring

pacstrap /mnt base linux-mbp linux-mbp-headers apple-bce-dkms-git dkms neovim
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/America/Toronto /etc/localtime
hwclock --systohc
echo "en_US.UTF-8 UTF-i" > /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "fog" > /etc/hostname
mkinitcpio -P
passwd

bootctl --path=/boot/efi --no-variables install

# <<< LEFT OFF HERE

Wireless Install

NOTE:

despite archiso built yesterday, issues with gpg keys. maybe try the wired iso?

Now follow the official archlinux install instructions, except:

timedatectl set-ntp true

iwctl
 device list
 station wlan0 scan
 station wlan0 get-networks
 station wlan0 connect ${SSID}

ping google.com
pacman -Syy
pacman-key --refresh-keys

mount /dev/nvme1n1p3 /mnt
mkdir -p /mnt/boot/efi
mount /dev/nvme1n1p1 /mnt/boot/efi

pacstrap /mnt base linux-t2 linux-t2-headers linux-t2-docs apple-bcm-wifi-firmware dkms linux-firmware iwd
https://wiki.archlinux.org/title/Installation_guide#Set_the_console_keyboard_layout

- EFI
  - reuse the macbook's EFI parition: /dev/nvme0n1p1
  - mount macbook's EFI to: /mnt/boot/efi
# IGNORE ME
- perform base install
  # https://wiki.archlinux.org/title/Installation_guide#Set_the_console_keyboard_layout
  - keyboard layout
  - boot mode
  - setup internet
  - set hardware clock
  - create partitions

- reuse the EFI partition at /dev/nvme0n1p1
  - mount /dev/root_partition /mnt
  - mount /dev/nvme0n1p1 /mnt/boot/efi  # reuse EFI partition

- mirrors