Author |
Message |
fra
|
Posted: Wed Sep 26, 2007 5:31 pm |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
I have a bunch of movies on an external hard drive. I will only be using it to watch movies through MythVideo. I will not be writing to it or writing from it onto the mythbox. The thing is though, I will not have it hooked up to the mythbox the whole time! Only when I need to watch a movie will I turn the hard drive on. I have two questions at this point:
1. Will it get detected by the mythbox as soon as it is hooked up? Or do I have to mount it? I know this works for SUSE.. Does it work like this for KnoppMyth too?
2. If it is mounted and I'm done watching and want to turn it off, do I have to unmount it? I know that in SUSE you can just turn the hard drive off or pull the usb off, and there's no need to unmount. Is it the case for KnoppMyth too?
I guess if any of the above questions are answered in the negative, I'll have to add a menu button to the Media Library to mount/unmount my hard drive! In this case, does anyone have any suggestions on what the best "action" to use may be?
Thanks a bunch!
|
|
Top |
|
|
marc.aronson
|
Posted: Wed Sep 26, 2007 6:54 pm |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
R5F27 has an automounter -- it automatically mounts USB devices when you plug them in and access them; it automatically dismounts after some period of inactivity.
I my case I had to do some configuring to get it to work. In my case I added the following line to the end of /etc/auto.master
Code: /media /etc/auto.mnt
I added the following to the end of /etc/auto.mnt Code: usb1 -fstype=auto :/dev/sdb1
You'll need to execute "/etc/init.d/autofs restart" once, and then you can reference the drive as "/media/usb1".
One final thing -- after you plug in the drive for the first time type "dmesg" to make sure you know the name of the device. If it's not "/dev/sdb1", use the device name that shows up in dmesg.
Marc
|
|
Top |
|
|
fra
|
Posted: Wed Sep 26, 2007 10:26 pm |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
marc.aronson wrote: I added the following to the end of /etc/auto.mnt Code: usb1 -fstype=auto :/dev/sdb1
Thanks Marc. One question though: did you mean sda1 in the above? Here's the outcome of fdisk -l (whether the external hard drive is plugged in or not!): Code: Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 * 1 609 4891761 83 Linux /dev/sda2 610 853 1959930 82 Linux swap / Solaris /dev/sda3 854 19457 149436630 83 Linux
And this is before I changed any of the files you mentioned.
Then I made the changes, and nothing happened. Then I commented out the lines I added to the files you mentioned. Now I'm waiting for further advice!
EDIT: I should mention that I have a SATA drive.. so sda[1-3] are the partitions KM made. dmesg doesn't show a thing, it seems. it looks as if the hard drive isn't even felt!!
|
|
Top |
|
|
marc.aronson
|
Posted: Thu Sep 27, 2007 5:46 am |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
Quote: Thanks Marc. One question though: did you mean sda1 in the above?
No -- I did mean /dev/sdb1, but it won't be the same name for everyone. Like you, I have a sata drive installed that maps to /dev/sda, so the USB device is assigned to /dev/sdb and the first partition on the device is assigned /dev/sdb1.
The best bet is to plug in the drive, wait a few sections and then type in "dmesg". Somewhere in the last 5-10 lines you will see messages about a new device being attached and it will identify the device name (/dev/xxx). My experience is that the naming is consistent from as devices are plugged in and unplugged. Not sure what a second USB device would be named, be probably /dev/sdc1...
Marc
|
|
Top |
|
|
fra
|
Posted: Thu Sep 27, 2007 10:05 am |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
marc.aronson wrote: The best bet is to plug in the drive, wait a few sections and then type in "dmesg". Somewhere in the last 5-10 lines you will see messages about a new device being attached and it will identify the device name (/dev/xxx). My experience is that the naming is consistent from as devices are plugged in and unplugged. Not sure what a second USB device would be named, be probably /dev/sdc1...
That's what I thought too. But plugging the hard drive in and looking at dmesg didn't give anything! As if the drive wasn't felt! Pretty strange. I'll try that again tonight.
|
|
Top |
|
|
fra
|
Posted: Fri Sep 28, 2007 12:05 am |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
Nope. No mention of the hard drive! By the way, its file system is FAT32. If only I knew which device I should mount! I tried mkdir /media/usb and then mount -t vfat /dev/sdb1 /media/usb and mount -t vfat /dev/sdc1 /media/usb and so on. I get an error message saying the device does not exist.
So my problem is now not even automounting! It's just mounting!!!! I believe once I manage to mount it manually, Marc's directions for automounting will work. But what device should I mount????
Any further suggestions?
|
|
Top |
|
|
marc.aronson
|
Posted: Fri Sep 28, 2007 5:48 am |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
FAT32 isn't the issue. A few more thoughts:
1. Check your bios and make sure that the USB ports are enabled.
2. You probably have multiple USB ports -- be sure to try them all.
3. Try a different USB device to see if it makes a difference.
Finally, what version of KNoppmyth are you running?
Marc
|
|
Top |
|
|
fra
|
Posted: Fri Sep 28, 2007 7:57 am |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
marc.aronson wrote: FAT32 isn't the issue. A few more thoughts:
1. Check your bios and make sure that the USB ports are enabled.
2. You probably have multiple USB ports -- be sure to try them all.
3. Try a different USB device to see if it makes a difference.
Finally, what version of KNoppmyth are you running?
Marc
keyboard, mouse, and streamzap remote work flawlessly. dmesg reacts instantaneously when they're plugged in or unplugged. looks like the usb devices are in /dev/usbdev[numbers] i tried mount /dev/usbdev[number] /media/usb but it kept giving me: usbdev[number] is not a block device.
i'm using R5F27.
|
|
Top |
|
|
marc.aronson
|
Posted: Fri Sep 28, 2007 5:45 pm |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
Fra, I don't have any other suggestions -- sorry. Since no messages show up in dmesg when you connect the device, it looks like your system isn't even recognizing that the drive is connected, so I don't think the issue has anything to do with mounting.
Marc
|
|
Top |
|
|
fra
|
Posted: Tue Oct 16, 2007 4:44 pm |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
OK. It was the drive! After our exchange, I plugged it into my Mac and into my Window's PC and nada! So I sent it back (it was still warrantied) and they changed the circuit board. Thank God the data wasn't touched!
I just hooked it up now and I see it as sdb1.
I edited the two files as instructed (added --timeout=2 at the end of the line to go into auto.master) then restarted autofs with /etc/init.d/autofs restart
i then can find it inside /myth/video/
Problem solved! Thanks!
One last question: to unmount, do I just wait a bit without using the drive and then can unmount it? How long do I wait? is it what timeout indicates? Is it 2 seconds or 2 minutes?
|
|
Top |
|
|
nigelpearson
|
Posted: Tue Oct 16, 2007 6:37 pm |
|
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location:
Sydney, Australia
|
Instead of doing the "wait and hope" for auto unmounting, you should probably use the Eject button in the menus.
_________________ | Nigel Pearson, nigel.pearson.au@gmail.com| "Things you own end up owning you" - Tyler, Fight Club
|
|
Top |
|
|
fra
|
Posted: Tue Oct 16, 2007 7:06 pm |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
nigelpearson wrote: Instead of doing the "wait and hope" for auto unmounting, you should probably use the Eject button in the menus.
what menus? in the optical discs menu, eject opens the tray!!!
|
|
Top |
|
|
nigelpearson
|
Posted: Tue Oct 16, 2007 7:35 pm |
|
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location:
Sydney, Australia
|
If you just have the CD/DVD drive, yes.
If you have more than one drive (which includes mounted USB keys),
it pops up a dialog box asking which one you want to eject/unmount.
_________________ | Nigel Pearson, nigel.pearson.au@gmail.com| "Things you own end up owning you" - Tyler, Fight Club
|
|
Top |
|
|
fra
|
Posted: Tue Oct 16, 2007 11:50 pm |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
nigelpearson wrote: If you just have the CD/DVD drive, yes.
If you have more than one drive (which includes mounted USB keys), it pops up a dialog box asking which one you want to eject/unmount.
not with me! i have no dvd in and have the usb drive hooked up and working. i choose eject and it opens/closes the tray. nothing about the usb drive. if i wait a bit and pull the usb cable off, everything is fine and the drive is gone. i just don't know how much i should wait!
|
|
Top |
|
|
fra
|
Posted: Thu Oct 18, 2007 10:33 am |
|
Joined: Fri Sep 07, 2007 11:57 pm
Posts: 166
|
do i even have to edit auto.master and auto.mnt???
it seems that even without editing them, doing ls /media shows /media/Dragon (Dragon is what i named my drive when it first mounted on my Mac!)
but doing ls /media/Dragon doesn't show anything. and if i do a symbolic link to /myth/video/Dragon, then navigate there through the menus, i don't see it there.
does this mean it does not automount (even if i can see it there) and i have to specify the mount points and so on as directed above?
i'd appreciate an answer to this, since i'd like the HOWTO i'm preparing to have a "minimal" amount of work and if there's no need to do anything for harddrives to mount/unmount, then i'd like to know about that!!! (even though i suspect the answer is that one does have to specify the mount points)
i'm using R5F27
|
|
Top |
|
|