LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 07-13-2005, 06:12 PM   #1
sall
Member
 
Registered: Apr 2005
Posts: 50

Rep: Reputation: 15
Cannot Mount Ext. USB Hard Drive


I am fairly new to Linux and I am having trouble getting my External USB Hard drive to automount or mount on boot up. I have tried to create the mount point in the terminal as:

mkdir /mnt/usbdrive

Okay, fairly simple. It creates the mountpoint in the directory I specified. Now, I go to edit the /etc/fstab file in the terminal as:

sudo gedit /etc/fstab

This is what comes up:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0

Okay, now I shall add the information for the External USB Hard Drive as:

/dev/sda1 /mnt/usbdrive vfat defaults,user 0 0

and then save the file and reboot.

But this what comes up in the boot sequence:

mount: special device /dev/sd1 does not exist

now I know that the USb Hard Drive is using the /dev/sda1 path does anyone know what the problem is. All help is appreciated!

Thank you,
Sall
 
Old 07-13-2005, 07:51 PM   #2
Ateo
Member
 
Registered: Sep 2004
Location: http://longbeach.ca.u$
Distribution: Ubuntu,Gentoo, OSX
Posts: 136

Rep: Reputation: 15
Reread your post. Either it's a typo here in the forum or a typo in your configuration.
Quote:
Okay, now I shall add the information for the External USB Hard Drive as:

/dev/sda1 /mnt/usbdrive vfat defaults,user 0 0

and then save the file and reboot.

But this what comes up in the boot sequence:

mount: special device /dev/sd1 does not exist
How do you know which device your drive is? What is the output of "dmesg |grep -i sda"?

Last edited by Ateo; 07-13-2005 at 07:52 PM.
 
Old 07-13-2005, 08:00 PM   #3
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Here is my output from dmesg |grep -i sda

craig@laptop:~$ dmesg |grep -i sda
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: assuming drive cache: write through
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: assuming drive cache: write through
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
craig@laptop:~$


Notice something I didn't catch?
 
Old 07-13-2005, 08:24 PM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Add the auto opiton to your fstab line. It will not mount till usb modules are loaded. Once USB modules are loaded then the drive will automount.
/dev/sda1 /mnt/usbdrive vfat defaults,auto,user 0 0
 
Old 07-13-2005, 08:46 PM   #5
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
I tried your suggestion Brian1 and still had the same result. When Ubuntu was loading devices it states as before:

mount: special device sda1 does not exist

Any other suggestions?
 
Old 07-13-2005, 09:03 PM   #6
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Rep: Reputation: 15
Quote:
Originally posted by sall
I tried your suggestion Brian1 and still had the same result. When Ubuntu was loading devices it states as before:

mount: special device sda1 does not exist

Any other suggestions?
If it does not exist...you need to create it...

First, determine whether it is indeed already there:

Code:
~$ cat /proc/partitions
examine the `diff' before and after you plugged your ext. drive.
 
Old 07-13-2005, 09:29 PM   #7
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
I am Daniel I looked into your suggestion and checked to see if it was already there. I used the command:

~$ cat /proc/partitions

& this is what I received with it:

craig@laptop:~$ cat /proc/partitions
major minor #blocks name

3 0 39070080 hda
3 1 37744686 hda1
3 2 1 hda2
3 5 1325331 hda5
254 0 37744686 dm-0
254 1 1325331 dm-1
8 0 78150744 sda
8 1 78140128 sda1

Also I tried experimenting with /etc/fstab file and found then only when I use:

/dev/sda1 /mnt/usbdrive vfat noauto,user 0 0

&

/dev/sda1 /mnt/usbdrive vfat noauto 0 0

I do NOT receive the error when booting up that states:

mount: special device sda1 does not exist

but of course this does not do the job I want.

Pondering other ideas right now.... thank for the help, keep posting
 
Old 07-14-2005, 09:07 PM   #8
IamDaniel
Member
 
Registered: Mar 2003
Location: Sungai Petani
Distribution: Slackware
Posts: 143

Rep: Reputation: 15
Quote:
Originally posted by sall
I am Daniel I looked into your suggestion and checked to see if it was already there. I used the command:

~$ cat /proc/partitions

& this is what I received with it:

craig@laptop:~$ cat /proc/partitions
major minor #blocks name

3 0 39070080 hda
3 1 37744686 hda1
3 2 1 hda2
3 5 1325331 hda5
254 0 37744686 dm-0
254 1 1325331 dm-1
8 0 78150744 sda
8 1 78140128 sda1

Also I tried experimenting with /etc/fstab file and found then only when I use:

/dev/sda1 /mnt/usbdrive vfat noauto,user 0 0

&

/dev/sda1 /mnt/usbdrive vfat noauto 0 0

I do NOT receive the error when booting up that states:

mount: special device sda1 does not exist

but of course this does not do the job I want.

Pondering other ideas right now.... thank for the help, keep posting
Is it the device that marked with red color?

which filesystem the drive formatted?

As root, try the following:

Code:
~# /sbin/fdisk -l /dev/sda
 
Old 07-14-2005, 11:10 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,153

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
BTW what distribution / version of linux are you running?
In most cases the USB modules are not loaded when the OS mounts the filesystems via fstab and AFAIK the OS will not wait until the modules are loaded. There are several ways to fix this problem. Compile the USB modules into the kernel, add a line to mount the drive by adding a command to the /etc/rc.local file or add the usb modules to the initrd image if your linux distro uses one. The /etc/rc.local file method is the easiest to accomplish by adding a mount command.
 
Old 07-15-2005, 08:02 AM   #10
Ben2210
Member
 
Registered: Feb 2004
Location: Toronto
Distribution: Arch
Posts: 146

Rep: Reputation: 16
Wait a minute .... you say you get this message :
Code:
mount: special device sda1 does not exist
OK, then perhaps it REALLY doesn't exist, in which case you might consider creating it !

What is the output of the following command ?
Code:
ls -l /dev/sda1
If it shows nothing, then create the special device with the following command :
Code:
mknod /dev/sda1 b 8 1
Note that :
1) the numbers "8 1" are found in the output of cat /proc/partitions ;
2) you'll probably want to modify your udev configuration to have this device added permanently.
 
Old 07-15-2005, 09:11 AM   #11
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
The operating system I use is Ubuntu 5.04 with 2.6.10-5-386 kernel running KDE 3.4.0. I tried to edit the /etc/rc.local file but it does not exist on the sytem.

And also I tried the $ ls -l /dev/sda1 command and received this:

craig@laptop:~$ ls -l /dev/sda1
brw-r----- 1 root plugdev 8, 1 2005-07-15 08:56 /dev/sda1
craig@laptop:~$ /sbin/fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 9728 78140128+ c W95 FAT32 (LBA)

which is what I expected and should use the vfat type correct if I am not mistaken?


And I tried the $ ls -l /dev/sda1 command and the output was:

craig@laptop:~$ ls -l /dev/sda1
brw-r----- 1 root plugdev 8, 1 2005-07-15 08:56 /dev/sda1
craig@laptop:~$

So I know the device does indeed exists..
I have no clue what is up?? Maybe it comes back to the USB modules not being loaded whe the system mounts as michaelk suggested?
 
Old 07-15-2005, 09:25 AM   #12
Ben2210
Member
 
Registered: Feb 2004
Location: Toronto
Distribution: Arch
Posts: 146

Rep: Reputation: 16
OK.

1) Show us the exact command you use to mount /dev/sda1. Looks like you've asked to mount sda1, not /dev/sda1.

You should be writing something like
mount /dev/sda1
and not
mount sda1

2) Try passing the -v option to mount, to make it verbose. Post the output here.

3) Look for useful info in the files syslog and messages in /var/log.
Also try the dmesg command.
It should mention your USB drive a few seconds after you plug it.
 
Old 07-15-2005, 09:42 AM   #13
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Ben 2210 I can manually mount the hard drive, I am trying to mount the USb drive at boot so I odn't have to manually load it. This is the exact comand I use to attempt to automount in fstab:

/dev/sda1 /mnt/usb vfat defaults,user 0 0

Everytime when booting up it says the device does not exist, but as in later posts the device does exist, for just some reason it does not work.
 
Old 07-15-2005, 09:52 AM   #14
Ben2210
Member
 
Registered: Feb 2004
Location: Toronto
Distribution: Arch
Posts: 146

Rep: Reputation: 16
OK,sorry.

If you want you usb-key mounted on bootup, and the standard automount doesn't work for you, you have to modify your boot scripts.
Probably it tries to mount your USB key too early in the boot process, before USB is properly handled.

The easiest solution is to add a command mounting your USB key, near the end of the boot process. I don't know Ubuntu or Debian, but I think that their boot scripts are in

/etc/init.d

try to cd to that directory. Or try /etc/rc.d

Then look for a file called rc.local. If it doesn't exist, type ls and post the output here.

Edit rc.local, and add (at the end of it) :
mount /dev/sda1

see if that works.

Another solution could be
rmmod usb_storage
modprobe usb_storage


EDIT : I see that it's exactly what michaelk has told you to do. Just check for the exact location of the rc.local file, and it'll work !

Last edited by Ben2210; 07-15-2005 at 09:55 AM.
 
Old 07-15-2005, 10:18 AM   #15
sall
Member
 
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Alright, I attempted that as well however could not find the rc.local file in either place. When i used the comand:

cd /etc/init.d

It went to that directory, but trying to find rc.local failed

The out put of ls in this directory was:

root@laptop:~ # cd /etc/init.d
root@laptop:/etc/init.d # ls
README fetchmail mdadm rmnologin
acpi-support gdm mdadm-raid rsync
acpid halt module-init-tools samba
alsa hdparm mountall.sh screen-cleanup
anacron hostname.sh mountnfs.sh sendsigs
apmd hotplug mountvirtfs single
atd hwclock.sh networking skeleton
bootclean.sh hwclockfirst.sh ntpdate stop-bootlogd
bootlogd ifupdown pcmcia sudo
bootmisc.sh ifupdown-clean postfix sysklogd
checkfs.sh inetd powernowd udev
checkroot.sh initrd-tools.sh ppp udev-mtab
console-screen.sh kdm pppd-dns umountfs
cron keymap.sh procps.sh umountnfs.sh
cupsys klogd rc urandom
dbus-1 libdevmapper1.00 rcS vbesave
dns-clean lvm readahead vmware
evms makedev reboot xorg-common

And also, the directory /etc/rc.d does not exist.

I'm not quite sure...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MDK 9.2 cannot mount Ext USB hard drive dr_skids Linux - Hardware 0 11-06-2005 12:56 PM
usb mount hard drive rpetrenko Suse/Novell 2 10-07-2005 01:49 AM
I can mount a usb hard drive fiacobelli Linux - Hardware 3 07-06-2005 02:52 PM
Mounting Ext. Hard Drive through USB 2+PCMCIA CondorPasa Linux - Hardware 1 03-11-2004 07:49 AM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 12:50 PM


All times are GMT -5. The time now is 03:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration