Solution: How to Permanently Mount & Rename USB Drives on ZimaOS (Bypassing Read-Only Issues)
Hello bungo,
If you already want to mount the USB drives permanently, try the following instructions. It worked for me.
I successfully managed to permanently mount and rename two external USB drives (/dev/sdb1 and /dev/sdc1) on ZimaOS, bypassing an initial Read-Only file system restriction on the root directory (/).
This process forces ZimaOS to use consistent mount points (/media/USB_1, /media/USB_2) and names (USB_1, USB_2) instead of generic automatic names.
Phase 1: Overcoming the System’s Read-Only Restriction
The system’s root partition (/) was read-only, preventing the creation of new folders under /mnt.
- Workaround: We used the alternative standard directory for external media,
/media, which was writeable.
- Action: Create the desired mount point directories:
sudo mkdir -p /media/USB_1
sudo mkdir -p /media/USB_2
Phase 2: Correcting Drive Labels (The Crucial Step)
The main issue was that the drives were labeled generically (e.g., 1.44.1-72806), which did not match the desired names in /etc/fstab.
- Unmount Drives: Disconnect the drives from the file system to safely change their labels.
sudo umount /dev/sdb1
sudo umount /dev/sdc1
- Rename/Label Drives: Since the drives use the
ext4 filesystem, we used e2label to rename them, ensuring they match the future fstab entries:
`Rename the first drive
sudo e2label /dev/sdb1 USB_1
Rename the second drive
sudo e2label /dev/sdc1 USB_2
Phase 3: Permanent Mounting via /etc/fstab
We added the permanent configuration to ensure the drives are mounted automatically on every boot.
-
Edit fstab: Open the configuration file:Bashsudo nano /etc/fstab
-
Add Entries: Insert these lines. You can also add a comment line (#) to explain the six fields:
Code-Snippet# <Source> <Mount Point> <Type> <Options> <Dump> <fsck Order># LABEL=USB_1 /media/USB_1 ext4 defaults,nofail,x-systemd.automount 0 0 LABEL=USB_2 /media/USB_2 ext4 defaults,nofail,x-systemd.automount 0 0
IMPORTANT NOTE on Formatting: Please ignore the exact number of spaces between the entries. Linux only requires at least one space or a tab to separate the six fields. Both one space and many spaces (for cleaner column alignment) are technically correct.
(Note: The nofail option is critical, preventing boot failure if a drive is disconnected.)
- Reload & Mount: Instruct the system to reload the new configuration and apply the mount.
sudo systemctl daemon-reload
sudo mount -a
Phase 4: Verification
The drives are now permanently mounted and consistently named:
df -h | grep USB
Expected Output: showing /media/USB_1 and /media/USB_2
Result: The drives are now properly identified and mounted in the desired locations, overriding the automatic ZimaOS mounting. Hope this helps anyone facing similar issues!