Skip to content

Instantly share code, notes, and snippets.

@ReturnRei
Last active July 29, 2023 20:58
Show Gist options
  • Save ReturnRei/1f30b44e2aaaabe1045599562d5bc838 to your computer and use it in GitHub Desktop.
Save ReturnRei/1f30b44e2aaaabe1045599562d5bc838 to your computer and use it in GitHub Desktop.
Install Arch / EndeavourOS Mac M1 Parallels
This gist is provided as an addition to my youtube video
https://www.youtube.com/watch?v=dKvetujHjYQ&t=737s
## Useful links
https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux#Using_a_chroot_environment
https://archlinuxarm.org/platforms/armv8/generic
https://www.reddit.com/r/archlinux/comments/6kwt61/systemd_doesnt_create_machineid_during/
https://arm.endeavouros.com/endeavouros-arm-install/
## Get into chroot
mount --bind /mnt /mnt && cd /mnt && rm /mnt/etc/resolv.conf && cp /etc/resolv.conf etc && mount -t proc /proc proc && mount --make-rslave --rbind /sys sys && mount --make-rslave --rbind /dev dev && mount --make-rslave --rbind /run run
chroot /mnt /bin/bash
## Commands for install
pacman -Syu base linux linux-firmware vim arch-install-scripts efibootmgr networkmanager network-manager-applet dialog os-prober mtools dosfstools base-devel linux-headers
dbus-uuidgen > /etc/machine-id ## Fix for missing machine-id
genfstab / >> /etc/fstab ## Check your fstab after issuing this command to make sure there aren't other partitions
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime ## This is if you're located in Europe with Paris's timezone
hwclock --systohc
vim /etc/locale.gen ## Select your locales
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf ##Assuming you want this locale
echo "arch" >> /etc/hostname
vim /etc/hosts ip hostname ## Here we use vim to modify the hosts file
bootctl --path=/boot install ## Here we begin setting up systemd-boot
systemctl enable NetworkManager
## For endeavourOS
git clone https://github.com/endeavouros-arm/install-script.git
### Configs
/boot/loader/loader.conf
timeout 3
#console-mode keep
default arch-*
--/entries.arch.conf
title arch
linux /Image
initrd /initramfs-linux.img
options root=/dev/sdb2 rw
@ReturnRei
Copy link
Author

Hey there @SatoriHoshiAiko , is the version you installed from the download directory "ArchLinuxARM-aarch64-latest.tar.gz" also called ARMv8 AArch64 Multi-platform?
Also I'm not that knowledgeable on the exact whys but it seems to me that you didn't use BSDTAR and you should've
https://archlinuxarm.org/platforms/armv8/generic check here, it will tell you to use it to preserve several properties
Also if you want to debug your install check the messages in your journal (what comes after your screenshot)
If I were you I would start over using bsdtar, if it doesn't work hit me up and I'll try to replicate

PS: (Other linux as in what you see in parallels is not the kernel, the kernel is the package "linux" you install on arch)
PS2: chmod 777 is bad practice, generally avoid doing it

@SatoriHoshiAiko
Copy link

SatoriHoshiAiko commented Apr 16, 2022

Yes it is ArchLinuxARM-aarch64-latest.tar (not a .gz) - The multi-platform version as mentioned.

I used bsdtar but perhaps I am not setting the commands fully, I used debian bullseye to unpack this and set up the hdd for arch with your video. bsdtar is not its own package and refered by libtools-archive. But this does do bsdtar command once installed.

I am going to try to wget the generic distrobution you have in the link, and see if I have any better luck.

It would seem to me that the systemd boot is running tracing which is itself a debug mode on boot. It is definitely well baked into the kernel. Let me try a different version of ArchARM and see if I have any luck. Generic will hopefully work on another attempt.

Thanks for the recommendations.

@ReturnRei
Copy link
Author

ReturnRei commented Apr 17, 2022

https://gist.github.com/SatoriHoshiAiko If it doesn't work I'll make a fresh install for myself so just tell me !

@SatoriHoshiAiko
Copy link

Hey, although it is local to Parallels on M1, I found a good image to work with here:

pkgbuild.com/~tpowa/parallels/5.16.x/

I should recommend for you also? The best way to build ArchArm aarch64 images I believe is now archboot.

You should look at the git repository. It might simplify your guide for custom installations for many platforms, and you might have a more straightforward video.

I used the image by tpowa, and quickly booted into parallels right away with aarch64 arm. From there running the endeavouros install-scripts (also a git repository) was a quick install of endeavour os.

Final remaining step for myself is installing black arch tools over endeavour os, I updated pacman keyrings to populate archlinux archlinuxarm endeavouros blackarch.

Some manual dependencies to sort mostly python python2 ruby qt4 mingw-w64 sslyze responder donut john solidity libboost gnuradio gcc-multilib lib32-utils.

Then I should have a full EndeavourOS/BlackArch over Aarch64 ARM in Parallels on Mac M1 Mini.

I would do a YouTube myself but the download on BlackArch takes forever as it is 29GB. Oh well.

For sure consider looking at archboot. It could be a life changer for others moving forward.

tpowa made parallels incredibly easy with his image, but a Return Rei version may turn out better ;)

Cheers,

~SatoriHoshiAiko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment