A friend of mine lent me a USB drive to copy some stuff to that he needed. I bring it home, plug it in, and... "Initializing Launchpad..."? WTF is this shit? Unplugged, and End Task'd.
Basically, this SanDisk drive has some asinine setup where it's got multiple partitions and tricks your computer into thinking the first one is a CD drive, with an autorun on it. This trick even gets Linux, as that partition showed up as /dev/sr1.
I didn't want to deal with this Launchpad bullshit, I just wanted to copy files. So, as I've unorganizedly mentioned and hinted at, I plugged the fucker into my server, running Arch Linux. The two partitions showed up, /dev/sr1 (the CD partition), and /dev/sdb1, being the place where all the data goes. If you know anything about Unix-based OSes, the solution should have popped into your head already, but for the lesser-informed, this blog post exists.
This is kind of like shooting fish in a barrel, since U3 isn't designed to work on Linux at all. Also, I'm not sure how portable these instructions are, they may need to be modified for your preferred flavor of Unix-like operating system and the number of storage devices you have.
Basically, all you need to do is figure out which device name it's using for the data partition. As previously stated, on my server, it was /dev/sdb, with the partition itself being /dev/sdb1.
Now, simply mount that partition. If you've got your /etc/fstab set up right, you won't even need to be root (or use sudo) to do it. I made a mountpoint for USB devices on my server a long time ago at /mnt/usb, so I just used that. The final command should be mount /dev/sdb1 /mnt/usb or something similar (it can be shortened to just the device if you've got things set up correctly).
Do a cd /mnt/usb, and then ls.
Bam, all the files show up. To get the amount of free space, run df -h /mnt/usb. Do whatever you need to do, then unmount it (umount /dev/sdb1) and go about your business.
Yeah, this isn't one of those typical "how to remove U3" posts. There are plenty of posts covering that, so if I wrote one it'd only be redundant. This is because the drive isn't mine and I didn't want to mess with it in any way that might cause data loss.
This file copying is going to take forever, not because it's the device's fault, but because my server's built with old hardware and thus only has USB1.1. I'll check on it in a few hours and see how it's doing.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
I moderate comments because when Blogger originally implemented a spam filter it wouldn't work without comment moderation enabled. So if your comment doesn't show up right away, that would be why.