You are not logged in.
Hi all. I'm new here (to both Arch and Linux in general) and loving it. So far I have been able to resolve every issue I've had by doing my research, but not with this.
I have a WD My Passport USB external hard drive. When I try to mount it with fstab I get the following error message at bootup:
MOUNT: Special Device /dev/sdb does not exist.
However, after my boot up is complete and I login as root I can immediately run
mount -a
and the hard drive is mounted with no problems.
Here is the information contained in fstab:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0
/dev/sdb1 /media/external ext4 defaults,rw,user 0 0
UUID=12015e6d-eca5-49cb-bf2c-94e35a8379eb swap swap defaults 0 0
UUID=5601b6ec-d519-446b-ad7b-3fa31fd74a8f /home ext4 defaults 0 1
UUID=84651bf5-7d02-4589-8330-14e7283a926e /boot ext2 defaults 0 1
UUID=9953b984-ec84-4db1-9808-03e1ab3e0628 / ext4 defaults 0 1
I have tried mounting /dev/sdb, /dev/sdb0, etc. but to no avail. What is the problem here? The only logical answer to me is that the mounting process at bootup is started before my USB connections are detected. If that's the case, how can I correct that?
Thanks in advance and if I have not provided enough information I do apologize.
--blum
Last edited by iamblum (2010-06-20 04:21:43)
Offline
See this wiki article.
Welcome to Arch.
Enjoy.
Offline
Thank you Misfit for your reply; this article will come in handy...especially the by-label feature. However, I've edited the fstab so that it refrences my external hard drive va the uuid. I did this as I noticed my internal partitions were as well. I still get a similar error at bootup:
MOUNT: Special Device cf697fd6-006b-46f6-b508-77a5d8667ec7 does not exist.
However when i run
mount -a
the external hard drive mounts with no problems.
Below is the updated fstab:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
#/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
#/dev/fd0 /media/fl auto user,noauto 0 0
UUID=12015e6d-eca5-49cb-bf2c-94e35a8379eb swap swap defaults 0 0
UUID=5601b6ec-d519-446b-ad7b-3fa31fd74a8f /home ext4 defaults 0 1
UUID=84651bf5-7d02-4589-8330-14e7283a926e /boot ext2 defaults 0 1
UUID=9953b984-ec84-4db1-9808-03e1ab3e0628 / ext4 defaults 0 1
UUID=cf697fd6-006b-46f6-b508-77a5d8667ec7 /media/external ext4 defaults 0 0
Thanks again.
--blum
Last edited by iamblum (2010-06-20 02:34:08)
Offline
See [wiki=mkinitcpio]mkinitcpio.conf[/wiki]. (Specifically, you need the 'usb' hook.)
Offline
See [wiki=mkinitcpio]mkinitcpio.conf[/wiki]. (Specifically, you need the 'usb' hook.)
Thanks. I tried that just before you posted your comment. I tried placing it before and after the 'autodetect' hook (but always after the 'udev' hook), but with the same result: external hard drive still not mounting at boot
Offline
Also, I just tried placing the following in /etc/rc.local:
mount /media/external
This still didn't work (was shown same error twice), causing me to be certain that the problem is in the USB not being loading prior to mounting. Is there possibly a module that I need to manually add to the mkinitcpio.conf?
Offline
Did you rebuild the initrd? (I use 'pacman -S kernel26' to do that.)
Offline
I would use udev to mount the drive at boot:
Offline
Solved! Kinda....
So this is probably a crude solution, but for a newbie just messing around with ideas I think I've done alright.
I set my external hard drive to be loaded but not automatically mounted in fstab:
UUID=cf697fd6-006b-46f6-b508-77a5d8667ec7 /media/external ext4 defaults,rw,user,noauto 0 0
And in rc.local I added a ten second pause, then mounted the drive:
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
for tty in /dev/tty?; do /usr/bin/setleds -D +num < "$tty"; done
sleep 10s
mount /media/external
I added a ten second pause here because I noticed that without it the USB still hadn't loaded by the time it was being mounted. The ten seconds ensures that enough time has been allowed for the USB to load.
I tried this with both the "usb" hook in and not in the mkinitcpio.conf. It works either way.
I'm sure there is a better solution but for me Occam's razor prevails. When I decide to spend more time on this I might try coming up with another solution...for now I have plenty other things to work on....sound, printer, radio, monitor, etc. I must say I love working with Arch. I mean I liked the other distro's I've briefly used (Ubuntu, Fedora, Mandriva) but with Arch it's a lot more techinal and requires more problem solving. This makes the solutions much more rewarding .
Thanks for all the speedy replies!
PS Can anyone, off the top of his/her head, tell me (or refer me to) what the default options in fstab are? I'm wondering if the options I set (rw,users,noauto) are sufficient without needing the "defaults".
--blum
Last edited by iamblum (2010-06-20 04:24:49)
Offline
I tried this with both the "usb" hook in and not in the mkinitcpio.conf. It works either way.
At that point in the boot process, your real root filesystem has been mounted, so all modules are available, not just the ones incorporated into and loaded by the initrd.
PS Can anyone, off the top of his/her head, tell me (or refer me to) what the default options in fstab are? I'm wondering if the options I set (rw,users,noauto) are sufficient without needing the "defaults".
man 8 mount |grep -C 3 -e defaults
Offline
Thanks rransom!! That makes sense about initrd. And thank you for the reference...I'm sure I could have looked around for it but at this point my brain's a bit fried...
Offline
That's basically the same solution I came up with, except I first check that the disk is plugged in:
[ -e /dev/disk/by-label/Icy80 ] && mount /dev/disk/by-label/Icy80
If you don't need your external drive to be accessible right after rc.local, you could background the sleep & mount operation:
(sleep 10 && mount /media/external)&
Offline
I was thinking about backgrouding the sleep, but I like the pause so I can check that everything has been loaded properly. Thanks for the disc check!
Also thanks anonymous_user. Your method worked like a charm too! Until I can better understand that proces, I feel as though I can control the mounting more through fstab.
Offline