1. blaze5

    OP blaze5 Member
    Newcomer

    Joined:
    Nov 27, 2016
    Messages:
    42
    Country:
    United States
    I've set up Atmosphere and L4T Ubuntu on separate SD cards which works fine, but I'd like to keep everything on a single SD card and boot between them with Hekate. Right now, I have a boot partition (FAT32), L4T Ubuntu partition (EXT4), Atmosphere SD partition (exFAT), and a Linux Swap partition at the end. When I launch L4T Ubuntu from the main boot partition, it loads from the separate EXT4 partition, but is there a way to have Atmosphere load a specific partition through the ini configuration or patch? It looks like everything in the ini configurations points to files on the same partition and can't specify other partitions.

    Pretty much everything I've found for Atmosphere partitions is setting up partitions for emuMMC which I can always try later, but mainly I just want a large SD partition in Horizon and don't need emuMMC at the moment. Does the Atmosphere SD partition need to be the first partition on the SD card then? The L4T Ubuntu boot rom can use multiple partitions, but maybe it's not possible for Atmosphere to use other SD partitions without patches. If this is the case, I can always resize my partitions with gparted or something. I just thought it was better to isolate everything to separate partitions.

    On a somewhat unrelated note, I may switch my Atmosphere SD partition back to FAT32 for homebrew stability, but the 2 GB file size limit is annoying and homebrew has been running pretty well for me so far.
     
  2. Masamune3210

    Masamune3210 GBAtemp Regular
    Member

    Joined:
    Apr 23, 2016
    Messages:
    126
    Country:
    United States
    Easiest way is to just test your questions on a clean sd card. The most you have to lose is it not working as long as you back everything up. BTW FAT32 file size limit is 4GB, not 2GB
     
  3. wstlxx

    wstlxx Member
    Newcomer

    Joined:
    Apr 29, 2019
    Messages:
    11
    Country:
    China
    Go search for noob-freindly L4T ubuntu
    Acctually ,I believe that even more than 2 systems could exist at the same time, didn't try though
     
  4. mettalik

    mettalik Member
    Newcomer

    Joined:
    Jul 23, 2019
    Messages:
    34
    Country:
    France
    Same question. I dont want to create a new topic so UP :D
     
  5. blaze5

    OP blaze5 Member
    Newcomer

    Joined:
    Nov 27, 2016
    Messages:
    42
    Country:
    United States
    I figured this out over the past few weeks. I've seen the info scattered in a bunch of places, so I'll compile it and put together a guide. I have reboot2payload working for Atmosphere, L4T Ubuntu, and Switchroot Android.
     
    enderer likes this.
  6. mettalik

    mettalik Member
    Newcomer

    Joined:
    Jul 23, 2019
    Messages:
    34
    Country:
    France
    the problem is i need to format my sdcard.
    I will put l4t on a another sd....
     
  7. Philliyxx

    Philliyxx GBAtemp Fan
    Member

    Joined:
    Sep 21, 2018
    Messages:
    311
    Country:
    United States
  8. blaze5

    OP blaze5 Member
    Newcomer

    Joined:
    Nov 27, 2016
    Messages:
    42
    Country:
    United States
    @Philliyxx I had come across that script after I had set everything up. It seems convenient, though it doesn't look like it lets you choose the size for any of the partitions like I did (basically all leftover space gets allocated to Android). I did basically everything with dd, fdisk, gdisk, and this script that lets you explicitly set the size of the Android userdata partition (https://github.com/Gabri3lZ/SwitchrootAndroidUtils). I basically allocated most of my space (100 GB of my 256 GB microSD) to Horizon since I can mount the Horizon partition in Ubuntu and left 50 GB for Android.

    @mettalik What do you have on your current microSD card? Just Atmosphere and maybe emuMMC? If you just want to add Ubuntu I can easily tell you what you need to do, but if you also want Android it's a little more involved. You can create new partitions with gparted and don't need to erase your card, though it would be a good idea to do a dd backup first. I did everything from an Ubuntu 18.04 VM.

    I'll try to create a basic guide and automate it when I get some time.

    Edit:
    This post (https://gbatemp.net/threads/setup-g...c-bigger-fat32-partition.544981/#post-8740835) covers modifying the l4t-ubuntu boot.scr to point to the correct partitions. You should be able to create a new partition for Ubuntu at the end of your SD card using gparted (with some swap at the very end ideally) and then just dd the image file to your new partition (e.g. "sudo dd if=switchroot-l4t-ubuntu-3.0.0-full-2020-03-01.img of=/dev/sdbX bs=4096 skip=Y status=progress" where X is the partition you created for Ubuntu and Y is the offset where the Ubuntu partition within the image starts). After you dd the image to the partition, you can use gparted to expand the Ubuntu partition to full size if it isn't already

    To calculate the offset, run fdisk on the switchroot-l4t-ubuntu.img file and find the starting sector of the Ubuntu partition in that image. Then multiply the start sector by 512 (512 bytes per sector) and divide that by your block size (4096 is what I used). That is the skip value which tells dd to skip that many blocks into the image before it starts to copy it over. The same principle applies to Android, but it's a little more involved with the hybrid MBR and additional partitions.

    You can mount the first partition in the switchroot-l4t-ubuntu.img file and copy the files over to your Horizon partition. Then edit the boot.scr to point to the correct partition in the post I referenced above.
     
    Last edited by blaze5, Apr 3, 2020
  9. lulle2007200

    lulle2007200 Member
    Newcomer

    Joined:
    Dec 1, 2017
    Messages:
    25
    Country:
    Germany
    If there is leftover space, the script gives you the option to extend all partitions however you like. If there is still leftover space *after* you changed partition sizes, it gets assigned to the hos_data partition.
     
  10. blaze5

    OP blaze5 Member
    Newcomer

    Joined:
    Nov 27, 2016
    Messages:
    42
    Country:
    United States
    Oh nice. Thanks for making a flexible, easy to use script to set this up. I'm glad to have gone through the process doing it manually just to get the experience, but this would have saved me a lot of time had I started with it and it's way more accessible for anyone to get into.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Atmosphere, Ubuntu,