puavo-org / puavo-os

Puavo OS is an disk image based operating system that is built from Debian GNU/Linux and is specifically designed for learning.
https://puavo.org
GNU General Public License v2.0
13 stars 7 forks source link

Formatting usb sticks #612

Open ralf-krause opened 1 year ago

ralf-krause commented 1 year ago

If we take an usb stick, it looks like many other usb sticks. However, it may be formatted in such a way that Puavo cannot use it to save files. We need a tool for Puavo that can reformat any external USB device (pen drive, SD card, USB HDD, USB SSD).

Let's take a closer look at a USB stick.

The stick can have a partition formatted with FAT32, exFAT or NTFS. This stick is fine for reading and writing files with Puavo. You can create folders and subfolders. You can save any file. FAT32 requires the files to be smaller than 4GB, but we don't usually use files of this size in school.

But sometimes we also get sticks formatted with HFS+ (macOS) or ext4 (Linux) at school. We can open folders and read files. But we can't write anything to the USB stick ... no new folder and file. We can open a file and change it, but we can't save our changes. Our stick has wrong format for Puavo. Yes, most people will throw the stick in the trash because the stick is broken.

I tested this with different sticks formatted as FAT32, exFAT, NTFS (Windows 10), HFS+ (macOS) and ext4 (Linux). Yes, I can reformat all of these sticks to FAT32 with Puavo. But if we take a closer look at the HFS+ stick that we reformat to FAT32, we lost some parts of its original size. Only partition 2 will be formatted by right click.

usb-stick-hfs

For my next experiments I copy a MoodleBox image onto a stick https://moodlebox.net/en/. The stick gets 268 MB for the "boot" partition (FAT32) and 2.7 GB for the "MoodleBox by NMA" partition (ext4). When we plug the stick into a Raspberry Pi and turn on the power, the software starts... the MoodleBox automatically enlarges the "MoodleBox by NMA" partition to the maximum. The MoodleBox is a moodle server on the Raspberry Pi and about 20 users can connect at the same time. Now I want to use this stick to store files in Puavo. I need to reformat the USB stick. So I right click on the "boot" partition and format it to FAT32. I do the same with the other partition "MoodleBox by NMA". I get two partitions ... one 268MB and the other 2.7GB. Puavo can now use 3GB on two partitions. But Puavo can't use the remaining 28GB on the stick if it's not in a partition.

No, I can't tell teachers or students in an elementary school that it's easy to format such a stick. They will think the USB stick is damaged and they will throw it away. We need a tool for Puavo that will format any USB stick and SD card.

Yes you can do this with Puavo but no one will know how to do it. I will show this with some pictures. But that's not self-explanatory! I need 9 steps to get back a FAT32 stick.

moodlebox-1

moodlebox-2

moodlebox-3

moodlebox-4

moodlebox-5

moodlebox-6

moodlebox-7

moodlebox-8

moodlebox-9

ralf-krause commented 7 months ago

Do you have any idea how a normal user is able to reformat an usb stick or a microSD card?