You are not logged in.

#1 2010-03-18 19:38:58

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

mount usb hdd automatically at or better after startup

Hi,

i wanted to mount my external harddrive shortly after archlinux has booted into GUI so it doesn't slow down the boot process.

I was thinking about something like (sleep 10 && modprobe usb-storage && mount /media/usbhdd) & in rc.local but that didn't work for me.
That's not my only concern though because I can't even get the drive to automatically mount at startup via fstab entry.

I tried this and many variations:

/dev/disk/by-uuid/DEFC3BD4FC3BA5A5 /media/usbhdd auto rw,user 0 0

Any thoughts on how i get the drive to at least mount at startup via fstab or even better in form of some script shortly after the boot process is almost finished?

Thanks,
demian


Update: Solution is

(sleep 8 && mount -t ntfs-3g /dev/disk/by-uuid/DEFC3BD4FC3BA5A5 /media/usbhdd) &
or if you have an fstab entry
(sleep 4 && mount /media/usbhdd) &

in rc.local

Last edited by demian (2010-03-19 09:54:55)


no place like /home
github

Offline

#2 2010-03-18 19:53:14

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: mount usb hdd automatically at or better after startup

Any error messages, warnings, koans? Can you mount it manually?


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2010-03-18 21:22:39

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: mount usb hdd automatically at or better after startup

Mounting manually works perfectly fine.
I usually SSH into the machine so i don't see if there are error messages at bootup. I guess i can check that tomorrow.

Last edited by demian (2010-03-18 21:23:37)


no place like /home
github

Offline

#4 2010-03-18 23:03:15

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: mount usb hdd automatically at or better after startup

Perhaps using /etc/rc.local it can be mounted.

Try this code in r.c local:

mount -t ext3 /dev-by-uuid /media/usbhdd

Make a folder called  "usbhdd" in media.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2010-03-19 00:14:07

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: mount usb hdd automatically at or better after startup

Have you tried creating a udev rule?

http://wiki.archlinux.org/index.php/Ude … encryption

Offline

#6 2010-03-19 09:43:24

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: mount usb hdd automatically at or better after startup

I didn't want to use udev rules because it's a server and i usually don't have switching periphals. I prefer having everything static.
I just tried using a udev rule though and it kinda crashed my system wink. Guess i made a typo in the .rules file or it simply didn't work with the current udev.

Anyhow, i found a solution.

In rc.local:

(sleep 8 && mount -t ntfs-3g /dev/disk/by-uuid/DEFC3BD4FC3BA5A5 /media/usbhdd) &

Since i have an fstab entry, i now use (sleep 4 && mount /media/usbhdd) &.
I don't know why it didn't work before though, when i tried it with (sleep 10 && modprobe usb-storage && mount /media/usbhdd) &. Probably bad syntax or because of the modprobe insertion.

Anyway thanks guys!

Regards,
demian

Last edited by demian (2010-03-19 09:58:55)


no place like /home
github

Offline

Board footer

Powered by FluxBB