[QUICK TUTO] How to boot Linux on your Switch

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

  1. Tommy084

    Tommy084 GBAtemp Regular

    Member
    4
    Feb 24, 2013
    Norway
    Have you placed "ehci_patch.py" script in same folder as the "linux-ehci-enable-large-ctl-xfers.patch"?
    I dont use wm, pc with ubuntu 18.04
    Comman i use is: sudo python ehci_patch.py -t

    Code:
    sudo python patch.py -t
    0xffffffffb0b4b610L
    make -C /lib/modules/4.15.0-20-generic/build M=/home/ubuntu/OPT/Switch/shofel2_linux modules
    make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
      CC [M]  /home/ubuntu/OPT/Switch/shofel2_linux/patch.o
      Building modules, stage 2.
      MODPOST 1 modules
    WARNING: modpost: missing MODULE_LICENSE() in /home/ubuntu/OPT/Switch/shofel2_linux/patch.o
    see include/linux/module.h for more information
      CC      /home/ubuntu/OPT/Switch/shofel2_linux/patch.mod.o
      LD [M]  /home/ubuntu/OPT/Switch/shofel2_linux/patch.ko
    make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
    About to insert patch module, 'Operation not permitted' means it probably worked, check dmesg output.
    insmod: ERROR: could not insert module patch.ko: Operation not permitted
    
     
    Last edited by Tommy084, May 2, 2018
  2. J-Lit

    J-Lit Newbie

    Newcomer
    1
    May 1, 2018
    United States
    Yeah that's the output I get from running the script too. The script is in my shofel2_linux folder and it makes a bunch of other files. When I run sudo ./boot_linux.sh my switch never boots linux even though the terminal says success.

    Actually my last line is:
    insmod: ERROR: could not insert module patch.ko: Required key not available

    I'm not sure if it matters though
     
    Last edited by J-Lit, May 3, 2018
  3. MrWhosHacking

    MrWhosHacking GBAtemp Regular

    Member
    3
    May 3, 2018
    United States
    I using NXLoader on Nvidia shield usb works fine but it stays on the exploited logo then idk . What do I have to do I download the
    shofel2_linux file


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

    I need help please. I’m on windows 10 I went to shofel2 Linux and download the Linux file used the Etcher to sdcard zip file what am I doing wrong
     
    Last edited by MrWhosHacking, May 3, 2018
  4. natinusala
    OP

    natinusala Win32 error 31 is not an error

    Member
    11
    Dec 1, 2012
    France
    Whoops, my bad - fixed the first post
     
    RHOPKINS13 likes this.
  5. sigboe

    sigboe Advanced Member

    Newcomer
    2
    Feb 3, 2016
    Norway
    @natinusala Is there a way to mount NAND backups as loop partitions in Linux yet?
     
    Tommy084 likes this.
  6. BR6

    BR6 Member

    Newcomer
    1
    Oct 13, 2016
    Can anyone confirm a rpi3 boot linux onto the rcm switch
     
  7. ExploitTnT

    ExploitTnT Devy | YT: DevRin | dev_settings

    Member
    3
    Jul 30, 2017
    Austria
    Try "Ubuntu Mate" i hope this will work for rpi3
     
  8. natinusala
    OP

    natinusala Win32 error 31 is not an error

    Member
    11
    Dec 1, 2012
    France
    Linux can certainly read the NAND as backup scripts for Linux can be found here. But as to say that they can be _mounted_... I don't even know if it's a known filesystem. Anyway you'll need keys to decrypt the NAND. Some work needs to be done here.
     
  9. apple_juice

    apple_juice Newbie

    Newcomer
    1
    May 3, 2018
    Czech Republic
    Anyone encountered this issue?

    Code:
    aaaa@ubuntu:/mnt/hgfs/b_hunter/linux_switch/shofel2/usb_loader$ sudo ../../imx_usb_loader/imx_usb -c .
    config file <./imx_usb.conf>
    vid=0x0955 pid=0x701a file_name=switch.conf
    config file <./switch.conf>
    parse ./switch.conf
    Trying to open device vid=0x0955 pid=0x701a
    Interface 0 claimed
    HAB security state: development mode (0x56787856)
    == work item
    filename ../../linux/arch/arm64/boot/Image.gz
    load_size 0 bytes
    load_addr 0x83000000
    dcd 0
    clear_dcd 0
    plug 0
    jump_mode 0
    jump_addr 0x00000000
    == end work item
    
    loading binary file(../../linux/arch/arm64/boot/Image.gz) to 83000000, skip=0, fsize=831079 type=0
    
    <<<8589433, 8589433 bytes>>>
    succeeded (security 0x56787856, status 0x88888888)
    HAB security state: development mode (0x56787856)
    == work item
    filename ../../linux/arch/arm64/boot/dts/nvidia/tegra210-nintendo-switch.dtb
    load_size 0 bytes
    load_addr 0x8d000000
    dcd 0
    clear_dcd 0
    plug 0
    jump_mode 0
    jump_addr 0x00000000
    == end work item
    
    loading binary file(../../linux/arch/arm64/boot/dts/nvidia/tegra210-nintendo-switch.dtb) to 8d000000, skip=0, fsize=a040 type=0
    
    <<<41024, 41024 bytes>>>
    succeeded (security 0x56787856, status 0x88888888)
    HAB security state: development mode (0x56787856)
    == work item
    filename switch.scr.img
    load_size 0 bytes
    load_addr 0x8e000000
    dcd 0
    clear_dcd 0
    plug 0
    jump_mode 1
    jump_addr 0x8e000000
    == end work item
    
    loading binary file(switch.scr.img) to 8e000000, skip=0, fsize=162 type=aa
    
    <<<354, 354 bytes>>>
    succeeded (security 0x56787856, status 0x88888888)
    jumping to 0x8e000162
    failed (security 0x56787856, status 0x33050a00)
    
     
  10. Mittytoto

    Mittytoto Member

    Newcomer
    2
    Apr 27, 2018
    New Zealand
    Auckland
    Have you built the kernel i.e. the linux folder? The message clearly said that it couldn't find the kernel. You could avoid this hassle by using the prebuilt kernel. Just search for shofel2_linux in this thread.
     
    apple_juice likes this.
  11. justinbug2

    justinbug2 GBAtemp Advanced Fan

    Member
    5
    Jun 9, 2015
    United States
    lordelan and natinusala like this.
  12. natinusala
    OP

    natinusala Win32 error 31 is not an error

    Member
    11
    Dec 1, 2012
    France
    I will try this out and write a super simplified Windows guide (if someone isn't faster than me at least), thanks for reporting !
     
  13. apple_juice

    apple_juice Newbie

    Newcomer
    1
    May 3, 2018
    Czech Republic
    actually, I did compile the kernel, thats why im asking, im using VMware btw
     
  14. Mittytoto

    Mittytoto Member

    Newcomer
    2
    Apr 27, 2018
    New Zealand
    Auckland
    And the folder named exact "linux" and it sits right next to the shofel2 folder? I am asking because the loader config files are looking for those exact. If you notice the git clone commands on the OP, some of them need to have the local folder names different from the repo names.
    Alternatively, you can update the loader config to match your folders structure. There is a post from @cmsj of how to make it load the kernel from SD, which you may find it handy.
     
    Last edited by Mittytoto, May 3, 2018
  15. Giodude

    Giodude GBAtemp's official rock

    Member
    11
    GBAtemp Patron
    Giodude is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    May 17, 2015
    United States
    New York
    what would be the best version of libssl-dev to download while on an ubuntu vm?
     
  16. natinusala
    OP

    natinusala Win32 error 31 is not an error

    Member
    11
    Dec 1, 2012
    France
    What are the possibilities ? I'd say openssl but I don't know if it really matters anyway.
     
  17. Giodude

    Giodude GBAtemp's official rock

    Member
    11
    GBAtemp Patron
    Giodude is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    May 17, 2015
    United States
    New York
    I have absolutely no clue what I'm doing.
     
  18. SapphireExile

    SapphireExile Advanced Member

    Newcomer
    3
    May 2, 2018
    United States
    Plant City, FL
    Just get the latest.
    Code:
    sudo apt-get install libssl-dev
     
    Giodude likes this.
  19. Davelo

    Davelo Advanced Member

    Newcomer
    4
    Feb 10, 2018
    Bahrain
    Can someone tell me what is the default password for linux ? My username by default is “alarm”
     
  20. EpicLPer

    EpicLPer Nice unless you give me a reason to hate you ;)

    Member
    6
    Mar 13, 2015
    Austria
    Austria
    alarm = alarm
    root = root
     
Loading...