[QUICK TUTO] How to boot Linux on your Switch

Discussion in 'Switch - Tutorials' started by natinusala, Apr 24, 2018.

  1. Hydr8gon

    Hydr8gon Dragon Trainer

    Member
    8
    Dec 15, 2014
    Canada
    Do you have libusb installed?
    Code:
    sudo apt install libusb-1.0-0-dev
    Also make sure you have pyusb installed for Python 3, and not a different version.
    Code:
    sudo pip3 install pyusb
     
  2. RHOPKINS13

    RHOPKINS13 Geek

    Member
    8
    Jan 31, 2009
    United States
    A small note on the instructions. I recently tried setting up the "Arch with H/W Accel., Chromium, and sudo" rootfs using my Linux system. It comes as a zip file with a .bin file inside.

    Not sure about any of the other images, but that particular image has the full partition table from what appears to be an 8 gig card. If you try to write it to the 2nd partition:
    Code:
    sudo dd if=arch_lxde.bin of=/dev/sdb2
    ...you will end up with a partition with an unrecognized type, and it will fail to boot. I had to write it straight to sdb instead (actually, on my system it's mmcblk0, but you get the idea.) A small nuisance is that the included FAT32 partition has already been used with another Switch, so you'll have to clear that if you don't want Horizon to complain about it. Also, if you wanted a bigger FAT32 partition (I have a 128gb microSD that I wanted to split 64GB Switch / 64GB Linux), you have to move stuff around with GParted afterwards and it takes much longer than if you were able to just write the image straight to the 2nd partition.

    If I sound like I'm ranting, I really don't mean to. Just wanted to get this out there.
     
  3. J-Lit

    J-Lit Newbie

    Newcomer
    1
    May 1, 2018
    United States
    My problem right now is that I can't even get linux onto the switch. Once the "Done. You should see kernel booting on switch soon" after the seemingly successful message comes up my screen stays dark. I can't even get it to the "waiting for root device sdmmcblk0p2" phase without the SD card in as seen in op. I've tried four different usb a to c cables, so I'm convinced my computer is just ass.
     
  4. SapphireExile

    SapphireExile Advanced Member

    Newcomer
    3
    May 2, 2018
    United States
    Plant City, FL
    Just built and loaded the latest 18.04 Ubuntu onto my Switch, and can confirm that everything is working besides a strange bug with the settings menu, that becomes non-interactive on the touchscreen. Still works properly over VNC.

    I can probably upload the tar for 18.04 if anyone wants it. It's slightly more up to date than the one in the repo.
     
    wiiarctus and lordelan like this.
  5. lordelan

    lordelan GBAtemp Psycho!

    Member
    12
    Jan 4, 2015
    Germany
    What are you waiting for? :)
     
  6. dovere

    dovere Advanced Member

    Newcomer
    2
    Apr 26, 2018
    Italy
    How did you get the sound working?
     
  7. SapphireExile

    SapphireExile Advanced Member

    Newcomer
    3
    May 2, 2018
    United States
    Plant City, FL
    Here's the latest Ubuntu 18.04 ready to be a rootfs:
    https://goo.gl/J7pPbw

    — Posts automatically merged - Please don't double post! —

    Sound's not working yet. I'm getting there though.
     
    Last edited by SapphireExile, May 4, 2018
    wiiarctus and lordelan like this.
  8. Benjamin_R

    Benjamin_R Newbie

    Newcomer
    1
    May 1, 2018
    Norway
    Does the tutorial work for the osx? Do not have enough space on my computer for VM. Guess i need to remove stuff if i need to use VM
     
  9. sigboe

    sigboe Advanced Member

    Newcomer
    2
    Feb 3, 2016
    Norway
    The tutorial does not work for OSX, but you can make it work if you are well versed in unix like operating systems.
     
  10. SapphireExile

    SapphireExile Advanced Member

    Newcomer
    3
    May 2, 2018
    United States
    Plant City, FL
    You only need ~5gb if you install any light distros
     
  11. sigboe

    sigboe Advanced Member

    Newcomer
    2
    Feb 3, 2016
    Norway
    Boot Ubuntu from USB with persistence.
     
    lordelan likes this.
  12. SapphireExile

    SapphireExile Advanced Member

    Newcomer
    3
    May 2, 2018
    United States
    Plant City, FL
    According to a kernel log, I should be able to get bluetooth audio functioning within a day or two on the Ubuntu build.
    "switch pulseaudio[2622]: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files"

    First step will be getting that handler, and continuing to debug. I'd rather have Bluetooth audio than no audio at all.
     
    lordelan and nswebfrog like this.
  13. Benjamin_R

    Benjamin_R Newbie

    Newcomer
    1
    May 1, 2018
    Norway
    I forgot that I have a Linux Persistence sdcard. Well, now it will be a lot better.
     
  14. ExploitTnT

    ExploitTnT Devy | YT: DevRin | dev_settings

    Member
    3
    Jul 30, 2017
    Austria
    Guys im gonna try Qemu with MicroXP now wish me luck.
     
    lordelan, SapphireExile and nswebfrog like this.
  15. Type_O_Dev

    Type_O_Dev GBAtemp Advanced Fan

    Member
    7
    Dec 12, 2017
    United States
    did you install mesa with hardware acceleration
     
  16. SapphireExile

    SapphireExile Advanced Member

    Newcomer
    3
    May 2, 2018
    United States
    Plant City, FL
    It's already there by default. As is the touchscreen fix. Screen just needs to be rotated right after you log in.
     
  17. Axido

    Axido GBAtemp Advanced Fan

    Member
    9
    Feb 12, 2014
    Germany
    Could someone please help me with this?

    LinProb.

    As you see it's something someone already asked about a few pages ago. Sadly, the best answer to that was something along the lines of "find out the pid and insert it manually". I found out mine, but I got confused when I took a look at imx_usb.conf. The file does not contain the pid itself, but mostly references other files, some of which don't even exist inside of the usb_loader folder.

    This is the last step before Linux finally boots on the Switch and it would be a shame if this is as far as it gets. So, does anyone have a proper description of the process of changing the pid?
     
  18. ExploitTnT

    ExploitTnT Devy | YT: DevRin | dev_settings

    Member
    3
    Jul 30, 2017
    Austria
    Im right now fixing Qemu for the Switch should i release it then?
     
    lordelan and wiiarctus like this.
  19. Raugo

    Raugo GBAtemp Fan

    Member
    6
    Nov 22, 2014
    That happens to me too. Simply remove the USB and put it back before launch the imx_usb
     
  20. sigboe

    sigboe Advanced Member

    Newcomer
    2
    Feb 3, 2016
    Norway
    Are you meaning qemu running on a computer, that can load arm-linux for switch? Or qemu running on Linux for swtich?
     
Quick Reply
Draft saved Draft deleted
Loading...