LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-19-2008, 10:46 AM   #1
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 245
Blog Entries: 2

Rep: Reputation: 41
Editing and writing directly to USB flash drive?


I have a 1G USB flash drive which was rendered useless when I tried to remove the U3 system from it (No computer that runs WinXP or 2000 but one U3 uninstaller tried on Win Vista which left the USB having only a wopping 512B usable). Anyway, I figured this would be a great opportunity to learn how to work with drives in C (perhaps even freebasic and freepascal, too, since I know more of those languages...).

I am trying to learn more low level programming, and figure that working with drives would be the easiest place to start. Also, I've found lots of tutorials in C, but haven't had any luck in finding any tutorials on reading the BIOS and using it. Perhaps some assembler would be good, but I don't know which assembler tutorials would be appropriate.

where should I start?
What should I read?
What tutorials might there be?

Anyway, if someone would like to help me to keep from sorting through a million and one pages on programming in C++, C#, out of date assembler or web pages that give examples of how to write a game, windows program, gtk, api, gl, etc I'd appreciate it...

Thanks...

<Edit> DUH! Just had to do a search for low level programming tutorials...Anyway, if you'd still like to help me find something to learn how to edit the partition information, etc on the flash drive......I'm busying myself going through this tutorial.

Last edited by Mol_Bolom; 11-19-2008 at 11:17 AM.
 
Old 11-19-2008, 02:30 PM   #2
mmarshall
Member
 
Registered: Apr 2004
Location: Bedford, Texas (DFW area)
Distribution: ArchLinux
Posts: 41

Rep: Reputation: 15
For learning about working with partition tables, perhaps reading the fdisk source code would be interesting?

And Linux abstracts away the 'USB' part of the drive. When you read/write /dev/sdX a USB drive looks no different than a SATA or IDE drive.

MWM
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fedora 7: autofs is not mounting USB flash drive or DVD ROM drive Hewson Linux - General 3 05-12-2008 08:58 AM
Writing files to flash drive in the right order andy_g_gray Linux - Hardware 3 11-26-2006 10:50 AM
Problems with reading & writing to USB Flash Drive LordSurvivoR Linux - Hardware 8 01-31-2006 02:45 PM
slow writing to flash drive obstinatesod Linux - Newbie 11 01-03-2006 03:14 AM
USB Flash memory writing problem tajuton Linux - Hardware 8 02-18-2004 02:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration