Tutorial  Updated

Booting Linux on your Switch from Windows - one script, nothing to build, only downloads

THIS GUIDE IS DEPRECATED
THIS IS BETTER https://github.com/natinusala/painless-linux


This guide will show you how to boot Linux on your Switch from a Windows PC. If you're on Linux, you can directly use the shofel2_linux repository.

Credits :
  • @kombos for the pre-built binaries
  • @rajkosto for TegraRcmSmash and Windows imx_usb binaries
  • Fail0verflow for their Linux port
What you'll need :
  • A Switch
  • A Windows PC
  • Another SD card of at least 8Gb
    • you can use the same SD card that you already have on your Switch but be careful when partitioning !
  • A USB A-to-C or C-to-C cable to plug your Switch into your PC
Step 1 : installing the driver
  1. Get your Switch in RCM mode and plug it into your PC
    • It should appear as "APX" in Windows
  2. Download and run the Zadig Driver Installer from here : https://zadig.akeo.ie/
  3. In the list, choose the device "APX"
    • If it's not showing up, check "List all devices" in the options
  4. At the right end of the green arrow, choose "libusbK (v3.0.7.0)"
  5. Click on the big "Install driver" button
Step 2 : creating the root filesystem

Yes, this is still necessary. Yes, this will always be.

Open my another guide and follow the "Building the rootfs" section.
On Windows you'll have to use a IMG file and burn it with Etcher, or find a way to create an ext4 partition by hand (good luck with that).
I recommend the latest LXDE image which has the correct format for Etcher - it's a zip containing a bin, flash the .bin using Etcher.

You should be left with a SD card with two partitions on it.

Step 3 : a whole bunch of downloads
  1. Download and extract this : https://github.com/SoulCipher/shofel2_linux/archive/master.zip
  2. Download this : https://files.sshnuke.net/TegraRcmSmash1101.zip
  3. Extract the executable for your architecture in the shofel2_linux-master folder
  4. Download this : https://github.com/rajkosto/imx_usb_loader/releases/download/08daaa/imx_usb.zip
  5. Extract the executable and DLL in the shofel2_linux-master folder
  6. Download this : http://launchmycraft.fr/boot_linux.bat
  7. Put it in the shofel2_linux-master folder
This is what you should have in the linux_shofel2-master folder before continuing :
2d13fc7c7d.png


Step 4 : actually booting Linux
  1. Put your Switch in RCM mode and plug it in your PC
  2. Go in the shofel2_linux-master folder and open boot_linux.bat
  3. It wasn't that hard, wasn't it ?
 
Last edited by natinusala,
D

Deleted User

Guest
Not to be a party pooper but is it legal to distribute shofel2_linux-master.zip?
More specifically, in coreboot.rom it contains the tegra_mtc.bin which is the only closed source component and is probably copyrighted by Google.
 

natinusala

Win32 error 31 is not an error
OP
Member
Joined
Dec 1, 2012
Messages
1,032
Trophies
0
Age
44
XP
2,914
Country
France
Well, I don't really know. Closed source doesn't mean that it's forbidden to distribute. Anyone can download the Pixel image and extract the file by themselves, it's not like it's really protected.
 
  • Like
Reactions: killplaystation

x0x0

Well-Known Member
Member
Joined
Nov 15, 2017
Messages
300
Trophies
0
Age
32
Location
Inside the code
XP
1,101
Country
Poland
I only tried and did it with VMware because it was stated that VirtualBox can't passthrough USB devices. As it turned out it worked just fine with VMware ("VM" tab > "Removable Devices" > "Your USB microSD card reader").^^
I'm know how to attach but VMware cant detect this.
Im specially boot to the linux to make SDCard and Gnome. The issue is that wont help.

Edit:
I'm sick, I've specifically launched Ubuntu on my PC to do it. No matter what image i use, the problem is the same back to RCM.
 
Last edited by x0x0,

Bluegamebits

Member
Newcomer
Joined
Jun 8, 2014
Messages
16
Trophies
0
Age
27
XP
128
Country
Mexico
I tried using etcher but I get an error while trying to boot saying it can't initialize the sd card now. So now I have tried with arch_lxde using win32di or etcher and with kde_rootfs3.tar.bz2 and manually creating a fat 32 partition and decompressing it to an ext4 partition. What could it be? The formatting process is being done correctly and the RCM payload seems to be working though I do get a lot of errors while booting but don't know if it's supposed to be like that.

edit: after loading the sd card in the stock os and 'resetting' the fat32 partition, it manages to initialize the card like normal until it kernel panics and goes back to RCM like before :/ Most likely it's TegraRcmSmash at fault here? I wish I could run the exploit on Linux but I don't know how to apply the kernel patch to make usb 2.0 work on linux.
 
Last edited by Bluegamebits,

Miqote

Well-Known Member
Member
Joined
May 2, 2018
Messages
259
Trophies
0
XP
822
Country
Macedonia, The Former Yugoslav Republic of
For the record, I used the Arch Linux LXDE disto and burned it to a 16GB microSD using a USB -> SD -> MicroSD Adaptor and Win32DiskImager. It worked fine right off the bat. (lol, that pun, get it???)
 
  • Like
Reactions: natinusala

x0x0

Well-Known Member
Member
Joined
Nov 15, 2017
Messages
300
Trophies
0
Age
32
Location
Inside the code
XP
1,101
Country
Poland
Finally i booted the linux, the thing is Samsung EVO Plus they need special patches to boot. So you cannot use a ready image. You need to build with patches by yourself.
Big thanks to user from reswitched discord Dante who spend with me ~2hours to help me. He probably will make soon a image for samsung evo user cards.
 
Last edited by x0x0,

Quantumcat

Dead and alive
Member
Joined
Nov 23, 2014
Messages
15,144
Trophies
0
Location
Canberra, Australia
Website
boot9strap.com
XP
11,094
Country
Australia
If anyone is tired of downloading all those files, I made config.txts for my configurable downloader program.

Just rename the one that corresponds to you to config.txt (e.g. rename config-x64.txt to config.txt), put it in the same folder as downloader.jar (extract it from the zip, I wasn't allowed to upload a jar file), and run downloader.jar. Pick a folder to save to then click Download Files. Everything will download itself and also tidy itself up, inside a folder called "stuff" in the location you picked.

If you know of any other project that requires multiple downloads please let me know and I will make a config.txt for it (or tell you how to)
 

Attachments

  • config-win32.txt
    609 bytes · Views: 199
  • config-x64.txt
    607 bytes · Views: 252
  • downloader.zip
    3 MB · Views: 256
Last edited by Quantumcat,

Bluegamebits

Member
Newcomer
Joined
Jun 8, 2014
Messages
16
Trophies
0
Age
27
XP
128
Country
Mexico
Finally i booted the linux, the thing is Samsung EVO Plus they need special patches to boot. So you cannot use a ready image. You need to build with patches by yourself.
Big thanks to user from reswitched discord Dante who spend with me ~2hours to help me. He probably will make soon a image for samsung evo user cards.
My sd card is a Kingston 64 gb though.. I'm still not able to boot this thing.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe they plan on offloading to the CPU?
  • Psionic Roshambo @ Psionic Roshambo:
    Would be kinda cool to have the CPU and GPU working in random more
  • Psionic Roshambo @ Psionic Roshambo:
    Tandem even
  • The Real Jdbye @ The Real Jdbye:
    i think i heard of that, it's a good idea, shouldn't need a dedicated GPU just to run a LLM or video upscaling
  • The Real Jdbye @ The Real Jdbye:
    even the nvidia shield tv has AI video upscaling
  • The Real Jdbye @ The Real Jdbye:
    LLMs can be run on cpu anyway but it's quite slow
  • BakerMan @ BakerMan:
    Have you ever been beaten by a wet spaghetti noodle by your girlfriend because she has a twin sister, and you got confused and fucked her dad?
  • Psionic Roshambo @ Psionic Roshambo:
    I had a girlfriend who had a twin sister and they would mess with me constantly.... Until one chipped a tooth then finally I could tell them apart.... Lol
  • Psionic Roshambo @ Psionic Roshambo:
    They would have the same hair style the same clothes everything... Really messed with my head lol
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, I could see AMD trying to pull off the CPU GPU tandem thing, would be a way to maybe close the gap a bit with Nvidia. Plus it would kinda put Nvidia at a future disadvantage since Nvidia can't make X86/64 CPUs? Intel and AMD licensing issues... I wonder how much that has held back innovation.
  • The Real Jdbye @ The Real Jdbye:
    i don't think nvidia wants to get in the x64 cpu market anyways
  • The Real Jdbye @ The Real Jdbye:
    you've seen how much intel is struggling getting into the gpu market
  • The Real Jdbye @ The Real Jdbye:
    and nvidia is already doing ARM
  • The Real Jdbye @ The Real Jdbye:
    i don't think they want to take more focus away from their gpus
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah I think Nvidia s future lays in AI GPU acceleration stuff if they can get that going it's going to be super interesting in the long term
  • Psionic Roshambo @ Psionic Roshambo:
    AI assisted game creation might become a thing
  • Psionic Roshambo @ Psionic Roshambo:
    At least that's something I think would be pretty cool.
  • Psionic Roshambo @ Psionic Roshambo:
    Don some VR glasses and gloves and talk to the computer and paint entire worlds
  • Psionic Roshambo @ Psionic Roshambo:
    "OK Cortana I want that mountain a little taller and more snow on top, and I would like some random ancient pine forest around the bottom"
  • Psionic Roshambo @ Psionic Roshambo:
    "Now we need a spring fed river flowing down the north side and add some wild life appropriate for the biome"
  • Psionic Roshambo @ Psionic Roshambo:
    Many TBs of assets and the programming of something like that is going to be tough but I think it's something we might see in 20 years maybe sooner
  • The Real Jdbye @ The Real Jdbye:
    @Psionic Roshambo AI assisted game creation is kinda already here, there was recently that AI that can turn any 2D image into a fully modeled 3D object, it's not perfect, but it's a starting point, beats starting from zero
  • The Real Jdbye @ The Real Jdbye:
    before that there was one to generate a fully modeled scene from a 2D image
  • The Real Jdbye @ The Real Jdbye:
    but most recently, there was one that actually generates a working unity scene that you can import right into unity, that's a huge time saver right there
    The Real Jdbye @ The Real Jdbye: but most recently, there was one that actually generates a working unity scene that you can...