Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am fairly new to Ubuntu but reasonably confident with CLI. I am running 12.04 and have 3 HDD, two with media content that I want to auto-mount on startup. The problem is that they contain 3TB of data each, and I don't want to lose this data in recreating partitions and directories.

The two I want to auto-mount on startup are sdb and sdc - can someone recommend the best way of doing this, either via editing FSTAB or through a GUI? I noted that 12.10 has the option to auto-mount via the disk utility, but when I opted to upgrade to 12.10, I received a warning that my Dell T110 doesnt have a supported graphics card.

Any thoughts please?

fdisk -l:

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b7bd6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   488280063   243889153    5  Extended
/dev/sda5          501760   488280063   243889152   8e  Linux LVM

Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/mapper/cambuimedia-root: 247.6 GB, 247560404992 bytes
255 heads, 63 sectors/track, 30097 cylinders, total 483516416 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/cambuimedia-root doesn't contain a valid partition table

Disk /dev/mapper/cambuimedia-swap_1: 2134 MB, 2134900736 bytes
255 heads, 63 sectors/track, 259 cylinders, total 4169728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/cambuimedia-swap_1 doesn't contain a valid partition table

Having manually mounted the drives and using the mount command, I get the following:

/dev/mapper/cambuimedia-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /boot type ext2 (rw)
gvfs-fuse-daemon on /home/cambuimedia/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=cambuimedia)
/dev/sdb on /media/media2 type ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdc on /media/media1 type ext4 (rw,nosuid,nodev,uhelper=udisks)

I had hoped I could just add the last two lines to my fstab file, so it looks like this:

# /etc/fstab: static file system information.
#
# Use 'blkid' 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    nodev,noexec,nosuid 0       0
/dev/mapper/cambuibkup-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=83c8badb-653b-4def-9209-04619def34c9 /boot           ext2    defaults     $
/dev/mapper/cambuibkup-swap_1 none            swap    sw              0       0
/dev/sdb on /media/media2 type ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdc on /media/media1 type ext4 (rw,nosuid,nodev,uhelper=udisks)

But this doesn't appear to work on reboot?

share|improve this question
    
Having manually mounted the drives, and using the mount command I get the following: –  Alex341 Apr 11 at 15:50

1 Answer 1

You can't just copy the mount output to fstab. The correct lines would be:

/dev/sdb  /media/media2  ext4  rw,nosuid,nodev  0  0
/dev/sdc  /media/media1  ext4  rw,nosuid,nodev  0  0 

or similar (the last number would be 2 if you want the filesystem checked at mount time, see man 5 fstab). See the comment line in /etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

So your fstab is trying to mount the device /dev/sdb on the directory on which will not exists...


PS why do you use unpartitioned drives? Probably it's not a problem but sounds odd.

share|improve this answer
    
It is very unusual not to partition a drive. It is then just one jumbo floppy drive. Not sure even if it can be mounted as almost all tools expect partitions. Did see one user who seemed to be showing a loop mount, or may floppy will work? –  oldfred Apr 11 at 17:39
    
mount, and so the fstab way, shouldn't have problems (they can mount it manually, after all). But I agree that will confuse a lot of tools... I used to do that when flash drives where small, and stopped that when some tool decided that the thing was "virgin" and proceeded to format it. –  Rmano Apr 11 at 17:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.