LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-08-2010, 03:15 AM   #1
cooljosh
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Question USB Drive detection


Hello experts,
I have one query related to USB detection, how to identify USB is connected to machine while booting( connected USB may not be bootable media in this case HDD is bootable media). I am interested in reading the boot sector of USB media. Please tell me how can I read boot sector of USB. Please share sample assembly code related with my query.


Thanks & Regards,
Suraj
 
Old 11-08-2010, 06:38 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Welcome to LQ!


So you've shown us your need! What's your deed?

We will aid you when you help yourself to a solution. Provide us with what you have attempted and then maybe someone will be able to assist.

I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem/query.



 
Old 11-08-2010, 10:36 PM   #3
cooljosh
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Question Re.USB Detection

Hello Experts,
I have tried following solution for identifying connected USB to machine,
1. Contents of registers,
ah - 0x02 (for reading boot sector),
dl - 0x00, 0x01, 0x02, 0x04, 0x80 to 0x85 (drive number)
Int 13h (bios interrupt)
and checked contents of al (which contains 512 bytes of data) but not able to get correct value of last 4 bytes which are called as MBR signature (55aa).

Please guide me how can I able to identify USB which is connected to machine (PC) and read boot sector and FAT entries of same device.

Thanks in advance,
Suraj
 
Old 11-09-2010, 03:02 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Opps, nevermind.

Last edited by jefro; 11-09-2010 at 07:40 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Usb drive, how to locate it, how to move folder from Usb drive to usr directory eeguy02 Linux - Newbie 5 02-28-2010 11:23 PM
How to set-up automatic external hard drive detection (via Usb 2.0)? mtp Linux - Newbie 2 04-12-2006 02:38 AM
usb drive detection ajburch Linux - Hardware 1 10-23-2005 01:08 AM
drive detection drisay Slackware 4 10-05-2004 03:43 AM
hard drive detection flump Linux - Hardware 2 08-01-2003 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11: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