Last active
August 14, 2024 20:12
-
-
Save PlatinumMaster/223616e0b37f42a0cac05a0f765dca63 to your computer and use it in GitHub Desktop.
Arch Linux chroot installation on the Steam Link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# Written by PlatinumMaster, based on the work of mcd1992. | |
mkdir -p /mnt/disk | |
echo "Wiping the plugged in disk now, you have been warned!" | |
# Wipe disk and mount it | |
mkfs.ext4 /dev/block/sda1 | |
mount /dev/block/sda1 /mnt/disk | |
cd /mnt/disk | |
# Get Arch Linux ARM | |
echo "Getting Arch Linux, may take a while..." | |
wget http://os.archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz | |
# Extract Arch Linux ARM | |
echo "Extracting Arch Linux, may take a while..." | |
tar -xvf ArchLinuxARM-armv7-latest.tar.gz | |
rm -rf ArchLinuxARM-armv7-latest.tar.gz | |
# Make Home Directory | |
echo "Made home directory" | |
mkdir -p /mnt/disk/home/steam | |
# Make Dev Directory | |
echo "Made dev directory" | |
mkdir -p /mnt/disk/dev | |
# Get ready to chroot | |
mount -t proc proc /mnt/disk/proc/ | |
mount -t sysfs sys /mnt/disk/sys/ | |
mount -o bind /dev /mnt/disk/dev/ | |
mount -t devpts devpts /mnt/disk/dev/pts/ | |
# chroot into new installation | |
echo "Changing root now" | |
chroot /mnt/disk /bin/bash -c "pacman-key --init && pacman-key --populate archlinuxarm" | |
#pacman -Syyu && uname -a" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/busybox ash | |
# Mount drive | |
mkdir -p /mnt/disk | |
mount /dev/block/sda1 /mnt/disk | |
# Get ready to chroot | |
mount -t proc proc /mnt/disk/proc/ | |
mount -t sysfs sys /mnt/disk/sys/ | |
mount -o bind /dev /mnt/disk/dev/ | |
mount -t devpts devpts /mnt/disk/dev/pts/ | |
# chroot into new installation | |
echo "Changing root now" | |
chroot /mnt/disk /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment