perlish way to read/write absolute sectors from PC disk? 
Author Message
 perlish way to read/write absolute sectors from PC disk?

Is there a way to do this? The bottom line is I'm trying to find a way
to multiboot dozens of PCs between Win32, Linux and Solaris (and
perhaps more) _automatically_ (i.e. without manual intervention at
boot-up time) by issuing a command "reboot into {OS X}" from whichever
OS* is currently running. Plan A is to read and rewrite MBR and/or
boot sectors to acheive this. If there's a Perlish way of doing this
(across all platforms, natch) it would be nice.

(* I'm including Win32 as an 'OS' just to be provocative :-)

John Stumbles
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Sat, 17 Apr 2004 20:27:32 GMT  
 perlish way to read/write absolute sectors from PC disk?
Of course under Unix you can use `dd` to do this, something like this:

dd if=/dev/hda of=/bootsect bs=512 count=1

Under DOS you can use `debug` but don't know about NT - I guess it would
complain if you try to write to a raw device.  Here are a few
possibilities but I think you will run into the same problem.

The NT Resource kit includes DISKSAVE.EXE which enables a binary image
of the MBR or Boot Sector to be saved. See...

http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=13754

Also there's a utility called mbredit that might do the job...

http://www.kzin.com/bootsec/
http://www.kzin.com/utillc/bin/mbredit.exe

--
  Simon Oliver



Sat, 17 Apr 2004 22:10:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. perlish way to read/write absolute sectors from PC disk?

2. sector read and write

3. ANNOUNCE: LibA2 0.003 (read/write Apple II ProDOS disk images)

4. The perlish way to write this?

5. Writing to a file when disk is full?

6. Corrupted disk writes with SDBM

7. Platform independant way of writing hash to disk?

8. Reading C binary data from disk

9. Can MacPerl read a raw disk

10. Reading IBM PC io address space

11. Errornous read/sysread for PC-Perl?

12. Reading from PC serial port

 

 
Powered by phpBB® Forum Software