Can't get UBUNTU 12.04 to auto-mount a DNS-320 NAS on boot

Asked by Pete Higgins on 2012-05-11

Can anybody tell me how to auto-mount a network attached storage device when I boot into UBUNTU 12.04?

I followed the same procedure that worked in 11.04 but it doesn't work with 11.10 or 12.04.

Basically, I created a DNS-320 folder (sudo mkdir /media/DNS-320) under the media folder and added the following line to fstab.
“//DNS-320/volume_1 /media/DNS-320 cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0”

When I enter the following command “sudo mount -a”, I get this error message:

mount: wrong fs type, bad option, bad superblock on smb://DNS-320/volume_1, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so

I can browse the network in 12.04 and see the DNS-320, open it and then open volume_1 and access my files. I also was able to create a bookmark in 12.04 that works reliably and takes me to my files.

I installed 11.04 & 12.04 in different partitions on the same computer to eliminate hardware incompatibilities. I have samba installed in both OS's. The DNS-320 appears on the desktop under 11.04 but does not get mounted by 12.04.

Appreciate anyone's help.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Pete Higgins
Solved:
2012-05-11
Last query:
2012-05-11
Last reply:
2012-05-11

samba is a SERVER software so won't help you connect to the NAS at all, smbclient is what you need to connect to the device and is in a default install. It's like saying "I couldn't connect to an FTP server so I installed porftpd server", silly isn't it....

When you mount the device using autilus, run:

mount; lsb_release -a; uname -a

What is output?

Thanks

root@PT890T-A3:~# mount; lsb_release -a; uname -a
/dev/sda5 on / type ext4 (rw)
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)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sdb3 on /media/PT890T-A3 500 GB SATA DATA type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
Linux PT890T-A3 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

No need to become root, users can run those commands. If not I would have added sudo

Here is the same output from UBUNTU 11.04:

root@PT890T-A3:~# mount; lsb_release -a; uname -a
/dev/sdb5 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sda4 on /media/PT890T_A3_500_GB_PATA_DATA type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda2 on /media/PT890T_A3_500_GB_PATA_W2k type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda1 on /media/PT890T_A3_500_GB_PATA_XP_MCE type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb3 on /media/PT890T_A3_500_GB_SATA_DATA type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb2 on /media/PT890T_A3_500_GB_SATA_Windows_7 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sdb1 on /media/PT890T_A3_500_GB_SATA_XP_MCE type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
//DNS-320/volume_1/ on /media/DNS-320 type cifs (rw,mand)
//RT-N16/ROSEWILL/ on /media/RT-N16 type cifs (rw,mand)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Linux PT890T-A3 2.6.38-15-generic #59-Ubuntu SMP Fri Apr 27 16:03:32 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Yes, I'am still having the problem. The line in 11.04 "//DNS-320/volume_1/ on /media/DNS-320 type cifs (rw,mand)" doesn't show up in 12.04. When I ran the code you suggested I had the Windows & Data partitions commented out in 12.04's fstab.

Andrew,

Here is the output from a computer with almost identical hardware that was configured to work with UBUNTU 11.04, then upgraded (online) to 11.10 and again to UBUNTU 12.04. Notice that this approach shows the DNS-320 mounted in 12.04. As with the one named PT890T-A3, I don't have it mounting the Windows or Data partitions at boot.

root@PT890T-A1:~# mount; lsb_release -a; uname -a
/dev/sda5 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)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
//DNS-320/volume_1 on /media/DNS-320 type cifs (rw)
//RT-N16/ROSEWILL on /media/RT-N16 type cifs (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
Linux PT890T-A1 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Wyatt Smith (wyatt-smith) said : #7

You /etc/fstab looks fine to me. From the error message at "sudo mount -a", I think it is looking for a "helper program". I am not sure if this is in the default install but you could try...

sudo apt-get install cifs-utils
sudo mount -a

Hope this helps

Wyatt,

Thank you for your reply and suggestion. IT WORKED!

Here is the output after installing cifs-utils, rebooting and running "mount; lsb_release -a; uname -a":

root@PT890T-A3:~# mount; lsb_release -a; uname -a
/dev/sdb5 on / type ext4 (rw)
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)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
//RT-N16/ROSEWILL on /media/RT-N16 type cifs (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
//DNS-320/volume_1 on /media/DNS-320/volume_1 type cifs (rw)
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise
Linux PT890T-A3 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I can only assume that this package was installed by default in UBUNTU 11.04 and earlier and dropped after 11.10.

Thanks again,
Pete