Migrate to Atmosphere with new sd card

Thardus

Active Member
OP
Newcomer
Joined
Jun 19, 2018
Messages
37
Trophies
0
Age
39
XP
729
Country
United States
Hello! I'm hoping to be pointed in the right direction. I know this is probably been covered at length in many places but I'm having problems getting started. I bought a v1 switch with a sxos modchip several years ago, not sure what I have exactly, but I can hold Volume+ Power to start SXOS 3.0.5, which boots into emunand.

I have a 512GB microSD card with an Emutendo folder that's 32G, but I also have a sxos folder so I'm not exactly sure if I have the filesystem emunand vs hidden partition emunand. When people say hidden partition are they referring to the disk level partition you can see in a partition manager? Because I don't see that.

I run MacOS so if I make any changes to the sd card I have to run the following commands otherwise I get a black screen after the SXOS screen.

Bash:
dot_clean -m /Volumes/TXNAND/
sudo chflags -R arch /Volumes/TXNAND/
sudo chflags -R noarch /Volumes/TXNAND/Nintendo/

What's strange is I see that in DiskUtility it shows my TXNAND sd card as Windows_NTFS. I was not expecting that. The SD card I'm using is really cluttered and I want to start fresh. It looks like there are failed artifacts from when I messed with it before: several years ago before I upgraded SXOS successfully I thought I needed atmosphere so there are a bunch of atmosphere artifacts floating around.

I think I can save my saved games. I've also backed up my XCIs. I'm curious how I backup the installed games, or I guess maybe I don't need to if they're available again in the hbg shop.

I want to keep OFW untouched and run atmosphere in CFW (holding Volume+ Power to boot into it). It looks like I have access to SXOS boot menu so I can do things like CREATE EmuNAND and Delete EmuNAND though I'm a hesitant to start messing around here since I don't have a dongle or jig; not sure if I need them.

So, I want to set up a fresh 512gb micro sd with atmosphere. I don't think I need to dual boot sxos vs atmosphere but I guess it would be nice to maybe go back to SXOS if I wanted to mess around with it. Do I need to use hekate to make a new emunand and point the sxos loader to that?

I have several other homebrew consoles I set up myself but I need a little help with this one. Thanks!

EDIT: my current CFW SXOS version is 10.2.0
 
Last edited by Thardus,

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,418
Trophies
3
Age
46
Location
At my chair.
XP
19,039
Country
Colombia
use search at top of page and search for migrate sxos to atmosphere, there are two tutorials about you are asking, even there is one for have atmosphere and SXOS at same time.
 

Thardus

Active Member
OP
Newcomer
Joined
Jun 19, 2018
Messages
37
Trophies
0
Age
39
XP
729
Country
United States
use search at top of page and search for migrate sxos to atmosphere, there are two tutorials about you are asking, even there is one for have atmosphere and SXOS at same time.
Yes, I know the title of my thread seems redundant. Did you happen to read my post? If I mess up any steps, am I locked out of the console unless I have the dongle/jig? Can I or should I get my current set up working with a new SD card, then migrate to atmosphere? Thanks
 

Thardus

Active Member
OP
Newcomer
Joined
Jun 19, 2018
Messages
37
Trophies
0
Age
39
XP
729
Country
United States
Wow, I learned a lot tinkering with this. I think I'm starting to get it now, haha. The title of the OP probably should have been "How do I back up and restore working SXOS sd card to new sd card from scratch on Mac/Linux" or something. I know there are a bunch of Windows tools but I didn't see much in the way of MacOS probably because most can be done through command line.

I realized you can't just have SXOS create your new emunand with CFW on a new sd card because where will it get it from? It will set up your new sd card partitions for emunand correctly but I believe it just copies your OFW sysnand to your CFW emunand after it partitions everything for you. Which won't work if you have a newer, more recent OFW version. Maybe this isn't correct but I think that's what happened. I would get a black screen after SXOS load screen no matter if I had the correct contents (Emutendo/, Nintendo/, switch/, boot.dat, license.dat) on the visible FAT32/Windows_NTFS/vfat/whatever filesystem portion.

I wanted to understand what I had first before I started messing around with the working sd card so I did a full raw clone of the directly to a new card (which took forever, about 11 hours. BalenaEtcher speed was a ~1MB/s faster).

sudo dd if=/dev/rdisk2 of=/dev/rdisk3 bs=16M

Then I noticed the "hidden partition" when I stared at the output of "diskutil list" again. I don't know why I didn't notice this before...

# on MacOS this will show a ~31.3GB size difference between the disk (511.9GB) and the partition (480.6GB)
$ diskutil list /dev/disk2
/dev/disk5 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *511.9 GB disk2
1: Windows_NTFS TXNAND 480.6 GB disk2s1

When others referred to the "hidden partition" I was confused because it's not a partition in the context I thought it was. It's just the first bytes (0 to 31276925952, and starting at 0, size 1 MBR)

I had Disk Drill for MacOS installed and was able to see and backup an unallocated RAW partition in the following byte range that it saw, 0 to 31276925952. I exported the raw hidden partition to my system as hidden_emunand.dmg. This could have been done with the right "dd" shell command, something like:

sudo dd if=/dev/rdisk2 of=hidden_emunand.dmg bs=1 count=31276925953 # +1 because I think count starts at 1 instead of 0

"dd" here is slow because of the bs=1 but it's more accurate. I think I could have increased the block size but then I wasn't sure about ending on the correct byte. If you used bs=512 (the default) it wouldn't have ended on the exact byte. It was pretty easy with Disk Drill once I found it in their UI.

At this point I messed up my full clone when trying a bunch of gpt commands. So I erased it with disk utility FAT MBR on the mac just to be sure. But now I have my actual raw copy of the working emunand so instead of waiting all day to clone again, I just used that to rebuild a new working fresh from scratch SXOS sd card. (Overkill I guess since I'll be just switching to atmosphere but I wanted to know how it works. Now I can just store the 32GB SXOS emunand as a backup that I'll probably never use again, haha.)

## from original TXNAND micro sd card
sudo gpt -r show /dev/disk2
start size index contents
0 1 MBR
1 61087745
61087746 938655742 1 MBR part 7

Now that I had the hidden emunand backup ready, I copied it to my new micro sd card device (/dev/rdisk3) using "dd"

sudo dd if=hidden_emunand.dmg of=/dev/rdisk3 bs=16M status=progress #This transferred pretty fast. A little over 6 minutes at 81 MB/s.

Now I had to fix the visible FAT partition after this. I didn't have 'parted' on my mac so I plugged the new sd card in my steam deck. Linux FTW. haha. (Now I'm working with device /dev/mmcblk0)

I had to remove the index=1 partition and then recreate

parted /dev/mmcblk0 rm 1
parted /dev/mmcblk0 mkpart primary 61087746s -- -1s # or this should have worked parted /dev/mmcblk0 mkpart primary 61087746s 1001390080s

Then...

mkfs.fat /dev/mmcblk0p1

#lsblk ended up looking something like this
lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
mmcblk0
└─mmcblk0p1 vfat FAT32


Now back on the Mac, just copy the correct contents (Emutendo/, Nintendo/, switch/, boot.dat, license.dat).

(I renamed my new FAT32 partition to SWITCH)

Don't forget to
dot_clean -m /Volumes/SWITCH
sudo chflags -R arch /Volumes/SWITCH
sudo chflags -R noarch /Volumes/SWITCH/Nintendo/

Now my "from scratch" sd card boots SXOS CFW like my original sd card but without all the cruft. I have a smaller backup of the working sxos emunand and I understand what's going on better.

I hope this helps someone. Maybe me in the future.

On to atmosphere.
 
  • Wow
Reactions: impeeza

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    Biomutant looks cool tho, may have to try that
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
    K3Nv2 @ K3Nv2: @BigOnYa...