Simplest guide to getting your Switch running linux, from a VM user's perspective First, you will need to download Ubuntu, here's a link (this file is quite large): http://releases.ubuntu.com/18.04/ubuntu-18.04-desktop-amd64.iso Putting your Switch into RCM/Recovery mode is out of the scope of this tutorial
- Download VMWare and install
- Open VMWare, click
File --> New --> Virtual Machine…
- A window will appear, click
Typical
thenNext
. - Choose
Installer Disc image file (ISO)
then clickBrowse...
and open your Ubuntu file you downloaded earlier - Press
Next
until you see a screen with the titleSpecify Disk Capacity
, it's up to you what size you want your disk to be for ubuntu but I suggest around40.0
, after you've decided this, chooseStore virtual disk as a single file
and then clickNext
- Enter the details you want to use to login to the Ubuntu VM then click
Next
. Don't forget them! - Press
Next
until you see the checkboxPower on this virtual machine after creation
near the bottom of the window. - Make sure the checkbox for this is ticked, then click
Finish
- The VM will now automatically start up. Use the arrow keys to select the text
Install Ubuntu
(make it white) and hit enter. You may have to click the screen of the virtual machine to start controlling it. - Go through the installation process, your language may not make a difference but I'd suggest using
English
as it's what I used to complete this tutorial. If the installer asks for you to enter a username and password, simply enter the same details you used in step 6 and ignoreComputer's name
- Once the installation finishes, you will be met with a message saying
Installation has finished
, in VMWare, pressVM --> Settings
(or equivalent), findUSB
settings and ensure that the dropdown (which usually saysUSB 2.0
saysUSB 3.0
. Your VM may now reboot, if it doesn't, pressRestart Now
. - Once the VM restarts, enter your password to login and click the 6 squares on the bottom left hand corner of the VM's screen (in the dock), and type 'Terminal'.
- Click on the result named
Terminal
and type the following (don't paste it in, type it line by line):sudo apt install python3
, you will be asked for the password of your account, type it in (the password won't show up as you type at all)pip3 install pyusb
git clone https://github.com/SoulCipher/shofel2_linux.git
cd shofel2_linux
- This is the stage where we test if you have the VM setup correctly so far, plug in your Switch into a USB 3.0 SS (Usually a blue coloured socket) socket on your computer and put your switch into RCM/Recovery mode.
- Wait a few seconds, then under
VM --> Removable Devices
find a device containingAPX
orNvidia
and click it, then clickAttach
or equivalent (this term differs through different versions of VMWare) - Click back into the VM, then type
sudo ./boot_linux.sh
into yourTerminal
window. - Your switch should show penguins at some point, then either reboot (handily back to RCM) or say
waiting for ...
, in which case hold down the power button for 13 seconds so the Switch turns off, and then boot it back into RCM. Phew, first half of tutorial complete Now, you need to obtain a 'rootfs', these are the linux 'distributions' that can be run by the Switch. Choose one from: Archlinux LXDE rootfs (min 8gb SD): https://drive.google.com/open?id=1VIH3GWtBrM4uuVQOQopASYZy4x3Jw1Uv (Suggested option) Archlinux gnome rootfs: https://0w0.st/gnome__rootfs.tar.bz2 Ubuntu rootfs: https://mega.nz/#!M8sUzDgR!_BhgNd878hio-wX7W324QU6TLjS9zTs38aNDNThTlv0 You can choose others, but these are the current best options (IF THIS IS A ZIP, NOT TAR, EXTRACT IT FIRST) Download these through Ubuntu's built-in firefox browser to your VM. Once the download is done, we can continue:
If you chose the LXDE rootfs (or any with the file extension .bin or .img inside their zip)
18. Plug your sdcard into your PC, it needs to be at least 8gb and will be wiped in the process, so back anything you already have on it up.
19. Through the same VM --> Removable Devices
menu, attach the sdcard to the VM.
20. Click the 6 squares on the bottom left again, and search for/open Disks
21. Select the disk which is your sdcard from the left hand list
22. On the top-right, click the '3 lines' icon and then click Restore Disk Image...
23. In the window that opens up, click (None)
and then open your .bin or .img file, you may need to extract it out of a zip and/or type *
and hit enter in the filename box to view all file types.
24. Click Start Restoring...
and click OK to any warnings or errors about it being a different size. THIS STEP WIPES THE SDCARD COMPLETELY
25. Wait a while for the rootfs to be flashed to the SD (OBVIOUSLY DON'T REMOVE THE SDCARD AT THIS POINT)
26. Once this is done, press the 'eject' button on the top right (next to the 3 lines, it has an arrow going up), close Disks
and your SD will be ready!
27. Remove the SD from your computer and place it in the Switch (which should still be in RCM mode)
28. You can now re-type the command sudo ./boot_linux.sh
in Terminal
in order to boot linux on the switch!
If you chose the Ubuntu or Gnome rootfs (or any that has .tar in the name somewhere)
18. Plug your sdcard into your PC, it needs to be a sensible capacity and will be wiped in the process, so back anything you already have on it up.
19. Through the same VM --> Removable Devices
menu, attach the sdcard to the VM.
20. Click the 6 squares on the bottom left again, and search for/open Disks
21. Select the disk which is your sdcard from the left hand list
22. On the top-right, click the '3 lines' icon and then click Format Disk...
23. Ensure the top option says Don't overwrite existing data
and the bottom option says Compatible with all systems and devices
.
24. Press Format...
THIS STEP WIPES THE SDCARD COMPLETELY
25. Wait a few seconds for the SDCard to format, then press the +
button underneath the large orange rectangle
26. Again, make sure the 2 dropdowns say the correct things like in step 23
27. Where it says Partition Size
choose the size you want the official switch OS to use, remember linux will need alot too, usually more than this amount.
28. Press Create
and wait for the orange box to split
29. Click on the white area to the right of the orange box, and press +
again.
30. This time, the second option (Which was Compatible with all systems and devices
) now needs to say Compatible with Linux systems
31. Press Create
32. Press the play icon which has now replaced the +
icon
33. Right at the bottom of the text, where it says Contents
right click the orange text to the right of Mounted at
and click Copy Link Address
34. Press the 6 squares at the bottom left hand side of your VM screen and search for/open another Terminal
35. In this terminal, type cd Downloads
36. type tar -xf (NAME OF DOWNLOADED ROOTFS) -C (MOUNT POINT)
where (name of rootfs) is the name of the file you downloaded and (mount point) is the link you copied earlier, but remove the file://
from it (you can't use ctrl+v, just right click and then click paste)
37. Wait a while, nothing will show up in the Terminal
it'll just ask for a command again once it's done extracting
38. When it's done, go back to Disks
and press the 'eject' button (next to the 3 lines on the top right, it has an arrow pointing up), wait for the notification on the top right to say something like 'Device can be safely removed' and then remove your sdcard!
39. Put the sdcard back into your Switch (which should still be in RCM mode)
40. You can now re-type the command sudo ./boot_linux.sh
in the original Terminal
in order to boot linux on the switch!
From now on, to boot linux, connect your Switch to the PC, ensure the device is attached to the VM, open a new Terminal
from the 6 square menu and type:
cd shofel2_linux
sudo ./boot_linux.sh
then enter your password, and linux will boot!