Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-22-2006, 12:25 PM
|
#1
|
Member
Registered: Jul 2003
Distribution: Slackware
Posts: 84
Rep:
|
removal of USB device
I dual boot my system with Windows and I have an iPod which I use with iTunes under Windows. My problem is that sometimes I leave my iPod connected to the USB port when I shut down from Windows, and then if I boot up later to Linux I don't know how to safely remove it except for shutting down. I want to know how to kill the USB device so that I can disconnect it and hit the street with my tunes (I tried googling and searching the forum here and couldn't find my answer, and I just wouldn't know what to look for in the man pages). Thanks, much appreciated!
Oh, and I'm on Slackware 10.2 with kernel 2.6.16-rc4
|
|
|
03-22-2006, 12:34 PM
|
#2
|
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
|
Does your iPOD automount when you boot into Linux? If so, you'll have to unmount it before you pull it out. If not, it's just sitting there doing basically nothing.
|
|
|
03-22-2006, 01:26 PM
|
#3
|
Member
Registered: May 2005
Location: North Carolina
Distribution: Gentoo
Posts: 123
Rep:
|
Look for a device named sd*, it may be listed as this. If so, as root, type umount /dev/sda1 for instance
|
|
|
03-22-2006, 01:47 PM
|
#4
|
Member
Registered: Jul 2003
Distribution: Slackware
Posts: 84
Original Poster
Rep:
|
It doesn't automount, that would require an entry in /etc/fstab, correct? So, I don't believe it is mounted. If it weren't in /etc/fstab, how would mount -a know the parameters of the device to actually get it mounted? So I don't think it's mounted, but on the Pod's screen it does say "Do not disconnect." Somewhat ominous for data corruption, no? I tried umounting anyway, just to see if somehow this device mounted itself in some way that I don't know of, that isn't it. "umount /dev/sd*" shows that every sd* is not mounted. Is there a way to end communication over the USB port, effectively kill the device? Like, if the device were a mouse and not a storage device could I kill communications? Send the iPod a hangup signal? I don't want to tear it out, because it says "Do not disconnect." but it's so inconvenient to shut down the whole pc just to remove my iPod.
|
|
|
03-22-2006, 07:05 PM
|
#5
|
LQ Newbie
Registered: Jan 2006
Location: B'ham, AL
Distribution: Mandrake 10.1
Posts: 2
Rep:
|
My 30GB iPod always says "Do Not Disconnect" when it's plugged in, mounted or not. I read somewhere it'll always say that when it's connected to a Linux machine (sorry, I don't remember where). I just verify it's not mounted, then unplug it. I've never had any problems.
|
|
|
03-22-2006, 07:13 PM
|
#6
|
Member
Registered: Jul 2003
Distribution: Slackware
Posts: 84
Original Poster
Rep:
|
Ok, thanks. I thought that might be the case. Once I thought about it and realized that it's not mounted I figured that the file system on the device must not be doing anything, and I just disconnected the cable. Seems ok so far, but I'm going to try to remember to disconnect it while the computer is off, if I forget to kill it while it's on. Thanks again for the replies!
|
|
|
03-22-2006, 07:36 PM
|
#7
|
LQ Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
Quote:
"Do Not Disconnect" when it's plugged in, mounted or not.
|
This is only for Windows and Mac. Linux is different because you have to actually run the utility mount to access the drive. If it is not mounted you can remove it with out any corruption. If you mounted and write any files to the drive, you will have to run sync before unmounting.
Automount devices does not have to be in /etc/fstab. It could automount through hotplug scripts.
|
|
|
03-22-2006, 08:33 PM
|
#8
|
Member
Registered: Jul 2003
Distribution: Slackware
Posts: 84
Original Poster
Rep:
|
Thanks electro, that's very helpful.
|
|
|
04-07-2006, 06:29 PM
|
#9
|
Member
Registered: Aug 2003
Location: Florida, USA
Distribution: Mandrake, Knoppix, Yoper
Posts: 97
Rep:
|
Do not Disconnect Fix for USB iPod
To get rid of the Do_Not_Disconnect message:
if eject /mnt/ipod doesn't work try (as root):
umount /mnt/ipod # change this to wherever the ipod is mounted
rmmod ehci_hcd
rmmod ohci_hcd
service usb start
# the "service usb start" line is Mandriva specific, it just reloads the usb modules, so use what your distro needs
If you use gtkpod, you can pop all those into a file called gtkpod.out in the ~/.gtkpod directory. Running as root is scary so you'll need to create a sudo account for them to make life easier. I'd also add some time between commands with sleep, sleep 30 before reloading the usb modules, gives you enough time to unplug the iPod.
Example gtkpod.out file:
sudo umount /mnt/ipod
sleep 3
sudo rmmod ehci_hcd
sleep 1
sudo rmmod ohci_hcd
sleep 30
sudo service usb start
|
|
|
04-29-2006, 10:02 AM
|
#10
|
Member
Registered: Mar 2004
Distribution: Gentoo
Posts: 34
Rep:
|
Quote:
Originally Posted by schoo002
My 30GB iPod always says "Do Not Disconnect" when it's plugged in, mounted or not. I read somewhere it'll always say that when it's connected to a Linux machine (sorry, I don't remember where). I just verify it's not mounted, then unplug it. I've never had any problems.
|
While this *might* be safe, I sometimes like to listen while the ipod is charging.
If you are unmounted, you can type:
eject /dev/sda (or whatever the device is)
to remove the message, buyt continue charging.
To re-mount, you will have to un-plug and then plug in the ipod again though.
|
|
|
All times are GMT -5. The time now is 10:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|