L4T Ubuntu - A fully featured linux on your switch

switchroot.png

L4T Ubuntu
Intro
L4T Ubuntu is a version of Linux based on nvidia's linux for tegra project. It uses a different kernel compared to previous releases which allows it to use features not yet in mainline. Such as audio, docking support and vulkan.

Join our discord: https://discord.gg/53mtKYt

We have a wiki !
To facilitate our work we will only update our wiki from now on in order to avoid multiple outdated references, please refer to the following link instead of this page

https://wiki.switchroot.org/en/Linux/Ubuntu-Install-Guide

Credits

Bylaws,
Langerhans,
Ave,
Natinusala,
CTCaer(most of the hard stuff),
Gavin_Darkglider,
DanielOgorchock(Joycon drivers/joycond),
stary2001 (reboot2payload),
NVIDIA,
Azkali
Everyone else in switchroot - more info on that in the future.
 
Last edited by azkali,

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
Pretty cool stuff

I keep getting to the last stage of the initial set up and get greeted with this error, anyone help would be appreciated!

I've installed the latest update on SD card and Im still having the same problem.

--------------------- MERGED ---------------------------

Keeping getting this error on initial set up
 

Attachments

  • IMG_20190818_182023.jpg
    IMG_20190818_182023.jpg
    1 MB · Views: 253
  • IMG_20190818_182023.jpg
    IMG_20190818_182023.jpg
    1 MB · Views: 204

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
As the title says, here's the video; I'll do a write up later since it's a long process.



This is not possible in windows 10 due to the GPT Hybrid MBR trickery used, the android image already does this when it writes the partition tables and etc.

Don't do this in windows nor attempt it, it's not going to happen unless there's something you can use to mess with partitions like I did, L4T-Ubuntu also won't work due to the partition stuff and etc, I'm currently making something to allow this without any complications, please be patient!

Watch the entire video and you'll understand more about this, if you make simple errors from not watching the video I will simply tell you to properly watch again and listen!
TOOL ETA: Don't ask, it's a complicated tool that needs a lot of maths, safety features and etc
TOOL SO FAR:
EBa_eq9XUAMnNN5

Tool functions: Android, Custom Android user data, 8GB Android install, Ubuntu, Ubuntu Swap, EmuMMC and Lakka dynamic setup.
Planned functions: Multi EmuMMC setup, EmuMMC Backup & restore(including Nintendo folder) + More unique management stuff!


UPDATE: I'm currently setting aside the tool until I finish making & releasing my new modchip


I was able to get all three working but my process was a little more complicated than what's in the video. I would post a vid but out of town till late Tuesday night and don't have my switch with me.

Basically...

1. i started with a freshly wiped sdcard with my stuff safety backed up.
2. Flashed the noobs Ubuntu version through etcher.
3. Used gparted to manipulate, move, and expand my switch fat32 partition
4. Then manually added the Android partions in pretty much like your video with the right hekate files.

Although, I haven't really tested to make sure everything works but things seemed to boot up just fine right before I left out of town. If things don't get sorted out here for everyone I would be happy to share what I have when I get back home.

EDIT: Let me clarify things...I got android, noobs version of Ubuntu, and then normal hekate but haven't messed around with emummc stuff since my switch is banned and having both android and Ubuntu already take up so much space on my tiny sdcard emummc is pointless to me.

I think I got OFW/CFW-Atmosphere/Lakka/Android/L4T working in a pentaboot situation.

I took what I learned from your guide, and at the end I created another unformated partition 9. I took the 1.img and dd'd it to partition 9. I couldn't resize it after... it gave me some sort of error. So I deleted it and recreated it using the rest of the space on the sd card.


Since L4T isn't going to be in its native location, we will have to edit the boot.scr file.

Change the partition reference in boot.scr by decrypt-> edit -> reencrypt

"dd if=boot.scr of=boot.txt bs=72 skip=1"
Decrypts

setenv bootargs 'root=/dev/mmcblk0p2 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

Change the partition reference to 9?

setenv bootargs 'root=/dev/mmcblk0p9 rw rootwait relative_sleep_states=1 access=m2 console=tty0 firmware_class.path=/lib/firmware/ fbcon=primary:1'

"mkimage -A arm -T script -O linux -d boot.txt boot.scr"
Encrypts

Also, when all was said and done, I needed to redo the flags for partition 1 and 8.

It seems to be working so far. I am testing it now. If you have any ideas for improvement, let us know!

Oh yeah, I got lakka too but didn't include it since doesn't required a separate partition and runs straight from switch sd partition easily. Would love a tool to do all this with less complications though.

Hi, I've been racking my head for the past few hours but I just can't figure this out.

I've been out of the Switch loop for 6+ months, and the arrival of Android seemed very interesting to me. So I've set up my Switch exactly as yours, with android booting absolutely fine and everything working. Stock HorizonOS also works completely fine. However, the issue lies with emuMMC and booting it. Hekate saw the partitions fine (exactly as you had them), and even installed properly to the correct partition, or so it said. However, when trying to boot it, it just gets stuck on the "HEKATE - IPL" splash screen. I've tried restoring 2 different NAND backups and re-installing emuMMC twice. I've redone all the partitions twice. I just come to the same conclusion every time. Stock/Android work fine, emuMMC doesn't.

For the record, I'm on an original Switch with 6.1.0 on it.

EDIT: Restored an even older NAND backup of 4.0 to the emuMMC, and for some reason this works right away. I'm too tired to figure out why, but whatever. It's working.


Thanks for the guide, triple boot working! :)

Is there a how-to, where explains how to create the boot, scr? I would not need more.

This post has some steps to modify a boot.scr, as long as you know what partition numbers you want it should be straightforward. Might need to install u-boot tools or something to get mkimage.


That post doesnt explain the new reboot2payload kernel command line options that arent included in the original boot.scr Without them, the reboot2payload implementation will by default try to reboot to android, once the version of hekate comes out that supports booting by options by ID. ;) I should also mention that every file in the 1.5.0 update changed except for the initramfs. So, you might want to look at them for reference. Currently the kernel command line is set to reboot to hekate, you can change it from bootloader to via-payload, and it will autoreboot to ubuntu(once the new hekate is released)
 
Last edited by Gavin_Darkglider,

CalcProgrammer1

Member
Newcomer
Joined
May 4, 2019
Messages
19
Trophies
0
Age
34
XP
147
Country
United States
So.. nobody tried installing STEAM to play some linux/proton compatible games?

Steam is x86/amd64 and Switch is arm64. Incompatible architectures. There are a few projects trying to create x86 emulators for arm systems but none which can run steam at a usable speed. The box86 emulator has some x86 Linux games running on arm (32-bit) Linux with graphics acceleration but it doesn't support arm64 yet and the Switch doesn't have 32-bit GPU drivers.
 

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
I have managed to install Ubuntu now however it's running like shit, unusable, sometimes still dosnt boot up, I've gone into disks and done the second partition still runs like crap (using a class 10 128gb micro SD card) I've applied update 1.3.1 after flashing the image in etcher, I extracted the SD image beforehabd, literally don't know what else to try at this point, I've tried re installing Ubuntu 5 times and still not working right, could it just be my SD card?
 

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
I have managed to install Ubuntu now however it's running like shit, unusable, sometimes still dosnt boot up, I've gone into disks and done the second partition still runs like crap (using a class 10 128gb micro SD card) I've applied update 1.3.1 after flashing the image in etcher, I extracted the SD image beforehabd, literally don't know what else to try at this point, I've tried re installing Ubuntu 5 times and still not working right, could it just be my SD card?
Could be the SD card. What is it?

Also could be a lack of swap space/partition, but it shouldn't be horrible even before you make one.
 

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
Could be the SD card. What is it?

Also could be a lack of swap space/partition, but it shouldn't be horrible even before you make one.

im using a XC I class 10 128GB, it was one of the cheaper 128gb micro sds available so its almost certainly the problem, does l4t ubuntu for nintendo switch work well for you? if so what micro sd do you use?? thanks
Could be the SD card. What is it?

Also could be a lack of swap space/partition, but it shouldn't be horrible even before you make one.

I'm using one of the cheaper class 10 128gb micro ads available, I don't think it's even branded, almost certain it's the problem, does Ubuntu work well for you on the switch and if so what micro SD are you using??? Thanks
 

Attachments

  • 15662624917311566504275105547839.jpg
    15662624917311566504275105547839.jpg
    707.8 KB · Views: 90

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,911
Country
Japan
I'm using Sandisk 400GB Ultra microSDXC UHS-I, and it works pretty good. I am thinking to upgrade to a U3 card like the Samsung evo select, because it has better write speeds.
 
Last edited by tabzer,
  • Like
Reactions: Lucas95

CalcProgrammer1

Member
Newcomer
Joined
May 4, 2019
Messages
19
Trophies
0
Age
34
XP
147
Country
United States
im using a XC I class 10 128GB, it was one of the cheaper 128gb micro sds available so its almost certainly the problem, does l4t ubuntu for nintendo switch work well for you? if so what micro sd do you use?? thanks


I'm using one of the cheaper class 10 128gb micro ads available, I don't think it's even branded, almost certain it's the problem, does Ubuntu work well for you on the switch and if so what micro SD are you using??? Thanks

That card looks suspicious. There are a ton of fake cards out there. They take old, slow, low capacity reject cards and flash them to report a larger size than is really available. The cards work for the first 2-8GB or so and then start losing all data past that. If it doesn't have a reputable brand name and come from a legitimate retailer I wouldn't trust it.

I got a 256GB Samsung Evo Select on Prime Day. Works great.
 
  • Like
Reactions: Lucas95

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
That card looks suspicious. There are a ton of fake cards out there. They take old, slow, low capacity reject cards and flash them to report a larger size than is really available. The cards work for the first 2-8GB or so and then start losing all data past that. If it doesn't have a reputable brand name and come from a legitimate retailer I wouldn't trust it.

I got a 256GB Samsung Evo Select on Prime Day. Works great.

Thanks just ordered a Samsung Evo 128gb since everyone on here has been recommending them, hopefully il have Linux up and running properly now!
 

CalcProgrammer1

Member
Newcomer
Joined
May 4, 2019
Messages
19
Trophies
0
Age
34
XP
147
Country
United States
Thanks just ordered a Samsung Evo 128gb since everyone on here has been recommending them, hopefully il have Linux up and running properly now!

Samsung Evo cards are my go-to after having a SanDisk Ultra 64GB repeatedly fail on me (sent it off for RMA, replacement failed a few months later). I have a 128GB Samsung Evo Select in my phone that's been fine for several years and at least 4 Select/Plus cards (identical other than name, Select is Amazon-exclusive) in various ARM boards such as Raspberry Pi that work great. Great performance for running an OS as far as microSD cards go.
 

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
Samsung Evo cards are my go-to after having a SanDisk Ultra 64GB repeatedly fail on me (sent it off for RMA, replacement failed a few months later). I have a 128GB Samsung Evo Select in my phone that's been fine for several years and at least 4 Select/Plus cards (identical other than name, Select is Amazon-exclusive) in various ARM boards such as Raspberry Pi that work great. Great performance for running an OS as far as microSD cards go.


Nice! I cancelled my order on the regular Evo and got a Evo select instead! it was pretty much the same price, guessing a select has better running speeds than the regular Evo ?
 

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
That card looks suspicious. There are a ton of fake cards out there. They take old, slow, low capacity reject cards and flash them to report a larger size than is really available. The cards work for the first 2-8GB or so and then start losing all data past that. If it doesn't have a reputable brand name and come from a legitimate retailer I wouldn't trust it.

I got a 256GB Samsung Evo Select on Prime Day. Works great.


did you format your samsung evo select to fat 32 before you installed linux or does it work with exfat aswell? mine just arrived and its in exfat, windows isnt displaying an option to convert to fat 32
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
586
Trophies
0
Age
33
XP
1,171
Country
United States
did you format your samsung evo select to fat 32 before you installed linux or does it work with exfat aswell? mine just arrived and its in exfat, windows isnt displaying an option to convert to fat 32
You don't have to format it first. Writing the Linux image file to the card takes care of everything.
 

ZeroFX

why?
Member
Joined
Jun 18, 2018
Messages
1,101
Trophies
1
Location
napaJ
XP
2,982
Country
Japan
The touchscreen still isnt great, there are better fixes coming, but the devs are hard at work getting android pie built, and getting lp0 sleep support working properly. There are a few ideas on fixes floating around at the memont, so hopefully sooner rather than later. ;) As for flash, I use it in Kodi on gentoo, so see no reason it wouldnt work on ubuntu. as for twitch, I dont know.
Glad we have you maintaining Linux in the meantime.
 

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
no worries i have it working now, only problem im having now is trying to get it connected to the dock so i dont have to use the touchscreen anymore, it sits in the dock and the screen stays on, dosnt show up on the TV at the momment, not sure why, im just installing updates so maybe it will work after that
 

globalc

Member
Newcomer
Joined
Jun 14, 2019
Messages
21
Trophies
0
Age
49
Website
fluxcoil.net
XP
116
Country
Japan
no worries i have it working now, only problem im having now is trying to get it connected to the dock so i dont have to use the touchscreen anymore, it sits in the dock and the screen stays on, dosnt show up on the TV at the momment, not sure why, im just installing updates so maybe it will work after that
You could run 'xrandr' when docked and should see if at least the second screen appears. The
/usr/bin/dock-hotplug script should actually then switch over to the external monitor, you could look at the commands in the file directly.
 

Lucas95

Member
Newcomer
Joined
Aug 18, 2019
Messages
14
Trophies
0
Age
28
XP
47
Country
United Kingdom
You could run 'xrandr' when docked and should see if at least the second screen appears. The
/usr/bin/dock-hotplug script should actually then switch over to the external monitor, you could look at the commands in the file directly.

I unplugged the hdmi from my dock and plugged it back in and now it works fine
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: yawn