Wade
Thanks for reminding me about "cat".
I used "cat -v|ls" to look at the boot
sectors and figure out what I wanted.
Clint
Then I wrote the sectorzero.icn
program to read/write boot sectors.
When I figure out where the partition
table is, I'll be able to read/write it.
(Next time I boot Linux, I'll make a
copy of sectorzero.icn & email it to you.)

Main caveats: you need to become
root to access the partitions; the boot
sector has a check sum at the end.

Dick McCullough
Ayn Rand do speak od mKR done;
mKE do enhance od Real Intelligence done;
knowledge := man do identify od existent done;
knowledge haspart proposition list;
http://mKRmKE.org/

----- Original Message ----- 
From: "Wade Bowmer" <[email protected]>
To: "Clinton Jeffery" <[email protected]>; "Richard H. McCullough" 
<[email protected]>
Cc: "Unicon group" <[email protected]>
Sent: Saturday, March 07, 2009 12:08 AM
Subject: Re: [Unicon-group] read/write partition


> On Sat, 07 Mar 2009 18:46:39 +1100, Clinton Jeffery
> <[email protected]> wrote:
>
>> Hi Richard,
>>
>> Sorry, Unicon does not have any functions that read/write the partition
>> table, nor
>> any of the other applications you mention. It would be possible to write 
>> raw
>> low-level
>> disk access functions using the dynamic loading and C-calling interface, 
>> but
>> I am
>> not aware of someone who has done it yet.  If anyone else in the group is
>> interested,
>> or has done something similar in Icon or Unicon, I'd love to hear about 
>> it.
>
> Richard, if you're working in Linux, you should experiment with reading 
> /dev/hda with the normal open() function. It is possible to head the 
> parition table with normal file reading tools like head and cat, so I 
> imagine Unicon would also succeed. It's just up to you to decode it 
> (remmeber strings start at [1] in Icon! I've fallen foul of that 
> discrepancy decoding niche filesystems in Unicon...). :-)
>
>
> n Fri, Mar 6, 2009 at 11:34 PM, Richard H. McCullough
>> <[email protected]>wrote:
>>
>>> I'm trying to set up boot programs for Linux.
>>> Does Unicon have any special functions that
>>> read/write partitions?  i.e., how can I read/write
>>> inodes, boot programs, partition tables, etc.
>>> that are not files in the file system.
>>>
>
> 



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to