Tutorial  Updated

How to backup NAND straight to Linux PC

No room for mSD card? Own a 32GB mSD but you have homebrew files in it? Can't do partial NAND restore for <16GB mSD because Hekate won't let you? No Problem!

I'm gonna show you how to backup your Switch NAND straight to Linux PC. It should work on other distro's.

I'll go for Ubuntu as it's easy.


What you need:
A Linux operating system (dual boot or persistent Live USB)
GParted - sudo apt-get install gparted
ddrescue - sudo apt install gddrescue
fusee-nano - precompiled binary
memloader


Backing up NAND


Go to Settings > Power
Set Blank screen to Never. Make sure you turn off Suspend too.

Screenshot_from_2019-03-07_19-46-28.png




Boot your Switch in RCM.
Drop both the precompiled fusee-nano file and memloader.bin into fusee-nano-master repo folder.
Launch Terminal in this directory
Code:
sudo ./fusee-nano memloader.bin

Once it injects the memloader payload to the Switch, pick "ums_emmc.ini".

20190216_132613.jpg



Keep the USB cable plugged in.



Launch GParted,
switch to a 29GB drive, that is an eMMC, remember the drive letter - /dev/sdX
DO NOT TOUCH ANYTHING BELOW. Safely close the window.

Screenshot_from_2019-03-07_19-45-14.png




Go to desktop, press Ctrl + Alt + T (or right click anywhere in the directory you're gonna export to > Open in Terminal)
Input here
Code:
ddrescue -B /dev/sdX SwitchRawNAND.img NAND-backup.log
Replace X with the drive letter of your Switch eMMC.

It will start backing up the NAND.

Screenshot_from_2019-03-07_19-28-09.png



Sit back and relax, it's gonna take about 50 mins.


When it's done, you got a NAND backup. You can now unplug a USB cable.

Screenshot_from_2019-03-07_20-26-49.png



To have a complete backup, don't forget to backup BOOT 0 & 1 partitions with Hekate, they're just 4MB each.


That's it. :)



Restoring NAND

Go back to Ubuntu,

Launch memloader on Switch again,

Input in Terminal
Code:
ddrescue -B SwitchRawNAND.img /dev/sdX NAND-restore.log
PLEASE confirm that you picked the correct drive letter.



If you get a purple screen of death after restoring, don't panic, it's not bricked. It happened to me once when I restored BOOT0&1.

IMG_20181203_195717.jpg



All you do is run GPTrestore and it'll boot fine.
 
Last edited by ,

GerbilSoft

Well-Known Member
Member
Joined
Mar 8, 2012
Messages
2,395
Trophies
2
Age
34
XP
4,250
Country
United States
I'd recommend using ddrescue instead of plain dd. Among other things, it has a progress bar and supports resuming in case the process is interrupted.

Ubuntu package: gddrescue

Syntax:
Code:
$ ddrescue -B /dev/sde NAND.img NAND.log

The third parameter, NAND.log, specifies a logging file. The log file is used to store the current status of the copy, so ddrescue can continue from where it left off in case it's interrupted. (It's also used for error handling in case sectors are unreadable, which is the 'rescue' part of ddrescue, but that shouldn't be too important here.)

EDIT: The -B parameter tells it to use binary suffixes instead of decimal. I'm not sure why ddrescue defaults to decimal (e.g. 1 KB = 1000 bytes), but it seems to be a common thing a lot of systems are doing nowadays for some reason.
 
Last edited by GerbilSoft, , Reason: -B
  • Like
Reactions: Deleted User
D

Deleted User

Guest
OP
I'd recommend using ddrescue instead of plain dd. Among other things, it has a progress bar and supports resuming in case the process is interrupted.

Ubuntu package: gddrescue

Syntax:
Code:
$ ddrescue -B /dev/sde NAND.img NAND.log

The third parameter, NAND.log, specifies a logging file. The log file is used to store the current status of the copy, so ddrescue can continue from where it left off in case it's interrupted. (It's also used for error handling in case sectors are unreadable, which is the 'rescue' part of ddrescue, but that shouldn't be too important here.)

EDIT: The -B parameter tells it to use binary suffixes instead of decimal. I'm not sure why ddrescue defaults to decimal (e.g. 1 KB = 1000 bytes), but it seems to be a common thing a lot of systems are doing nowadays for some reason.
I didn't knew that better imaging command exists. Thanks for suggestion, I'mma edit my post.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: butt