LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-01-2016, 05:30 PM   #1
gglq000
Member
 
Registered: Mar 2012
Posts: 65

Rep: Reputation: Disabled
std linux command to dump disk block


hi all, any linux commands available to dump the diskblock (512 byte) using the absolute sector No.?
Similar to int13h ah=42h.
There seems to be a dump command available but it seems it can only deal with ext2 file system.
Thanks.,
 
Old 08-01-2016, 06:49 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
int13/42 copies a block to a memory while running in 16-bit real mode, so is useless when running under an OS. To print the contents of any block of sda to the console do:

Code:
dd if=/dev/sda count=1 skip=$block |hexdump
In a program you can just open the disk, seek to any block and issue a read() command.
 
  


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
[SOLVED] dump command on linux yasin2010 Linux - Server 2 09-07-2010 06:08 AM
linux dump command source code Ajay Mozar Linux - Software 1 04-24-2009 06:18 PM
linux dump command source code Ajay Mozar Linux - Software 1 04-22-2009 06:59 AM

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

All times are GMT -5. The time now is 01:09 PM.

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