Find the answer to your Linux question:
Results 1 to 9 of 9
I built and xubuntu headless server a few months back. I have a 40G drive to hold xubuntu and another 400G drive to back up that drive to, as well ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    16

    xubuntu server refuses to auto mount spare hard drive


    I built and xubuntu headless server a few months back. I have a 40G drive to hold xubuntu and another 400G drive to back up that drive to, as well as two other computers.
    My problem is with the 400G drive. Whenever I restart the server I have to mount the drive all over again. I've edited the fstab file numerous times using every technique I could Google. I've also used a few of the GUI type disk managers and haven't had the first bit of luck either way.
    I did notice that the first drive is listed as sda1 and my cdrom as sda2. When I formatted the 400G drive, I did it as one big partition and it only shows up as sdb. I can mount and write to it just fine. I'm thinking this might have something to do with why it won't auto mount, but I don't know for sure.
    Does it have to be sdb1 for it to work? And if so, how do I get it to do that? Will I have to reformat the drive into two parititions?

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    What does your fstab look like?
    What command are you using to mount it by hand?
    What does fdsik report

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    16
    Fstab looks like this right now.
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc                                       /proc           proc         defaults                    0  0  
    # /dev/sda1
    UUID=11fa8246-4fcf-4a52-8f1c-e2630c163020  /               ext3         relatime,errors=remount-ro  0  1  
    # /dev/sda5
    UUID=6d6ac19b-b334-4bb4-a4d0-25ef42e9ba39  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
    What I did was copy the sda1 line
    Code:
    # /dev/sda1
    UUID=11fa8246-4fcf-4a52-8f1c-e2630c163020  /               ext3         relatime,errors=remount-ro  0  1
    and pasted it after the sda5 line, then changed it to say
    Code:
    # /dev/sdb
    UUID=(inserted the drive's UUID)  / media/backupdrive             ext3         relatime,errors=remount-ro  0  1
    but that didn't work. I've tried other ways as well.

    To mount it manually, I'm using
    Code:
    sudo mount /dev/sdb /media/backupdrive
    and that works fine and dandy.

    When I fdisk the sdb drive, I get this
    Code:
     sudo fdisk /dev/sdb
    
    The number of cylinders for this disk is set to 48641.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    
    Command (m for help):
    Is that what you're asking for with the fdisk?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I was hoping you would have pressed 'p' after in fdisk to show how it is partitioned.

    Anyway add this to your FSTAB
    Code:
    /dev/sdb       / media/backupdrive    ext3    rw,user,exec    0 0
    You might have to play with the flag to get wehat you want.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Jan 2009
    Posts
    16
    For what it's worth, here's what I get when I "P" the fdisk.
    Code:
    Command (m for help): p
    
    Disk /dev/sdb: 400.0 GB, 400088457216 bytes
    255 heads, 63 sectors/track, 48641 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x2ba8aca9
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1       48641   390708801   83  Linux
    I'll go paste that line into the fstab and report back.

  7. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Change /dev/sdb to /dev/sdb1 above.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  8. #7
    Just Joined!
    Join Date
    Jan 2009
    Posts
    16
    I tried that after I saw it on the fdisk. My fstab now looks like this
    HTML Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc                                       /proc           proc         defaults                    0  0  
    # /dev/sda1
    UUID=11fa8246-4fcf-4a52-8f1c-e2630c163020  /               ext3         relatime,errors=remount-ro  0  1  
    # /dev/sda5
    UUID=6d6ac19b-b334-4bb4-a4d0-25ef42e9ba39  none            swap         sw                          0  0  
    # /dev/sdb1       / media/backupdrive    ext3    rw,user,exec    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  
    I just restarted again and it still won't mount. Or should it not have the # in front? I figured it should because sda1 and sda5 do. I'm still trying to figure out what sda5 is, but that's for another time.

  9. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Yeah, remove the '#' at the beginning of the line.
    '#' is a comment marker and the line is ignored by the system.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  10. #9
    Just Joined!
    Join Date
    Jan 2009
    Posts
    16
    That didn't work either, but I'm going to have to revisit this another time. A new problem has presented itself. I made that last change to fstab (took out the #) and installed a few updates to xubuntu and when I restarted, TightVNC suddenly doesn't want to connect to my server anymore. I can reach it fine through putty, but not VNC.
    I'm about to give up and just buy a monitor and a KVM switch.

Posting Permissions

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