Wednesday, November 18, 2015

Arch Linux Chroot on Steam Link (Easy Setup)

Alright, this should be a much more user-friendly method of getting an Arch Linux chroot going on your steam link. But by doing it this way you're going to have to have some trust in me as we're going to be downloading and running a shell script that could potentially screw up your Steam Link. Its very un-likely though, more likely is losing important data on any storage devices you may have plugged into the Link.

So first things first you're going to need a USB HDD or pendrive that you don't care about as all of the data on it needs to be wiped. After you're certain that this storage device has nothing important on it plug it into the steam link. Then you're going to need SSH access to your steam link, after you've SSH'd into your steam link do `busybox sh` to switch to a better shell with tab auto-completion. Now do `cd` to enter /home/steam/ then do `wget http://fgthou.se/steamlink/create-chroot-device.sh` to download my script that will automate turning the storage device you have plugged in into the chroot 'system'. Next do `chmod +x create-chroot-device.sh` this will make the script executable. Now if you're a little Linux savvy make sure that you only have one device in /dev/block/sd* if you have anything other than sda[1-9] then you might want to double check that nothing else is plugged into the Steam Link. If you don't know what any of that means or you're sure that nothing else is plugged into the Link do `./create-chroot-device.sh /dev/block/sda` this will start the script on your plugged in device. It will ask you to type yes in order to continue, do so when you're ready to wipe the plugged in device (last chance!).

Now it will proceed to partition and format the drive. Then it will install my pre-built chroot environment onto it. This may take a while but after its done you can do `cd /mnt/chroot` and then do `./dochroot.sh` and you'll be in a Arch Linux environment. When you're done hit Ctrl+D until you get 'Syncing filesystem...' this will make sure you don't lose any data in the chroot when you're done.

After you power-off the Steam Link /mnt/chroot won't exist anymore. To re-mount it do `mkdir /mnt/chroot` and then `mount /dev/block/sda1 /mnt/chroot`. Now you can `cd /mnt/chroot` and `./dochroot.sh` again.

As a side note anyone with Linux experience might notice the /home/steam/usbip folder. In it is usbip for the Linux 3.8.13 kernel which is on the Steam Link. I'm still working on how to get it working with windows but if you already know what usbip is feel free to try it out.

3 comments:

  1. Hello, Aaron! If it is not very hard for you, so can you publish (upload somewhere) full Steam Link OS ("vanilla" or some type of this). I want to try launch this on another device.
    With great thanks, Stanislav.

    ReplyDelete
  2. thanks, thats great.

    but i have question, do you know how to change steam link os to arch linux - as pernament?

    im trying to use http://moonlight-stream.com/ on it... but im to dumb about linux.

    ReplyDelete
    Replies
    1. I was looking into doing something like this but stopped as the hardware is designed against this. The bootloader is Marvell proprietary and according to Valve the "Steam Link devices will only boot with a kernel signed by Valve" so it is risky to RE the bootloader and bypass this check.

      So no it isn't (easily) possible to install a custom Linux/OS on the Steam Link.

      Delete