Results 1 to 6 of 6

Thread: Mount a USB memory device at boot time

  1. #1

    Default Mount a USB memory device at boot time

    opensuse 42.3
    linux 4.4.92-31-default x86_64

    I have two 128GB USB memory devices installed semi-permanently for backups. They are rotated occasionally for offsite storage. I would like to (auto-)mount the devices when the system boots.

    Currently after a restart, the USB devices are not assigned a /dev/disk slot. They do have a label text assigned but that appears to be insufficient for "mount" using the "--label" option.

    How do I mount the removable devices at boot time?
    Or, if there is no way at boot, how do I mount the devices without having to remove/insert them?

    Code:
    $  lsusb
    Bus 002 Device 006: ID 0951:1666 Kingston Technology 
    Bus 002 Device 005: ID 0951:1666 Kingston Technology

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,814

    Default Re: Mount a USB memory device at boot time

    Mass storage mounting at boot is configured in /etc/fstab.
    Henk van Velden

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Mount a USB memory device at boot time

    Add nofail option in case they may not be present

  4. #4

    Default Re: Mount a USB memory device at boot time

    That was simple. Thank you both.

    I decided to have the devices mounted by LABEL and create each backup unit with the same label. The idea being that it will be easier to swap devices.

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Mount a USB memory device at boot time

    Note that LABELS must be unique to the system. ie you cant have two drives in the system with the same label at the same time. So plugging both devices in at the same time could lead to problems. In your case it should not be a problem as long as you don't plug both devices in. Also you must umount the device and mount the new to swap them on a running system. You must umount to assure that any cache is written before removing or there is possible data lose.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,814

    Default Re: Mount a USB memory device at boot time

    Quote Originally Posted by jimoe666 View Post
    That was simple. Thank you both.

    I decided to have the devices mounted by LABEL and create each backup unit with the same label. The idea being that it will be easier to swap devices.
    To use labels is basically a very good idea for removable file systems. But as @gogalthorpe says, be sure you have only uniquely labeled devices in the house . Because you then you, as human being, are responsible of using the correct one. And human beings are fallible. Using labels is a way to prevent human errors in connecting. Using the same label again makes the whole exercise futile.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •