Mounting a Hard Drive on Ubuntu Linux During Boot with Shell

The line required for mounting a device consists of six fields which are separated by a space or tab. These fields include the device reference (either device name, UUID or LABEL), the folder where the device will appear, the file system, mount options, the “dump” flag, and the priority for file system check during system startup. Alternatively, you can have more control over your mounts by editing the file and specifying different mount options.


Solution 1:

  1. – Paragraph one introduces the topic.
    – Preceding the first paragraph is an introductory statement.
    – Paragraph two delves deeper into the subject matter.
    – Preceding the second paragraph is an opening statement.
    – Paragraph three provides further insights.
    – Preceding the third paragraph is an initial statement.
  2. Start


    Startup Applications


    (search in Dash or select from the gear-menu on top unity panel), click

    Add

    and in the

    Add Startup Program

    window fill the required fields. (In the

    Command

    field specify the full path of the script, but here simply using

    mountSDA6.sh

    should work as it’s created in your

    $HOME/bin

    directory. Or you instead of creating script, just use the command to mount here in the

    Command

    field.) Click on

    Add

    and you’re done. On next log-on the partitions should be mounted.

    snap1


In lieu of that, you have the option to modify the

/etc/fstab

document which allows for greater management of your mounts through the specification of diverse mounting choices.


Solution 2:

Use

sudo mkdir -p /media//

First, generate the route. Afterward, access the /etc/fstab file.

sudo  /etc/fstab

and add

/dev/sda3 /media//  defaults 0 0

to the end. Type then

sudo mount -a

to validate /etc/fstab immediately.

To gain further insights, refer to the resource titled “Creating the /etc/fstab File.

Frequently Asked Questions