Fog: Difference between revisions

From wikinotes
(Replaced content with "Named after Dean Fog. = Notes = <blockquote> {| class="wikitable" |- | t2linux archlinux install |- | t2linux archlinux mbp-16.1 |} </blockquote><!-- Notes -->")
Tag: Replaced
 
(114 intermediate revisions by the same user not shown)
Line 1: Line 1:
Archlinux on a macbook. Named after Dean Fog.
Named after Dean Fog.
He's a great magician, but he's also kind of useless.


Instructructions https://wiki.t2linux.org/distributions/arch/installation/
= Notes =
 
arch install https://wiki.archlinux.org/title/Installation_guide#Set_the_console_keyboard_layout
 
systemd boot https://wiki.archlinux.org/title/Systemd-boot
 
= Install Media =
<blockquote>
<blockquote>
Download install media
{| class="wikitable"
{|
|-
| raw || https://dl.t2linux.org/archlinux/iso/index.html
|-
|-
| w/ wifi drivers || https://github.com/t2linux/archiso-t2/releases
| [[t2linux archlinux install]]
|-
|-
| [[t2linux archlinux mbp-16.1]]
|}
|}
 
</blockquote><!-- Notes -->
<syntaxhighlight lang="yaml">
diskutil list
diskutil unmountDisk /dev/disk2
dd if=path/to/archlinux-version-x86_64.iso of=/dev/rdisk2 bs=1m
</syntaxhighlight>
</blockquote><!-- install media -->
 
= Install =
<blockquote>
<syntaxhighlight lang="yaml">
# 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
</syntaxhighlight>
 
Some strange notes
<syntaxhighlight lang="yaml">
- you can't modify your HDD's partition scheme outside of macos's diskutil (ex: fdisk/cfdisk)
</syntaxhighlight>
 
== Wired Install ==
<blockquote>
{{ NOTE |
If issues with outdated archlinux keyring on host,<br>
and host filesystem not writable,<br>
you can copy <code>/etc/pacman.conf</code> to <code>/mnt/pacman.conf</code>,<br>
create an alternate gpgdir or modify <code>SigLevel</code>,<br>
and invoke <code>pacstrap -C /mnt/pacman.conf ...</code>.
}}
 
general settings
<syntaxhighlight lang="bash">
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 base-devel \
  linux-mbp linux-mbp-headers \
  dkms neovim efivar efibootmgr dosfstools dialog apple-bce-dkms-git \
  wireless_tools wpa_supplicant iwd \
  git
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
</syntaxhighlight>
 
settings in chroot
<syntaxhighlight lang="bash">
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
</syntaxhighlight>
 
archlinux keyring
<syntaxhighlight lang="bash">
pacman-key --init
pacman-key --populate archlinux
pacman-key --refresh-keys
</syntaxhighlight>
 
bootloader
<syntaxhighlight lang="bash">
cat << EOF > /boot/efi/loader/loader.conf
default archlinux
timeout 5
EOF
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
# copy kernels to the /boot mount where EFI can access them
cp /boot/initramfs* /boot/efi/
cp /boot/vmlinuz* /boot/efi
 
# find PARTUUID of 'archlinux' install partition
# (not EFI partition, not UUID)
blkid
 
cat << EOF > /boot/efi/loader/entries/archlinux.conf
title Arch Linux
linux vmlinuz-linux-mbp
initrd initramfs-linux-mbp.img
# no quotes around PARTUUID
options intel_iommu=on iommu=pt pcie_ports=compat root=PARTUUID=${PARTUUID} rw
EOF
 
bootctl --path=/boot/efi --no-variables install
 
# remount efivars as read-only (or kernel panic)
echo efivarfs /sys/firmware/efi/efivars efivarfs ro,remount,nofail 0 0 >> /etc/fstab
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
# finally, install pacman hook so on kernel upgrades, the kernel is copied to EFI part
#
# see man alpm-hooks
 
mkdir /etc/pacman.d/hooks
 
cat << EOF > /etc/pacman.d/hooks/linux-mbp-updates.hook
## TODO
EOF
</syntaxhighlight>
 
create user
<syntaxhighlight lang="bash">
useradd -m will
</syntaxhighlight>
 
install aura
<syntaxhighlight lang="bash">
curl -0# https://aur.archlinux.org/cgit/aur.git/snapshot/aura-bin.tar.gz
tar -xvf arua-bin.tar.gz
chown -R will:will aura-bin
cd aura-bin
su will
makepkg -s
</syntaxhighlight>
 
keyboard, backlight, audio drivers
see https://wiki.t2linux.org/guides/dkms/
 
{{ WARNING |
This fails to build, my gcc version is too new for latest version.<br>
Asked for suggestions https://github.com/MCMrARM/mbp2018-bridge-drv/issues/25
}}
</blockquote><!-- Wired Install -->
 
== Wireless Install ==
<blockquote>
{{ NOTE |
despite archiso built yesterday, issues with gpg keys.
maybe try the wired iso?
}}
 
Now follow the official archlinux install instructions, except:
<syntaxhighlight lang="bash">
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
</syntaxhighlight>
 
<syntaxhighlight lang="yaml">
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
</syntaxhighlight>
 
<syntaxhighlight lang="yaml">
# 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
</syntaxhighlight>
</blockquote><!-- Wireless Install -->
</blockquote><!-- Install -->

Latest revision as of 01:51, 13 March 2022