On 01/25/2011 07:02 AM, Gnanasekar Loganathan wrote:
> Hi Vladimir,
>
> I'm using the grub_disk_write function to write the data.
>   
This should work (as long as used right, of course).
> My goal is to erase all the data in that particular partition.
>
>   
GRUB isn't the right place to write so much data. I recommend having a
small kernel with ramdisk.
> Booted os will do read and write operation on that partition.
>
> -Gnana
>
> 2011/1/24 Vladimir 'φ-coder/phcoder' Serbinenko <phco...@gmail.com>:
>   
>> On 01/24/2011 03:49 PM, Gnanasekar Loganathan wrote:
>>     
>>> Hi All,
>>>
>>> I try to opening a file called "(hd0,2,a)+10" from GRUB.
>>>
>>>       
>> This is old syntax. New one is (hd0,netbsd1)
>>     
>>> For me open got success and able read some of the data.
>>> But i'm not able to write some data into the file, getting "out of
>>> partition" error.
>>>
>>>       
>> GRUB has no file writing functions whatsoever, only disk writing
>> (grub_disk_write)
>> You can look into save_env in grub-core/commands/loadenv.c for reference
>> on the limited file overwrite possibilities.
>> I would be able to help better if I knew what your end goal is.
>>     
>>> Kindly help me, how to open, read and write into a raw file from the GRUB.
>>>
>>> FYI: Partition type is NetBSD one.
>>>
>>> If you need any info, kindly revert back.
>>>
>>> Thanks,
>>> Gnana
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/grub-devel
>>>
>>>
>>>       
>>
>> --
>> Regards
>> Vladimir 'φ-coder/phcoder' Serbinenko
>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> http://lists.gnu.org/mailman/listinfo/grub-devel
>>
>>
>>     
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to