Installing Arch Linux on a Raspberry Pi 4, using macOS

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby Zoc » Fri Jul 03, 2020 3:21 pm

Hi there :)

I wrote a beginner friendly guide on how to install Arch Linux to a Raspberry Pi 4, using macOS as the auxiliary system.

https://gist.github.com/TheZoc/849a82d3eed219998cd82fb4040607ae


It took me awhile to get things working, so I hope this helps someone out there!


I didn't find a way to start up wpa_supplicant/dhcpcd automatically on boot for wifi connections, in a reliable way.
If someone could give some help in that area, it would be much appreciated :)
Zoc
 
Posts: 3
Joined: Fri Jul 03, 2020 2:42 pm

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby karog » Fri Jul 03, 2020 4:40 pm

I just did it for an RPi Zero W. This assumes your arch is running systemd and that your WiFi device is wlan0.

Create the file /etc/systemd/network/wlan0.network with contents
$this->bbcode_second_pass_code('', '[Match]
Name=wlan0

[Network]
DHCP=yes
')
then execute the following commands
$this->bbcode_second_pass_code('', 'wpa_passphrase "<SSID>" "<PASSWORD>" > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

sudo systemctl enable wpa_supplicant@wlan0
')where <SSID> and <PASSWORD> are the for your WiFi Access Point

That 2nd command will init the WiFi at boot.

You can start it manually with
$this->bbcode_second_pass_code('', 'sudo systemctl start wpa_supplicant@wlan0')
karog
 
Posts: 304
Joined: Thu Jan 05, 2012 7:55 pm

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby Zoc » Sat Jul 04, 2020 1:20 pm

Hi @karog!

Thank you! This actually works perfectly!

I noticed that the line
$this->bbcode_second_pass_code('', 'ln -s /usr/lib/systemd/system/wpa_supplicant@.service /etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service')

is the same as
$this->bbcode_second_pass_code('', 'systemctl enable wpa_supplicant@wlan0')

Is that right?

Thanks again!

Edit: You updated your initial post, I guess this is correct. Thanks again! :)
Zoc
 
Posts: 3
Joined: Fri Jul 03, 2020 2:42 pm

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby thor314 » Sat Jul 11, 2020 12:53 pm

Damn dude, thanks! Someone other than me struggling and sharing how to avoid that is exactly what I needed to kick off my weekend.
thor314
 
Posts: 6
Joined: Sat Jul 11, 2020 12:51 pm

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby karog » Sat Jul 11, 2020 1:36 pm

@zoc some comments on your gist Part 2

step 1: timedatectl set-timezone Europe/London

step 6: localectl set-locale LANG=en_US.UTF-8

step 7: hostnamectl set-hostname <name>
karog
 
Posts: 304
Joined: Thu Jan 05, 2012 7:55 pm

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby thor314 » Mon Jul 20, 2020 10:05 am

Hey @Zoc, I'd like to know what led you partition the disk like this
sudo diskutil partitionDisk /dev/disk2 MBR fat32 "BOOT" 100m UFSD_EXTFS4 "root" 0b
I've read online that MBR is generally older and inferior to GPT, and I'm curious why the BOOT ought to be fat32 as opposed to ext4, as with the root dir.
thor314
 
Posts: 6
Joined: Sat Jul 11, 2020 12:51 pm

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby Zoc » Tue Jul 21, 2020 9:32 am

$this->bbcode_second_pass_quote('karog', '@')zoc some comments on your gist Part 2

step 1: timedatectl set-timezone Europe/London

step 6: localectl set-locale LANG=en_US.UTF-8

step 7: hostnamectl set-hostname <name>

Hey @karog,
I just updated the gist with your comments!
I added a special thanks entry in the guide for you! I hope you don't mind :)
Thank you so much!

$this->bbcode_second_pass_quote('thor314', 'D')amn dude, thanks! Someone other than me struggling and sharing how to avoid that is exactly what I needed to kick off my weekend.

@thor314, I'm glad this was helpful to you! :D

$this->bbcode_second_pass_quote('thor314', 'H')ey @Zoc, I'd like to know what led you partition the disk like this
sudo diskutil partitionDisk /dev/disk2 MBR fat32 "BOOT" 100m UFSD_EXTFS4 "root" 0b
I've read online that MBR is generally older and inferior to GPT, and I'm curious why the BOOT ought to be fat32 as opposed to ext4, as with the root dir.


I tried a number of combinations with GPT and hybrid MBR/GPT setups, in which the Raspberry Pi failed to recognize and boot from.
I must also mention that I used a different set of utilities to try to get everything working, and the one that required the minimum amount of external dependencies (only relying on Paragon extFS) was the one I included in this guide.

Were you able to setup using GPT?

I won't be reinstalling Arch for a while, since my server is up and running perfectly, but I might give GPT another try when I do.
Zoc
 
Posts: 3
Joined: Fri Jul 03, 2020 2:42 pm
Top

Re: Installing Arch Linux on a Raspberry Pi 4, using macOS

Postby thor314 » Wed Jul 22, 2020 10:27 am

@Zoc tried a couple times with GPT, playing with different file system choices, but no dice. Cheers ;)
thor314
 
Posts: 6
Joined: Sat Jul 11, 2020 12:51 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 4 guests