Vorher
SSH connect aufbauen
User=root
Passwort=makerbase
Nun die SD-CARD in den HOST-TF Slot schieben
#Directory erstellen
root@mkspi:/# mkdir /media/sdcard
#Filesystem auf der SDCARD erstellen
root@mkspi:/# mkfs.ext4 /dev/mmcblk0p1
y < bestätigen
# Auszug aus der Console
/dev/mmcblk0p1 contains a ext4 file system
last mounted on /home on Mon Jan 9 15:57:22 2023
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 15596544 4k blocks and 3899392 inodes
Filesystem UUID: c1212366-1c50-46a5-a945-0040e5ca0de1
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424
Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done
root@mkspi:/#
#Mount der SD-CARD
root@mkspi:/# mount /dev/mmcblk0p1 /media/sdcard
root@mkspi:/# df -h
Filesystem Size Used Avail Use% Mounted on
udev 417M 0 417M 0% /dev
tmpfs 98M 3.0M 95M 4% /run
/dev/mmcblk1p2 6.6G 4.5G 2.1G 69% /
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
tmpfs 489M 52K 489M 1% /tmp
/dev/mmcblk1p1 256M 107M 150M 42% /boot
/dev/zram1 49M 9.7M 36M 22% /var/log
tmpfs 98M 0 98M 0% /run/user/0
/dev/mmcblk0p1 59G 723M 55G 2% /media/sdcard
root@mkspi:/# rm -Rf /media/sdcard/lost+found
#Kopieren des Home Verzeichnisses mit Berechtigung
root@mkspi:/# cp -a /home/mks /media/sdcard
#Automount der SDCARD nach dem Reboot
root@mkspi:/# echo "/dev/mmcblk0p1 /home ext4 defaults 0 2" >> /etc/fstab
#Umount der SDCARD
root@mkspi:/# umount /media/sdcard
root@mkspi:/# df -h
Filesystem Size Used Avail Use% Mounted on
udev 417M 0 417M 0% /dev
tmpfs 98M 3.0M 95M 4% /run
/dev/mmcblk1p2 6.6G 4.5G 2.1G 69% /
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
tmpfs 489M 52K 489M 1% /tmp
/dev/mmcblk1p1 256M 107M 150M 42% /boot
/dev/zram1 49M 9.7M 36M 22% /var/log
tmpfs 98M 0 98M 0% /run/user/0
#Alles neu Mounten
root@mkspi:/# mount -a
root@mkspi:/# df -h
Filesystem Size Used Avail Use% Mounted on
udev 417M 0 417M 0% /dev
tmpfs 98M 4.2M 94M 5% /run
/dev/mmcblk1p2 6.6G 4.5G 2.1G 69% /
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 489M 0 489M 0% /sys/fs/cgroup
tmpfs 489M 52K 489M 1% /tmp
/dev/mmcblk1p1 256M 107M 150M 42% /boot
/dev/zram1 49M 9.7M 36M 22% /var/log
tmpfs 98M 0 98M 0% /run/user/0
/dev/mmcblk0p1 59G 723M 55G 2% /home
#Neustart des Systems
root@mkspi:/# reboot
Nacher