Fog: Difference between revisions

From wikinotes
No edit summary
(Replaced content with "Named after Dean Fog. = Notes = <blockquote> {| class="wikitable" |- | t2linux archlinux install |- | t2linux archlinux mbp-16.1 |} </blockquote><!-- Notes -->")
Tag: Replaced
 
(105 intermediate revisions by the same user not shown)
Line 1: Line 1:
Archlinux on a macbook. Named after Dean Fog.
Named after Dean Fog.
 


= Notes =
<blockquote>
{| class="wikitable"
{| class="wikitable"
|-
|-
| t2linux install docs || https://wiki.t2linux.org/distributions/arch/installation/
| [[t2linux archlinux install]]
|-
| t2linux pacman repo || https://github.com/Redecorating/archlinux-t2-packages
|-
| 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>
Download install media
{|
|-
| raw (out of date) || https://dl.t2linux.org/archlinux/iso/index.html
|-
| w/ wifi drivers || https://github.com/t2linux/archiso-t2/releases
|-
|-
| [[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 -->
 
= Partition Setup =
<blockquote>
You can't change the partition scheme from outside of macos unfortunately.
 
<syntaxhighlight lang="yaml">
- 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>
</blockquote><!-- Partition Setup -->
 
= Base Install =
<blockquote>
{{ NOTE |
Use the wifi-enabled ISO, spoke with devs and wired kernel is outdated
}}
 
== (archiso) wlan setup ==
<blockquote>
<syntaxhighlight lang="bash">
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect ${SSID}
 
ping archlinux.org
</syntaxhighlight>
</blockquote><!-- (archiso) wlan setup -->
 
== (archiso) format && baseinstall ==
<blockquote>
<syntaxhighlight lang="bash">
timedatectl set-ntp true
 
pacman -Sy
# pacman-key --refresh-keys
 
fdisk -l                  # find disk/partition
mkfs.ext4 /dev/nvme0n1p3  # format partition as ext4
 
mount /dev/nvme0n1p3 /mnt            # your install
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi  # reuse macbook's EFI paritition
 
# if necesary, copy/modify /etc/pacman.conf to /mnt/pacman.conf
# and use: `pacstrap -C /mnt/pacman.conf`
pacstrap /mnt \
  base base-devel                          `# base packages/build-tools` \
  linux-t2 linux-t2-headers linux-t2-docs  `# t2-kernel` \
  efivar efibootmgr dosfstools              `# tools to manage efi` \
  linux-firmware dkms \
  apple-bcm-wifi-firmware \
  iwd \
  neovim git
 
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
</syntaxhighlight>
</blockquote><!-- (archiso) format && baseinstall -->
 
== (chroot) Add t2linux repo ==
<blockquote>
<syntaxhighlight lang="bash">
cat << EOF >> /etc/pacman.conf
[mbp]
Server = https://dl.t2linux.org/archlinux/$repo/$arch
EOF
 
pacman -Syy
</syntaxhighlight>
</blockquote><!-- (chroot) Add t2linux repo -->
 
== (chroot) Base Settings ==
<blockquote>
<syntaxhighlight lang="bash">
ln -sf /usr/share/zoneinfo/America/Toronto /etc/localtime
hwclock --systohc
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "fog" > /etc/hostname
mkinitcpio -P  # confirm kernel/initramfs in /boot/efi
passwd
</syntaxhighlight>
</blockquote><!-- (chroot) Base Settings -->
 
== (chroot) Kernel Modules ==
<blockquote>
{{ NOTE |
unclear if this is necessary, still issues mounting /boot/efi }}
 
<syntaxhighlight lang="bash">
# /etc/mkinitcpio.conf
# MODULES=(apple_bce)  # add apple_bce
 
mkinitcpio -P
</syntaxhighlight>
</blockquote><!-- (chroot) load apple_bce early -->
 
== (chroot) Bootloader ==
<blockquote>
<syntaxhighlight lang="bash">
cat << EOF > /boot/efi/loader/loader.conf
default archlinux
timeout 5
EOF
 
# 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
 
systemctl mask systemd-boot-system-token
 
# remount efivars as read-only (or kernel panic)
# USE EITHER:
#    echo efivarfs /sys/firmware/efi/efivars efivarfs ro,remount,nofail 0 0 >> /etc/fstab
# OR
#    add 'efi=noruntime' to options in '/boot/efi/loader/entries/archlinux.conf'
</syntaxhighlight>
</blockquote><!-- (chroot) Bootloader -->
 
== Reboot ==
<blockquote>
<syntaxhighlight lang="yaml">
- exit && reboot
- hold 'option' while booting to choose boot
- after selection, wait for timeout (choosing with enter seems to fail)
</syntaxhighlight>
</blockquote><!-- Reboot -->
</blockquote><!-- Base Install -->

Latest revision as of 01:51, 13 March 2022