rsenn / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

dd not working correctly with of=(md) device #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

dd if=()/ntldr of=(md)0x800+128
cat --hex --length=32 (md)0x800+1
dd if=()/ntldr of=(md)0x800+129
cat --hex --length=32 (md)0x800+1
dd if=()/ntldr of=(md)0x800+800
cat --hex --length=32 (md)0x800+1

device is NTFS USB HDD

What is the expected output? What do you see instead?

ntldr begins with E9 D5 01 EB

first dd command gives expected result
2nd and 3rd dd command give incorrect results

What version of the product are you using? On what operating system?
0.4.5c May 2013

Please provide any additional information below.

It seems that dd is transferring in 0x10000 byte blocks but the memory buffer 
pointer for (md) is not advanced by 0x10000 if there is more than one block 
read?

see http://reboot.pro/topic/17264-grub4dos-find-and-boot/page-4#entry172911 and 
next post

Original issue reported on code.google.com by Steve6375 on 29 May 2013 at 3:01

GoogleCodeExporter commented 9 years ago
seems to be an issue with (md)0x800

any value between (md)0x800 and (md)0x87F gives the wrong result

Is this a gate_a20 issue?

Original comment by Steve6375 on 29 May 2013 at 3:24

GoogleCodeExporter commented 9 years ago
physical address range from 1M to 32M is reserved for grub4dos internal code 
and data. Users should not use this range.

Original comment by tinyb...@gmail.com on 30 May 2013 at 2:29

GoogleCodeExporter commented 9 years ago
If we should not use that range (1-32M) why is this not documented and why is 
there no warning from grub4dos?
Can you tell us what ranges between 1-32M are used by grub4dos?
Thanks
Steve

Original comment by Steve6375 on 30 May 2013 at 2:40

GoogleCodeExporter commented 9 years ago
> not documented? no warning?

Perhaps it is because grub4dos always lacks docs, or there is not enough time 
to write docs/warnings.

> what ranges between 1-32M are used by grub4dos?

The whole range 1-32M are reserved for future use by grub4dos. Some 
conventional memory ranges may be used by users. I think chenall would document 
them.

User programs(that is, the process' code/data) may use memory at 32M. The 
kernel command(for loading Linux kernel) also use memory at 32M. Both will 
destroy(overwrite) data at 32M.

Original comment by tinyb...@gmail.com on 31 May 2013 at 10:23