Programming :: Autodetect New Usb Pen Drive
May 11, 2010
I make a app (in C language) that need to autodetect new flash drives that are plugged in USB ports. I need to mount that drive and launch a app from the pen drive. I can't find any code (any libs) that automaticaly detect new pen drives. Here are any ideeas? Currently I use /proc/partitions (I load in memory a structure at startup...and at every 5 seconds I compare the data from memory with /proc/partitios)
View 3 Replies
ADVERTISEMENT
Dec 9, 2010
In the control centre under multi media selector for configuring GStreamer it has Autodetect and two other setting, X Window System (No Xv) and X Window System (X11/XShm/Xv) etc. When I test the X Window System (No Xv) the test card in full screen is far better then autodetect, should I keep this setting, the reason I ask is I can't notice the difference when watching video.
View 1 Replies
View Related
Sep 2, 2010
I was just playing with Fedora 13 and found that when I try to watch any AVI file it searches all required Codecs from RPM Fusion repository and install it. I was just wondering if this can be done on the openSUSE because what I know about Fedora is, it doesn't customize the products and uses as it is. If someone know how to enable such Autodetecting in Totem.
View 6 Replies
View Related
Jan 11, 2011
I have an Iomega Home Media Network Drive (small, cheap, NAS) [URL] Recently the controller died and it will no longer connect to my network. Before I take it to our local electronics recycler, I'd like to recover the data from the drive. I removed the bare drive from the NAS and plugged it into my Ubuntu 10.10 PC. I see the following:
[Code]....
I believe the sdb2 is the data partition I want to mount, but it appears to be part of a RAID array. The NAS only contains one drive, so is sdb1 the other part of the RAID array? If I look in the system partition of the drive I see in /etc/fstab: # line needed for quotas, noauto makes mount -a skip it so nasmon can mount it correctly /dev/sda2/nethdd/mkswxfsdefaults,noauto0 0
But I have never heard of type "mkswxfs", nor has googling returned any information. I assume I need to create a RAID array out of sdb1 and sdb2 but I am new to this. Also, on the system partition:
[Code]...
View 1 Replies
View Related
Jul 23, 2010
I am trying to mount a hard drive it shows up as /dev/sda1
I can click it and mount it via the GUI but I need it mounted for this script and do not want to have an extra step of doing it manually
I have tried (also tried sda vs sda1, no differance)
sudo mount /dev/sda1
sudo mount -t ntfs/dev/sda1
sudo mount -t ntfs-3g/dev/sda1
I know the drive is sda the only partition on it being sda1, but either I get an error saying it couldn't be found or I simply get no response depending on how I alter the code
Oh also the drive shows hpfs/ntfs 0x07 in the disk utility
View 6 Replies
View Related
Dec 3, 2010
I have a script that I'm trying to use to backup my hard drive every night. The full backups are working flawlessly. I haven't figured out the incrementals yet. I thought they were working when I first wrote the script a few weeks ago, but it doesn't seem to be working anymore. I have a long script that I have a whole bunch of statements like this.
[Code]...
To be honest, I'm not a Linux expert and I was really surprised when I started this venture that Linux filing system doesn't have an archive bit like NTFS does and we have to use a file to store the archiving information. But there's the file at /var/log/usr.snar. My theory is I just leave that file for a week so I can create one full and incrementals through the week. Then when I want to create another full backup (when I swap hard drives), I then delete that usr.snar file. I thought that worked a few weeks ago, but it doesn't anymore. When I start my backups, they backup every folder I have listed and not just the files that changed. My full backups are 165 GB, so I'd like to use the incremental feature.
View 2 Replies
View Related
Jun 1, 2010
I want to find a simple and quick way to permit my application to bring a file located in my file system and write it into an external USB device. I have to use Bulk Transfer Only mode that means to use stream of characters only. I looked through the LibUsb library using it in my IDE I can transmit a string. To transfer a whole file I suppose I've to dodge the file system building a char sequence that permits to recognise a file in the file system and to put it into the usb device.
View 1 Replies
View Related
May 4, 2010
Seeking a decent Perl or Bash script or hack used to copy data from a CD/DVD to local or even remote hard drive/storage.
View 7 Replies
View Related
Feb 13, 2011
I am using Debian Lenny 5.0.3 with a stock 2.6.26-2-amd64 kernel, and have a ~/Documents/HTMLS directory of 273.2MB (21590 files, 1063 sub-folders) which according to konqueror shows 1130 items - 572 files (60.8MB Total) - 558 folders, these were created by 'Save Page As' in Iceweasel 3.5.11. I am trying to copy the contents of this directory to a similar directory on a 2GB USB thumbdrive /dev/sdb1 which was partitioned and formatted as fat32 by Qparted. Problem is that the copying ceases after about 6 files transfer. I found that (as I am sure you know) the named.html files come with a matching named_files folder, and often there are what appear to be invalid characters such as '*','?',and ':' in the filenames in said named_files folders.
After exhaustive googling [I know we all say that] I found an instruction:
Code:
pax -rw -s '/[*?:]/_/gp' stuff /fat32/partition
that changes the name of the files, replacing said characters with '_', but whilst I can get pax from my repos, I really don't want to 'archive' the files - since I understand that pax was created to bridge a war between tar and cpio - because I want to be able to read the html files on an old (not connected to the Internet) WinXP tablet. So, I believe that I need to create a script, that scans all the filenames, greps and seds to replace said 'unacceptable' characters. I am assuming that Firefox on the Tablet PC will be able to open the htmls if I can get them onto the thumb drive. Are there any other known characters in filenames that M$ file systems can't handle?
View 1 Replies
View Related
Aug 9, 2010
I need a script to copy music from a network drive to my local disk. I require the script to auto mount the remote server, then to create the directory path to the mp3's I have a list of all teh songs in the following format, note some have spaces.
\7800SPARE4UsersPublicMusicSample MusicKalimba.mp3 \7800SPARE4UsersPublicMusicSample MusicMaid with the Flaxen Hair.mp \7800SPARE5UsersPublicMusicSample Song Sleep Away.mp3
I can use the following to mount the directory:
mount -t cifs //7800SPARE4/Users /dest-o username=user,password=pass
I'm thinking the best way would be to get the share name 7800SPARE and the grep for all these in the list, then mount it and do a while read LINE However I would need to creat the folders, I am unsure on how to do this. I think I would need to sed the backslashes to forward ones and then use rsync? Then unmount and move on to the next ones, if I can't mount the share It would be nice to log it and skip it.
View 2 Replies
View Related
May 1, 2010
I upgraded to Lynx.When I plug in a USB drive, the drive icon no longer appears on my desktop.If I go to Places/Computer it shows up.And once I open it, the icon appears on the desktop.
View 1 Replies
View Related
Jun 27, 2011
I am getting a new 4kb sector HDD for my laptop, WD scorpio black 750gb, I would like to image existing partitions on 512bytes sector HDD and move them to the new 4kb sector HDD, what's the best way to do this.
present config is as follows:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
[Code].....
I am planning to keep the same three partitions as the primary partitions on the new drive and add few more logical partitions. I would have liked to move to GPT but since I need Win 7, I am stuck with MBR partiotion table.
Now, I understand how to partition an Advanced format disk, what I want to know is how to move the existing partitions on the 80 Gb disk to the new disk?
I use Clonezilla to copy partitions but it is not compatible unless both the target and the source disks are already using 4096 sector size.
I can use Acronis True Image WD Edition to clone Win 7 but how do I clone Ubuntu?
Also my Laptop's chipset is limited to SATA 1.5, will it cause any issues, I know the bandwidth is not an issue.
View 7 Replies
View Related
Jan 3, 2011
my linux server is running with an old IDE hard drive getting these hdparm results:
[code]...
i have a WD Raptor drive i'm going to install and put a fresh install of linux on it. i'm just curious, will using a much faster HD as my main drive increase the speeds of my network transfers from the raid drive? do transfers only go as fast as the system drive?
View 3 Replies
View Related
Mar 30, 2010
The software: Ubuntu Server Edition 9.10.The wetware: A programmer doing his best (read: ignorant, shitty) as an ad-h.When I plug the USB thumb drive in, the install OS gives it a drive letter -- /dev/sdb -- and it pushes the original /dev/sdb down to /dev/sdc. The installation works without a hitch, and GRUB2 installs, dutifully pointing the root at /dev/sdc1 instead of /dev/sdb1.I let GRUB2 start normally ("drive not found"), holding the <shift> key to get to the "rescue>" prompt.From there, I issue "ls" to discover that GRUB can NOT see /dev/sdb, and I can tell that because what is showing up as (hd1) does NOT have three partitions as it should.GRUB2 sees a total of 16 drives, not 26, and one of the drives it sees is "fd0" (there is no floppy drive).Issuing commands like "set prefix=(hdx,y)" and "root=(hdx,y)" have no effect as, I think it's just pointing to the (reiserfs)content drives and this GRUB2 tells me "unknown filesystem".I did try them all in vain, hoping that maybe I'd find a kernel somewhere.I used the "rescue" mode of the Ubuntu installer (the USB thumb drive) to get to a root prompt.From there, I mounted /dev/sdc2 (the "shifted" /dev/sdb2) onto /mnt, I mounted /dev/sdc1 (the "shifted" /dev/sdb1) onto /mnt/boot,and then I chroot'ed to /mnt.I edited /boot/grub/grub.cfg, editing every instance of "root=(hd2,1)" to the appropriate UUID for the "real" /dev/sdb1. Then I issued update-grub2.It refused to work giving me an banal "no such partition" error or something like that.
We originally had this server functioning by putting / and /boot on the SS SanDisk, which caused no problems during installation because /dev/sda doesn't get shifted.We then figured it was a good idea to put our OS files on something with failover capability. And that started us down this crappy "shifting drive letter" path.Can I control which drive letter the USB thumb drive gets assigned during the install process?If I could make it be /dev/sdc then I wouldn't be facing this problem.An alternate solution would be to know the cryptic GRUB2 commands that I can issue from the command prompt post-install, pre-reboot.But I'm wondering if that will ultimately work at all considering that GRUB2 couldn't see /dev/sdb at all.
View 2 Replies
View Related
Feb 5, 2011
So I install Ubuntu 10.10 on a multi-drive, dual boot with windows 7 computer. At almost the end of the install, I see "running grub-install sda" or whatever it is. sda is my windows drive.So rather than asking where to install the bootloader or give you the option like it used to, it just did it to my "first" drive.
What the hell? Now my Windows MBR is gone. I like to maintain that so if my linux drive dies I can still boot into windows via the old windows boot loader.Possible to move Grub2 to my other drive and repair windows 7 drive MBR?
View 3 Replies
View Related
May 30, 2011
I have 350GB external Western Digital USB hard Drive.When I try to remove it from the system by executing Safely Remove Drive menu the fedora 15 system gets stuck.The processor starts giving a hum sound and it goes on even if it is left for half an hour in the stuck state.The Mouse is not working and everything is halted.
View 13 Replies
View Related
Feb 12, 2011
i have ubuntu 10.10 installed on a 40gb hard drive and have setup arch linux on a seperate 160gb drive and am at the Choose bootloader screen of Arch Linux. My question is do i use arch linux to reinstall GRUB or do I choose none and configure GRUB to see both? if its the later can you tell how. Oh and Ubuntu is on sda and Arch is on sdb
View 6 Replies
View Related
Nov 1, 2010
I have a second hard drive in my desktop and both the main dirve and second drive are 250GB. I use the second drive for backups, both manual and using back in time. The other day I noticed that the second drive was formated in FAT32. If I go to disk utility and look at the drive it says:Usage:FilesystemPartition Type:Linux (0x83)Type:FAT(32-bit version)Is this ok? I thought in Linux it should be Ext4. So far its been working fine for a while now but if I need to move my files and re format it to ext4 and move them back I would rather do it now when there is less data on the drive.
View 3 Replies
View Related
Mar 20, 2010
I have minor problem with upgrading a hard drive. I am running an old pentium lll with two hard drives. On the first hard drive I have two partitions of around 90GB each. On the first partition is installed winXP and on the second partition I have Suse 10.3, both booted by grub and living happily side by side. My second hard drive (which is formatted for windows is only 4GB.
My problem arises when I try to replace the 4GB with a 80Gb hard drive. When I disconnect the 4GB drive the system fails to boot up and complains with error 21.
View 8 Replies
View Related
Dec 4, 2009
i want copy files in ftfs drive to ext3 drive. how am I do this?
View 2 Replies
View Related
Mar 22, 2010
I have a 120 gig drive that I'd like to clone before it fails completely. I was thinking I'd pull the drive from the server and build a separate machine that has it's own os installed and the source and destination drive. Does anyone know of any linux tools will will do a full drive copy? Additionally, If possible, I'd like to move to a larger drive. how I'd migrate the 120 drive to a 400 or so? 1 idea I have is to install os on 2 new drives to where it they will boot, Then boot with one and copy source to the newly created destination drive.
View 6 Replies
View Related
Feb 27, 2011
I have a USB drive on which I want to install Arch Linux (using the installer, not unetbootin or something similar, as I want the drive to be persistent.) The computer from which I want to boot this USB supports booting from a USB floppy, not a normal drive. Is there any way for me to make a USB floppy on another drive and use that to boot the normal USB drive?
View 2 Replies
View Related
Jan 23, 2010
I wanted to know if i can install 9.10 onto a usb flash drive--without using my computers hard drive at all when running ubuntu off the flash drive-
View 3 Replies
View Related
Apr 7, 2010
I recently scapped XP Pro on an old laptop (Toshiba Portege 7220)as it was so slow and I installed Ubuntu 9.10 - All installed ok and it worked fine for about a month. Last week I switched on, got the Ubuntu splash screen and thats where it stayed. I gave lappy to a friend of mine that knows about Pc's (hahaha). When I got it back he said he'd wiped the HDD and partially installed xp. The install apparantly hung after the reformat and copying files onto it.My problem now is I can't boot from HDD, Ubuntu Live CD or Windows CD - Laptop is set to boot from cd then hdd.When I try to boot from CD, the cd is read as I hear the drive being used also see light for cd flashing, after a while i get a blank screen with flashing cursor in top left corner and the cd stops.If I remove the HDD and put it in external usb caddy I can see the windows folders/files when plugged into my desk top.My questions are :-
1. Is there any way to make the drive reusable as a internal drive again as I know it works as an external drive.I would like to reinstall Ubuntu on it
2. Is it a fault with the laptop itself - how do I check
View 5 Replies
View Related
Aug 2, 2010
I was trying to figure out how to get my network drive to mount as a local drive on my computer. This was back on 9.10. Since I've upgraded to 10.04, my boot process halts and tells me (paraphrasing) /shared is not ready to mount. To continue, pres S to skip or M to manually mount the drive.
Well, I have it mounting now through GVFS and I don't need this in my startup anymore. Frankly, it's just annoying that it won't boot into Ubuntu right away. So, what's the startup file I need to edit to remove the attempt to mount the network drive?
View 1 Replies
View Related
Aug 23, 2010
I have only been using Ubuntu since shortly after Lucid was released. I am a new convert and use it to run a back-up device / media server I have a total of 5 hard drives in the device. I have the Lucid system files written to /dev/sde. I am running a Raid 1 array with mdadm on /dev/sdc and /dev/sdd. I have been prepping to run a second raid 1 array with /dev/sdb and /dev/sda with the ext4 file system. I formatted /dev/sda to have a full partition of /dev/ sda1. I then went to do the same to /dev/sdb and the drive was missing from both gparted and the native disk utility. My array with sdc and sdd is still running with both drives working fine.I swapped the sata cable from sda and sdb with no change. The system will not recognize sdb no matter what I do but it does skip /dev/sdb in boot up which tells me it does see it.I have provide the output of the commands df, fdisk -l, and cat /proc/mdstat.
View 2 Replies
View Related
Aug 26, 2010
I just booted one of my computers from a usb drive I had installed Ubuntu 10.04 LTS to, and when I booted it up on that computer, it worked fine. Then, when I powered down the computer and booted it back up to the main hard drive, it booted to the same that my flash drive was running, but my flash drive was not plugged in!! How is this possible? Did it copy itself over my other operating system? There is no trace of it. By the way, that, too, was ubuntu 10.04.
View 2 Replies
View Related
Jun 11, 2011
Back in Febuary, my wife bought a Toshiba Satilite from Wal-Mart and a few days ago the hard drive got toasted. So now I'm using an 8gig usb drive as the boot drive. I also have 2 other flash drives for downloads and such but overall I am very pleased.
I'm running 11.04 32 bit and was wandering if 64 bit made a difference. I've got 4 gigs of ddr3. It's slow to boot, but once it's running, it's faster then Windows 7. Very nice.
Is there anything I should chage, use, since I'm running it off a flash drive??
I have 3 seperat drives, 2 x 16 gigs and an 8 gig, and was wandering which one would be best for booting off of? What do I look for??
Here's what I got:
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS880 Host Bridge
00:01.0 PCI bridge: Toshiba America Info Systems Device 9602
00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2)
[Code]....
View 5 Replies
View Related
Jun 19, 2011
I would like to install Linux Ubuntu 11.04 on an external hard drive - its partitioned and ready for Linux.I've downloaded and burnt the .iso file to a DVD so its all good so far...First of all... is this possible without messing up my macbook? I don't particularly want to break into my macbook to disconnect the hard drive (I read on a tutorial for a previous version of Ubuntu that I'd have to do that... - does it still apply to 11.04?) - as it voids the warranty (I checked ).The reason I ask this is because I had a friend who partitioned their internal hard drive and installed Ubuntu on it. But after installation was complete they couldn't boot up Windows 7 or Ubuntu... and it resulted in them having to clean install Windows 7... - I don't want to end up in that situation
Second... If it is possible to install it without messing up my macbook... - Do I just follow the install instructions but just make sure that where possible I make sure that everything is installed on my external hard drive?...I really need someone to put my mind at rest that everything will run smoothly and that I'll be able to run Mac OS X as usual but also that I'll be able to boot from my external hard drive to run Ubuntu.
View 2 Replies
View Related
Jun 20, 2010
I bought an 8GB flash drive because my D drive doesn't read DVDs. Anyway, my goal is to install Linux ubuntu and have it be my OS (replacing Windows XP). Last night I went to the Ubuntu homepage and downloaded the Ubuntu desktop edition 32-bit and put it on my flash drive. I followed the instructions on how to open and run it, but I was never asked about whether I want Linux to run side by side with Windows or if I want it to replace Windows. It downloaded the whole program, my computer restarted and then (on a black screen) it asked if I wanted to use Windows XP Home Edition or Linux Ubuntu. It's really frustrating because it took a while to download and install it in the first place AND to top that off, when I tried to use Ubuntu it went to a black screen and at the top said that there was an error. So I uninstalled all the ubuntu program and software and now I have a clean slate and want to try this again. I am a complete n00b. Could someone please walk me through how I can go about downloading (w/ links plz), installing and making ubuntu my ONLY OS on my computer via a flash drive? I'm desperate and I don't want to go through all of that and make the same mistake again!
View 9 Replies
View Related