Sobes.tech
Junior

Τι θα συμβεί μετά την επανεκκίνηση αν ο δίσκος είχε προσαρτηθεί με την εντολή mount;

sobes.tech AI

Απάντηση από AI

After rebooting, the system will not restore the automatic mounting of the disk mounted with the mount command. This is a temporary action. To have the disk mounted automatically at system startup, you need to add the appropriate entry to the /etc/fstab file.

Example entry in /etc/fstab:

# Specify device, mount point, filesystem type, and options
/dev/sdb1  /mnt/mydisk  ext4  defaults  0  2
  • /dev/sdb1: Device or disk partition.
  • /mnt/mydisk: Mount point. The directory must exist.
  • ext4: Filesystem type.
  • defaults: Default mount options (rw, suid, dev, exec, auto, nouser, async).
  • 0: Indicates that the filesystem does not need to be backed up. 1 or 2 indicate that it does.
  • 2: Order of filesystem check at startup. 0 - do not check, 1 - check root, 2 - check others.

Check /etc/fstab configuration without rebooting:

sudo mount -a

This command will attempt to mount all filesystems listed in /etc/fstab that are not already mounted. It helps to identify errors in the file before rebooting.