User Tools

Site Tools


gcode_storage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gcode_storage [2024/10/18 13:12] tortegcode_storage [2025/01/21 12:27] (current) torte
Line 1: Line 1:
-===== Sovol KlipperScreen ===== +{{page>redirect#this_wiki_has_moved}} 
-==== GCode storage ====+https://torte71.github.io/InsideSovolKlipperScreen/gcode_storage.html 
 +{{page>redirect#section}} 
 +---- 
 + 
 +===== Sovol KlipperScreen (Makerbase MKS KLIPAD50) ===== 
 +==== Expand G-Code storage space ==== 
 + 
 +Experienced Linux users: Scroll down to [[#for_the_linux_gurus|For the linux gurus]] for a short sum-up what is required. 
 + 
 +----
  
 Sovol's KlipperScreen uses an 8GB emmc card for storage, of which about 7GB are used by the system. Sovol's KlipperScreen uses an 8GB emmc card for storage, of which about 7GB are used by the system.
Line 63: Line 72:
     * run ''cfdisk /dev/sda'', it should give a screen like this:     * run ''cfdisk /dev/sda'', it should give a screen like this:
 {{ wiki:cfdisk_main.png }} {{ wiki:cfdisk_main.png }}
-    * Press "T" (for "Type"). This takes you to a selection screen:+  * Press "T" (for "Type"). This takes you to a selection screen:
 {{ wiki:cfdisk_types01.png }} {{ wiki:cfdisk_types01.png }}
-    * Scroll down and select ''83 Linux'' (by pressing ENTER).+  * Scroll down and select ''83 Linux'' (by pressing ENTER).
 {{ wiki:cfdisk_types02.png }} {{ wiki:cfdisk_types02.png }}
-    * Now the cfdisk screen should look like this: +  * Now the cfdisk screen should look like this: 
-{{ wiki:cfdisk_types02.png }} +{{ wiki:cfdisk_final.png }} 
-    * Press "W" (for "Write, you may need to press SHIFT as well). +  * Press "W" (for "Write, you may need to press SHIFT as well). 
-    * Press "Q" to quit cfdisk.+  * Type in "yes" to confirm and press ENTER 
 +  * Press "Q" to quit cfdisk. 
 +  * We need to unmount that drive again (because the automounter detected the partition change): 
 +    * ''umount /home/mks/printer_data/gcodes/USB'' 
 +    * ''umount /home/mks/printer_data/gcodes/USB_1'' 
 +    * Reassure that it is not mounted any longer by running ''lsblk'' 
 +  * Now we can format the partition to the ext file system: 
 +    * ''mkfs.ext4 /dev/sda1'' 
 +    * It will ask for confirmation (press "y" to confirm): 
 +<code> 
 +mke2fs 1.47.0 (5-Feb-2023) 
 +/dev/sda1 contains a vfat file system labelled 'VOLUME' 
 +Proceed anyway? (y,N) y 
 +Creating filesystem with 1958144 4k blocks and 489600 inodes 
 +Filesystem UUID: b6164916-9a97-42d6-b270-172020e45486 
 +Superblock backups stored on blocks: 
 +        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 
 + 
 +Allocating group tables: done 
 +Writing inode tables: done 
 +Creating journal (16384 blocks): done 
 +Writing superblocks and filesystem accounting information: done 
 +</code> 
 +  * Once again unmount the usb-drive (automounter detected the formatting process): 
 +    * ''umount /home/mks/printer_data/gcodes/USB'' 
 +    * ''umount /home/mks/printer_data/gcodes/USB_1'' 
 +    * Reassure that it is not mounted any longer by running ''lsblk'' 
 +  * Find out the partitions UUID: ''ls -l /dev/disk/by-uuid/''.\\ The output should look like this: 
 + 
 +<code> 
 +lrwxrwxrwx 1 root root 15 Oct 18 10:54 AADC-9503 -> ../../mmcblk1p1 
 +lrwxrwxrwx 1 root root 15 Oct 18 10:54 b45e999f-5a77-4788-8645-076f13ec1a4e -> ../../mmcblk1p2 
 +lrwxrwxrwx 1 root root 10 Oct 18 11:04 b6164916-9a97-42d6-b270-172020e45486 -> ../../sda1 
 +</code> 
 +  * Here, the required UUID is ''b6164916-9a97-42d6-b270-172020e45486'' (points to "sda1"). 
 +  * Edit ''/etc/fstab'' and add the definition for our drive: 
 +    * ''nano /etc/fstab'' 
 +    * Add this new line to the bottom.\\ Make sure to use the real UUID from the last step, not this example! 
 +<code>UUID=b6164916-9a97-42d6-b270-172020e45486 /home/mks/printer_data/gcodes ext4 defaults,nofail,x-systemd.device-timeout=9 0 0</code> 
 +  * To save and exit, press "CTRL+X", confirm by pressing "y" and confirm the filename by pressing "ENTER" 
 +  * Mount the usb-drive: 
 +    * ''mount /home/mks/printer_data/gcodes'' 
 +  * Adjust the access rights of the usb-drive's filesystem: 
 +    * ''chown -R mks:mks /home/mks/printer_data/gcodes'' 
 + 
 +Now let's check, if everything works as expected: \\ 
 +Reboot the device. 
 + 
 +In Mainsail, the "G-CODE FILES" tab should show an empty list and a lot of free space (about 6.9GB for a 8GB card as in this example). Remember to use the "refresh current Directory" button. 
 +Do a small test print. There shouldn't be any error messages and the new gcode file should show up. 
 + 
 +Shut down the device, remove the usb-drive and power up the device again: 
 +It should boot without problems. In Mainsail, the list of gcode files should now show the files, that have been there before all these steps. Remember to use the "refresh current Directory" button. 
 + 
 +If everything is OK, power off the device, insert the usb-drive again and power it up. 
 +We are done. 
 + 
 +=== Things to keep in mind === 
 +  * From now on, the automounter will ignore this specific drive (because it is managed by the system, the ''/etc/fstab'' file) 
 +  * All other usb-drives will be used by the automounter as before, i.e. they will be mounted as a subdirectories "USB" under the "gcodes" directory 
 +  * Only remove the usb-drive after shutting down the device 
 +  * If the usb-drive was not plugged in during boot, you will either have to mount it manually (''sudo mount /home/mks/printer_data/gcodes'') - or just reboot the device with the usb-drive plugged in. 
 +  * By default, you cannot access the files on the usb-drive by Windows. But there are several free programs that allow it (e.g. SysInternals LinuxReader or Ext2explore), just search the web for "windows ext4"
 + 
 + 
 +=== For the linux gurus === 
 +  * Set the partition type to "83 linux"
 +  * Format the partition to "ext", e.g. ext4 (a filesystem with linux access rights is required). 
 +  * Make sure to unmount after each step (automounter is still active) 
 +  * In ''/etc/fstab'' use the parameters ''nofail,x-systemd.device-timeout=9'' to allow booting if that drive is not inserted 
 +  * Use the partitions UUID in ''/etc/fstab'', this makes the automounter ignore this drive 
 +  * Make the filesystem writable for users (''chown -R mks:mks <YOUR_MOUNTPOINT>''). 
  
 +=== A last tip ===
 +When there is no usb-drive inserted, create a directory called "_NO_USB_MOUNTED_" (or whatever name you like) in the gcode directory. If the usb-drive is not inserted or broken, this directory will be visible and you know, that gcode files will not end up on the usb-drive, but on the internal file system.
gcode_storage.1729249936.txt.gz · Last modified: 2024/10/18 13:12 by torte