Skip to content

Commit 81272b1

Browse files
authored
Merge pull request #66 from chrizzo-hb/main
Added a migration guide for dual SD card setups
2 parents da7eadf + 5f38696 commit 81272b1

6 files changed

+178
-3
lines changed

docs/guides/dual-sd-card-migration.md

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# :material-micro-sd: Dual SD Card Migration
2+
3+
KNULLI runs fine as a single SD card CFW. However, some KNULLI-supported devices have more than one SD card slot which gives you the opportunity to run KNULLI in a dual-SD-card setup.
4+
5+
## Advantages
6+
7+
It is not technically required to run KNULLI in a dual-SD-card setup. However, using two dedicated SD cards for your KNULLI device brings a couple of advantages:
8+
9+
* **Updating** KNULLI is **significantly** easier if all your games, saves, configurations, etc., are stored on a dedicated SD card. You can always simply shut down your KNULLI device, remove your primary SD (which has **only** the OS) and **simply re-flash** it with the newest version without a single worry about your user data. (Technically, for most KNULLI updates it is possible to just do a manual update as explained in the [Update section](../../play/update). However, **some updates require to re-flash**, which will be less of a hassle if you run with a dual-SD setup.
10+
* **Switching devices** is easier. Since some KNULLI-driven device are somewhat different, it might be **required** to **remove your `system` folder** and reboot to re-configure KNULLI from scratch if you migrate to a different device. However, all your games, BIOSes, screenshots, themes, saves, decorations, etc. can still be easily transferred to a new device if you simply plug your old SD 2 into your new device.
11+
* **Backing up your user data** can also be significantly easier if you can simply duplicate the entire SD card, e.g. by drawing an image from your original SD 2 and flashing it onto a new SD card.
12+
13+
## How to migrate
14+
15+
Before you start to migrate, make sure that you have the following tools at hand:
16+
17+
* your KNULLI-driven gaming device
18+
* means to charge your KNULLI-driven device
19+
* a primary KNULLI SD card
20+
* a second SD card ready to be formatted
21+
* a computer
22+
* a working [SSH connection](../../configure/ssh) to your KNULLI device
23+
24+
### Format the second SD card
25+
26+
* Shut down your KNULLI device.
27+
* Add the new SD card that you want to use for your user data into the secondary SD card slot (TF2/Ext.) of your KNULLI device.
28+
* Turn on your KNULLI device.
29+
* Press the ++"Start"++ button to bring up the main menu.
30+
* Go to *System Settings* and find *Frontend Developer Options*.
31+
* In *Frontend Developer Options*, find *Format A Disk* in the *Tools* section.
32+
* In the *Format A Disk* menu,
33+
* make sure to pick your secondary SD card as *Device To Format*. (You should be able to recognize it by its size. **Make sure to not format the "internal" device!**)
34+
* make sure to pick the file system *ext4*. (Technically, it is also possible to format to *exfat*, but we do strongly advise against that, because *exfat* has only **very limited** PortMaster compatibility as explained [here](../../play/add-games).)
35+
* select *Format Now* **after** making the settings above.
36+
* Keep an eye on the upper-right corner of the screen where the formatter will inform you about it's state.
37+
* Reboot your device when the formatter appears to be done: Press ++"Start"++ to bring up the main menu, head to *Quit*, then pick *Restart System*.
38+
39+
### Back up your user data
40+
41+
* Press the ++"Start"++ button to bring up the main menu.
42+
* Go to *System Settings* and find *Backup User Data* in the *Storage* section.
43+
* In the *Backup User Data* menu, set *Target Device* to your secondary SD card (usually, you only have **one single option** here, which corresponds to your secondary SD card).
44+
* Select the *Start* button at the bottom of the screen after setting up your *Target Device*.
45+
* KNULLI will back up your userdata to the second SD card now, **which might take a while**. Depending on the size of your user data folder, it might be required to **plug the charger cable** to make sure that the device will not run out of battery while copying your data.
46+
* When copying is done, you will see a window with the word *Finished* and an *OK* button.
47+
* Hit the *OK* button.
48+
49+
### Move your user data within your secondary SD card
50+
51+
At this point, all your data has already been copied to the second SD card. However, the backup tool creates a folder `batocera` on your SD 2 and stores all your userdata **inside** that folder. Unfortunately, KNULLI expects all this data **outside** of the `batocera` folder, so we have to move all the files now within your SD 2.
52+
53+
This section might look a little bit scary to Linux beginners, because we run a lot of text based commands in this section. However, **don't be scared**, as this guide will lead you through the process.
54+
55+
!!! info "Some basic Linux commands"
56+
In this section, we will use three text-based Linux commands to navigate your data storage and move files around.
57+
58+
* `cd` - means *change directory*, a command to enter or exit directories (also known as folders)
59+
60+
* `ls` - means *list*, a command to list the contents of a directory
61+
62+
* `mv` - means *move*, a command to move files and directories
63+
64+
* Establish your [SSH connection](../../configure/ssh).
65+
* On the SSH prompt, type
66+
```
67+
cd /media
68+
```
69+
and press ++"Enter"++ to navigate into the `media` folder of your KNULLI file system.
70+
* Notice that your prompt has changed to
71+
```
72+
[root@KNULLI /media]#
73+
```
74+
where `/media` indicates which folder you are currently inside of!
75+
* Inside the `/media` folder, type
76+
```
77+
ls -lHa
78+
```
79+
and press ++"Enter"++ to list the contents of the `/media` folder.
80+
* You should see that your `/media` folder contains 3 subfolders: `BATOCERA`, `SHARE`, and `SHARE_1`. The output of the `ls -lHa` command should look something like this:
81+
```
82+
drwxrwxrwt 5 root root 100 Oct 29 22:51 .
83+
drwxr-xr-x 1 root root 160 Oct 29 22:51 ..
84+
drwxr-xr-x 5 root root 4096 Jan 1 1970 BATOCERA
85+
drwxr-xr-x 4 root root 4096 Oct 29 22:53 SHARE
86+
drwxr-xr-x 16 root root 4096 Oct 29 22:05 SHARE_1
87+
```
88+
* One of the two `SHARE` folders corresponds to your SD 1, the other one corresponds to SD 2. Unfortunately, you cannot be sure which is which, so you have to explore both folders to learn, which is which:
89+
* Type
90+
```
91+
ls -lHa SHARE
92+
```
93+
and press ++"Enter"++ to see the contents of the `SHARE` folder, then type
94+
```
95+
ls -lHa SHARE_1
96+
```
97+
and press ++"Enter"++ to see the contents of the `SHARE_1` folder.
98+
* Only **one of them** will give you a very simple list of only 2 folders (`batocera` and `lost+found`) like this:
99+
```
100+
drwxr-xr-x 4 root root 4096 Oct 29 22:53 .
101+
drwxrwxrwt 5 root root 100 Oct 29 22:51 ..
102+
drwxr-xr-x 16 root root 4096 Oct 29 22:05 batocera
103+
drwx------ 2 root root 16384 Oct 29 22:50 lost+found
104+
```
105+
**This is the folder you want, this is your SD 2 folder!**
106+
* Enter your SD 2 folder by typing `cd <name-of-your-sd-2-folder>`, so either
107+
* `cd SHARE` (if your SD 2 folder is `SHARE`) **or**
108+
* `cd SHARE_1` (if your SD 2 folder is `SHARE_1`)
109+
and press ++"Enter"++ to confirm.
110+
* Now, inside `/media/SHARE` (or `/media/SHARE_1`) move all the files from inside the `batocera` folder to the top level of the SD card by typing:
111+
```
112+
mv batocera/{.,}* .
113+
```
114+
(**Mind the spaces in this command, be very precise!**)
115+
* You might see a response like:
116+
```
117+
mv: cannot stat 'batocera/.*': No such file or directory
118+
```
119+
In this case: **Do not be alarmed!**
120+
* Type
121+
```
122+
ls -lHa
123+
```
124+
and confirm with ++"Enter"++ to see the contents of your SD 2 folder. The output should look something like
125+
```
126+
drwxr-xr-x 17 root root 4096 Oct 29 23:34 .
127+
drwxrwxrwt 5 root root 100 Oct 29 23:30 ..
128+
drwxr-xr-x 2 root root 4096 Oct 29 23:34 batocera
129+
drwxr-xr-x 11 root root 4096 Jul 21 04:27 bios
130+
drwxr-xr-x 2 root root 4096 Oct 29 22:05 cheats
131+
drwxr-xr-x 2 root root 4096 Oct 29 22:05 decorations
132+
drwxr-xr-x 2 root root 4096 Apr 12 2024 extractions
133+
drwxr-xr-x 5 root root 4096 Apr 12 2024 kodi
134+
drwxr-xr-x 2 root root 4096 Apr 12 2024 library
135+
drwx------ 2 root root 4096 Jul 21 04:29 lost+found
136+
drwxr-xr-x 2 root root 4096 Oct 29 22:38 music
137+
drwxr-xr-x 172 root root 4096 Oct 29 22:05 roms
138+
drwxr-xr-x 2 root root 4096 Apr 12 2024 saves
139+
drwxr-xr-x 2 root root 4096 Apr 12 2024 screenshots
140+
drwxr-xr-x 2 root root 4096 Apr 12 2024 splash
141+
drwxr-xr-x 13 root root 4096 Oct 29 23:30 system
142+
drwxr-xr-x 2 root root 4096 Oct 29 22:05 themes
143+
```
144+
* **Congratulations!** You have successfully moved all your userdata to the top level of your secondary SD card! Take a moment to be proud of yourself!
145+
* To make sure that there are no leftovers, type
146+
```
147+
ls -lHa batocera
148+
```
149+
and press ++"Enter"++ to list the contents of the `batocera` folder. It should be empty, so it should give you a response like
150+
```
151+
drwxr-xr-x 2 root root 4096 Oct 29 23:34 .
152+
drwxr-xr-x 17 root root 4096 Oct 29 23:34 ..
153+
```
154+
* Close the SSH connection - the hard part is already done!
155+
156+
### Switch KNULLI to external storage
157+
158+
Now, let's get back to your KNULLI device.
159+
160+
* Press the ++"Start"++ button to bring up the main menu.
161+
* Go to *System Settings* and find *Storage Device* in the *Storage* section.
162+
* Switch *Storage Device* from *Internal* to *Any External* or to the **specific** external device you want to use. As before, it is most likely indicated by its size.
163+
* Reboot your KNULLI device to apply the storage change: Press ++"Start"++ to bring up the main menu, head to *Quit*, then pick *Restart System*.
164+

docs/play/add-games/second-sd-card.de.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# :material-micro-sd: Eine zweite SD-Karte verwenden
22

3-
!!! danger "Important: Read this before you proceed!"
3+
!!! danger "Wichtig: Unbedingt lesen!"
44

55
Wenn du eine zweite SD-Karte verwenden willst, empfehlen wir dir **dringend**, sie mit **ext4** zu formatieren und via [**Netzwerkübertragung**](../network-transfer) darauf zuzugreifen. Bevor du anfängst, eine mit exFAT formatierte zweite SD-Karte einzurichten, lies bitte die Warnung im Abschnitt [Spiele hinzufügen](..).
66

7+
!!! info "Zu Dual-SD-Card-Setup wechseln"
8+
9+
Dieser Abschnitt richtet sich an Nutzer, die gerade dabei sind KNULLI zum ersten Mal einzurichten. Falls du bereits eine laufende KNULLI-Installation auf einer einzelnen SD-Karte konfiguriert hast, solltest du lieber einen Blick auf unsere [Anleitung "Zu Dual-SD-Card-Setup wechseln"](../../../guides/dual-sd-card-migration) werfen.
10+
711
Wenn du KNULLI auf einem Gerät installierst, das über zwei SD-Karten-Slots verfügt, kannst du den zweiten Slot für eine zweite SD-Karte nutzen, die dann **anstelle** der *SHARE*-Partition der ersten SD-Karte genutzt werden kann.
812

913
* Schalte dein KNULLI-Gerät aus (falls es noch eingeschaltet ist).

docs/play/add-games/second-sd-card.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
If you want to use a second SD card, we **strongly** recommend to format it to **ext4** and use [**Network Transfer**](../network-transfer) to access it. Before you attempt set up a exFAT-formatted second SD card, pleae make sure to read the warning in the [Add Games](..) section.
66

7+
!!! info "Migrating to a dual SD card setup"
8+
9+
This section is meant for users who are working on their inital KNULLI setup. If you already started setting up KNULLI on a single SD card, you might want to take a look at our [Dual SD Card Migration Guide](../../../guides/dual-sd-card-migration) instead.
10+
711
If you use KNULLI on a device which has a second SD card slot, you may use the second slot for a secondary SD card, which can be used **instead** of the *SHARE* partition of the primary SD card.
812

913
* Shut down your KNULLI device (if it is currently turned on).

docs/play/quick-start.de.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Deine ersten Schritte hängen teilweise davon ab, wie du dein KNULLI-Gerät benu
2626

2727
### 1. Datenspeicher einrichten
2828

29-
Den meisten Nutzern **empfehlen** wir, eine **eiznelne SD-Karte** mit der **Standardformatierung** zu verwenden.
29+
Den meisten Nutzern **empfehlen** wir, eine **einzelne SD-Karte** mit der **Standardformatierung** zu verwenden. Erfahrenen Nutzern, die sich bereits sicher sind, dass sie KNULLI dauerhaft verwenden wollen, **empfehlen** wir eine **2-Karten-Konfiguration** mit **ext4-Formatierung** (Keine Sorge: Es ist auch später noch möglich, von einer 1-SD-Karte-Konfiguration zu einer 2-SD-Karten-Konfiguration zu migrieren, wie in der [Anleitung "Zu Dual-SD-Card-Setup wechseln"](../../guides/dual-sd-card-migration) beschrieben.
3030

3131
Falls du allerdings eine andere Speicherkonfiguration nutzen möchtest, z.B. weil dein Gerät keine W-LAN-Verbindungen unterstützt, kannst du die folgende Tabelle nutzen, um herauszufinden, welche Konfiguration für dich am geeignetsten ist. Sei dir bewusst, dass du deinen Datenspeicher möglicherweise **neu formatieren** musst, bevor du ihn benutzen kannst. Benutze dazu bitte den **eingebauten KNULLI-Formatierer**. Außerdem solltest du beachten, dass du **manuell** zwischen internem und externem Speicher umschalten musst. (Eine genauere Anleitung zum [Wechseln von SD-Karten](../add-games/second-sd-card) und zum [Formatieren](../add-games/formatting) deines Datenspeichers findest du im Abschnitt [Spiele hinzufügen](../add-games).
3232

docs/play/quick-start.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Your first steps will depend on how you want to use your KNULLI device.
2626

2727
### 1. Set up your data storage
2828

29-
For most users, we **recommend** to use a **single SD card** with the **default formatting**.
29+
For beginners, we **recommend** to use a **single SD card** with the **default formatting**. For users who are determined to use KNULLI on the long run, we **recommend** to use a **dual SD card** setup with **ext4** formatting. (Do not worry: It is possible to migrate from a single SD card setup to a dual SD card setup later as explained in the [Dual SD Card Migration Guide](../../guides/dual-sd-card-migration).
3030

3131
However, if you want a different setup, e.g. because your device does not support Wi-Fi, use the table below to determine, which setup suits your needs. Be aware that it might be required to **reformat** the storage before you can use it. Please use the **built-in KNULLI formatter** for this purpose. Also, please be aware that you have to **switch** between internal and external storage **manually**. (You will find detailed instructions on [switching](../add-games/second-sd-card) and [formatting](../add-games/formatting) storages in the [Add Games](../add-games) section.)
3232

mkdocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ plugins:
154154
Patches and Overlays: Patches und Overlays
155155
Basic Inputs: Tasten und Funktionen
156156
Custom Hotkey Shortcuts: Benutzerdefinierte Tastenkombinationen
157+
Dual SD Card Migration: Zu Dual-SD-Card-Setup wechseln
157158
- locale: pl
158159
name: Polski
159160
build: true
@@ -294,6 +295,8 @@ nav:
294295
- Pico-8: systems/pico-8.md
295296
- PortMaster: systems/portmaster.md
296297
- ScummVM: systems/scummvm.md
298+
- Guides:
299+
- Dual SD Card Migration: guides/dual-sd-card-migration.md
297300
- Devices:
298301
- devices/index.md
299302
- Anbernic:

0 commit comments

Comments
 (0)