Golden Codes - armanexplorer planet

Practical code snippets for Django, Python, Bash, Git and All!

View on GitHub

step by step to mount permanently

1. Identify the Drive and Mount Point:

2. Find the Device's UUID (Optional but recommended):

sudo blkid

3. Edit the fstab File (carefully):

sudo nano /etc/fstab
sudo cp /etc/fstab /etc/fstab.bak

4. Add a New Line for the Mount:

<device> <mount_point> <filesystem_type> <options> <dump> <fsck>

Here's what each part means:

Example:

UUID=03ec5dd3-45c0-4f95-a363-61ff321a09ff /media/mydrive ext4 defaults 0 2

5. Save and Close the File:

6. Verify and Mount the Drive (Optional):

sudo mount -a

7. Reboot (Optional):

Remember: Editing the fstab file requires caution. Typos or errors can lead to boot failures. It's recommended to double-check your entries before saving. If you're unsure, consult the fstab man page with man fstab for detailed information on options and usage.

dump and fsck

The <dump> and <fsck> options in the /etc/fstab file on Linux systems control how the system handles backups and filesystem checks for mounted partitions. Here's a detailed explanation of their individual meanings:

(Field 5):

(Field 6):

Example:

A typical /etc/fstab entry for a data partition might look like this:

UUID=03ec5dd3-45c0-4f95-a363-61ff321a09ff /media/mydrive ext4 defaults 0 2

In this example:

Important Points:

mount ntfs3

First instal lthe ntfs-3g package (advised by Debian)

sudo apt-get install ntfs-3g