How to mount USB drive at boot time
Bill Davidsen
davidsen at tmr.com
Fri Jul 27 13:30:43 UTC 2007
Jonathan Ryshpan wrote:
> On Thu, 2007-07-26 at 17:36 -0400, Bill Davidsen wrote:
>
>> Jonathan Ryshpan wrote:
>>
>>> I have a USB drive that is usually, though not always, connected to my
>>> desktop system.
>>>
>>>
>>> If it is connected to the system at boot time, the device path should be
>>> created and the drive should be mounted immediately, i.e. BEFORE any
>>> user logs in.
>>>
>>> If it is not connected at boot time, there should be no serious problem.
>>>
>>> If the drive is connected to a running system (on which it had not been
>>> previously connected), the device path should be created, and it should
>>> be mounted by root.
>>>
>>> Root should be able to unmount the drive, when it is mounted.
>>>
>>>
>>> I assume this should be done by either udev or hal -- HOW?
>>>
>>>
>> You may be able to do this just by putting the entry in /etc/fstab,
>> using the UUID of the filesystem to eliminate any dependency on device
>> name. I /think/ the hotplug will check, I can't easily go thru it myself
>> at this moment.
>>
>
> I don't think so. Here's my /etc/fstab:
>
> LABEL=/ / ext3 defaults 1 1
> ...
> UUID=9dd976ce-a988-42a2-857d-06c3079675e7 /media/usb-disk ext3 defaults 1 2
>
>
> During boot I see these messages:
>
> Mounting local filesystems [FAILED]
>
> ...
> Mounting other filesystems: mountpoint /media/usb-disk does not exist.
>
> And, in fact, the drive is not mounted.
>
> BTW: Why is this so hard? Am I the only person who wants to do it?
>
> BTW: I thought that the messages that appear on the monitor during boot
> were saved in /var/log/messages . Apparently not. Are they saved
> anywhere?
>
> Thanks - jon
>
>
>
I suspect the problem is that there is no directory called
"/media/usb-disk" as those mount points in /media are generally created
at run time, and these mounts happen early. I use directories in /mnt
and descriptive names, so maybe create a directory called something like
/mnt/usb1, change fstab, and then reboot or just try "mount -a" first.
--
bill davidsen <davidsen at tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
More information about the fedora-list
mailing list