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: 200
  • config-x64.txt
    607 bytes · Views: 255
  • 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
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
  • TwoSpikedHands @ TwoSpikedHands:
    @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the mail lol
  • I @ I-need-help-with-wup-wiiu:
    i need help with nusspli failed downloads, can someone respond to my thread? pretty please:wub: