Results 1 to 9 of 9

Thread: Mounting HDDs at startup

  1. #1
    Join Date
    Apr 2009
    Location
    Guwahati, India
    Beans
    28
    Distro
    Kubuntu 10.04 Lucid Lynx

    Question Mounting HDDs at startup

    Hello, I am a new user of Ubuntu. I have a portable hard disk and two fixed hard disks. If I connect my portable hard disk before booting the system and then boot, I get it mounted on /media. But this does not happens to my other partitions. I am unable to get the fact. Hope anyone can help me in this regards. Thanks in advance.

  2. #2
    Join Date
    Dec 2009
    Beans
    126
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Mounting HDDs at startup

    Have you tried unplugging them, and typing
    Code:
    sudo modprobe usb_storage
    into terminal, then plugging them back in?
    My portfolio: http://www.elliotspeck.com
    Pokemon Remake: Coming soon!

  3. #3
    Join Date
    Feb 2006
    Location
    uk
    Beans
    Hidden!

    Re: Mounting HDDs at startup

    you need to create directories for them in /media (or anywhere else really) and put mounting details in /etc/fstab

    first you should mount them manually on the command line (this isnt persistent) so you can identify which drive is which. your drives are listed as unmounted devices in /dev/. if you do
    Code:
    ls /dev/sd*
    in a terminal you should get a list of all your devices and partitions.

    its just a matter of issueing a command like this to mount a drive temporarily:
    Code:
    sudo mount /dev/sda1 /media/drivefolder/
    there's loads of documentation for mounting drives permanently on boot through editing the fstab file, with loads of examples for different file systems.

  4. #4
    Join Date
    Mar 2008
    Location
    Deep South Texas, SpaceX
    Beans
    1,890
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Mounting HDDs at startup

    Internal drives are not normally mounted to /media.

    is there a reason you want/need these internal drives mounted to /media?

    In any case...
    for starters, show us fstab...

    Code:
    gedit /etc/fstab
    and paste the contents here (wrap it in code tags, please.)

    also,

    Code:
    sudo fdisk -l
    (that's a lower-case L, not the numeral one)

    and paste the contents here (wrap it in code tags, please.)
    Last edited by egalvan; March 17th, 2010 at 12:32 PM.
    "Free software is a matter of liberty, not price." -- Richard Stallman
    So don't forget to tip your software authors!

    I'm a Fireman... what's YOUR superpower?

  5. #5
    Join Date
    Apr 2009
    Location
    Guwahati, India
    Beans
    28
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Mounting HDDs at startup

    This is my fstab:

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'vol_id --uuid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # / was on /dev/sdb2 during installation
    UUID=2c42cb86-9219-4477-a373-db2c8fcd4e8b /               xfs     relatime        0       1
    # swap was on /dev/sdb5 during installation
    UUID=d1b0309b-e744-4f6d-9354-5e9906de9c25 none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    And this is the the result of fdisk -l:

    Code:
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0005e6f4
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       13054   104856223+  83  Linux
    /dev/sda2           13055       19457    51432097+  83  Linux
    
    Disk /dev/sdb: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x61806180
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1        9240    74220268+  83  Linux
    /dev/sdb2   *        9266       19458    81863680   83  Linux
    Partition 2 does not end on cylinder boundary.
    /dev/sdb3            9241        9265      200812+   5  Extended
    /dev/sdb5            9241        9265      200781   82  Linux swap / Solaris
    
    Partition table entries are not in disk order

  6. #6
    Join Date
    Oct 2007
    Location
    Brussels, Belgium
    Beans
    81
    Distro
    Xubuntu

    Re: Mounting HDDs at startup

    Quote Originally Posted by egalvan View Post
    Internal drives are not normally mounted to /media
    All my internal drives mount there automatically (when I open them from Places or Computer), except for root of course. Where might they mount for you?

  7. #7
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Mounting HDDs at startup

    Quote Originally Posted by Wardje View Post
    All my internal drives mount there automatically (when I open them from Places or Computer), except for root of course. Where might they mount for you?
    All permanent non-system mounts should be outside of the Linux system folders - like /media - because you are using them for non-system purposes and may want to change system controlled defaults like permissions etc. Things mounted in /media are done by the system using its preferences.

    All Linux system folders are assumed to be under the control of the system and allowing other things to access those folders can compromise security as well as operational stability.

    If you have a drive for data then create you own folder called /data and mount it there - the name doesn't matter as long as it is not in a Linux system folder.

    Using the command "sudo mkdir /whatever" isn't that tough to do.
    Last edited by dcstar; March 19th, 2010 at 02:02 AM.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  8. #8
    Join Date
    Oct 2007
    Location
    Brussels, Belgium
    Beans
    81
    Distro
    Xubuntu

    Re: Mounting HDDs at startup

    Oh like that, I misinterpreted egalvan's line. I thought he meant it isn't default behaviour on Ubuntu's side while he meant that it isn't advised to mount it there.

  9. #9
    Join Date
    Apr 2009
    Location
    Guwahati, India
    Beans
    28
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Mounting HDDs at startup

    Can anyone give a simple answer to my questions please.....

Tags for this Thread

Bookmarks

Posting Permissions

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