[CentOS] Mount USB disk at startup?

Ian Forde ianforde at gmail.com
Thu Feb 4 23:05:07 UTC 2010


On Thu, 2010-02-04 at 14:19 -0800, Kenneth Porter wrote:
> --On Thursday, February 04, 2010 8:36 AM -0600 Robert Nichols 
> <rnicholsNOSPAM at comcast.net> wrote:
> 
> > Looks like that's about all you can do.  USB devices aren't available
> > until hotplug discovers them, and that's proceeding in parallel with the
> > rest of the boot sequence.  Be sure to put a timeout in that loop lest it
> > hang forever if that external device is absent.
> 
> Even better would be to make the script event-driven and launched by the 
> hotplug process. Then there's no busy-wait.
> 
> This page has some info:
> 
> <http://linux.die.net/man/8/hotplug>
> 
> The detail links on this page aren't working for me but look promising:
> 
> <http://linux-hotplug.sourceforge.net/>
> 

Since the OP is looking to have their USB drive mounted before mythtv's
backend process starts up, I'd recommend disabling the mythbackend
startup script:

chkconfig mythbackend off

Then doing a manual mount in /etc/rc.local, followed by starting
mythbackend.

/sbin/mount /dev/sdb1 /wherever
/sbin/service mythbackend start

Of course, I wouldn't recommend using a USB drive for storing myth
recordings, as it eventually bite you due to USB2's limited bandwidth...

	-I (also a mythtv user!)



More information about the CentOS mailing list