Jump to content











Photo
- - - - -

Grub4dos with PAE support


  • Please log in to reply
145 replies to this topic

#26 ireneuszp

ireneuszp

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Poland

Posted 23 January 2010 - 07:31 PM

http://grub4dos-chen...-2010-01-23.zip

Thanks, now it works :whistling:

#27 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 30 January 2010 - 12:27 PM

chenall's grub4dos-0.4.5a-2010-01-23 binary works.
When I tried compiling it from source with my build environment, there is no error during build.
But my newly built grldr and grub.exe, it behave strangely. It cannot find any disk. And it crash after a few seconds.

My build environment is MinGW + MSYS. I can compile (grub4dos-chenall-r29 + my patch20100122 + fixed parentheses in fsys_ntfs.c) with it without problem.

EDIT:
I just notice that grub4dos-chenall r30 is out yesterday. No problem compiling it.

#28 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 10 February 2010 - 05:23 AM

Display progress while reading large file.


Hi karyonix,

Just wondering what is the size of the "large file"?

Also a suggestion: is it possible to always print the loading progress, or provide a parameter to specify this?

Thanks,
Galapo.

#29 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 10 February 2010 - 11:20 AM

@Galapo
Progress indicator is currently only implemented in my grub4dos-0.4.4-pae1-2009-12-29 (based on grub4dos-0.4.4-2009-10-16-src). In this version, it print progress numbers if read length > 32MB.
This feature is not ported to tinybit and chenall's working release yet.
I will make patch soon.

#30 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 10 February 2010 - 11:29 AM

Hi karyonix,

Thanks for the info. I'd tested chenall's latest release, so was curious about the progress indicator. For me, if progress is printed for images larger than 32mb, then that's great.

Looking forward to the implementation of your patch.

Regards,
Galapo.

#31 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 13 February 2010 - 06:33 PM

- Fix : map --mem write to wrong memory location if RAM drive is above 4GB.
Thanks tinybit. http://www.boot-land...?...ost&p=91227
- Progress indicator while reading file larger than 32MB.
- map --mem gzipped image with uncompressed size larger than 4GB. (load correctly but still very slow)

source diff file (for chenall's grub4dos-0.4.5a-2010-02-09) : Attached File  patch20100213.zip   4.74KB   436 downloads
binary for testing (too large to attach here) : http://www.mediafire.com/?ijfkhjhgyk3

#32 L A M A

L A M A

    Silver Member

  • Advanced user
  • 540 posts
  •  
    United Nations

Posted 13 February 2010 - 07:02 PM

Karyonix, You knew I'll download these ;) it looks like I'm first...


BTW, I loved that progress indicator in previous build, don't know why it does not exist in chenall's build ;)

EDIT: IT WORKSSSSSSSSSSSSSSS!!! YESSSSSSSSSsssssssssssss! (I'm on it right now!)

#33 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 13 February 2010 - 08:57 PM

- Progress indicator while reading file larger than 32MB.

Thank you!

Regards,
Galapo.

#34 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 14 February 2010 - 03:48 PM

@Lama
tinybit and other GRUB4DOS developers had already implemented support for 64-bit physical address in many functions and use long mode to access high memory. But at that time, I didn't read the latest source code. I studied 2009-10-16 version and implemented rudimentary 64-bit physical address support in some functions (differently from tinybit's version), use PAE mode, and modify map command, resulting in this thread.
The change in my modified grub4dos is not compatible with the latest experimental version. I made patches for latest version as tinybit suggested. Patches are made for some feature at a time, not all at once. Previous patches are merged into chenall's release.

The latest version use PAE while reading image to memory, and use long mode in 64-bit CPU or PAE mode in 32-bit CPU in disk emulation code.

PAE is just a paging mode in CPU. It made no different to motherboard and RAM whether CPU is in PAE mode or long mode or old 32-bit paging mode. It has nothing to do with memory corruption.

My computer is unstable if I install 4 sticks (=8GB) of RAM on motherboard. It requires adjustment to voltage and memory timing to be more stable be still not as good as 2 sticks.

#35 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 15 February 2010 - 10:07 AM

@Lama #36
1. I suggest you use my file in #31 for a while until the next chenall's release. Then, you should switch to chenall's release.
2. Extraction is done on-the-fly. Intermediate buffer in RAM hold only a small portion of data. Extracted data is not written to disk before copying to destination.

#36 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 12:40 PM

my guessed solutions:


Your probably easier solution :cheers::
Learn how to create the images yourself (as in the Guide by diddy)

You should try, instead of the original MBRBATCH/MKIMG:
http://www.boot-land...?showtopic=3191
the modified one by Lancelot:
http://www.boot-land...?showtopic=5000
http://www.boot-land...?...c=5000&st=5

Or use the DEVCON method:
http://diddy.boot-la...files/disk4.htm

:cheers:

Wonko

#37 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 15 February 2010 - 01:53 PM

How to I resize .IMA file? I got this .IMA (2GB and various others zipped in a guide made by diddy) the problem is that I cannot resize the IMA file with ImDisk's "extend" feature. If I do that, it looses ntfs format and I'm not sure if its usable again.


ImDisk doesn't handle images with a MBR very well. It extends the image and the file system, but it doesn't update the partition table. So the filesystem size and the partition size don't match.

Maybe Olof can fix this? :cheers:

#38 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 03:19 PM

ImDisk doesn't handle images with a MBR very well. It extends the image and the file system, but it doesn't update the partition table. So the filesystem size and the partition size don't match.

Maybe Olof can fix this? :cheers:

No, this is "by design".
http://www.boot-land...?...=2072&st=17

IMDISK is a "filesystem driver".

Use VDK or Microsft VSS driver to mount the image as \\.\PhysicalDrive in order to get access to the MBR.

Wonko

#39 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 15 February 2010 - 04:04 PM

IMDISK is a "filesystem driver".

Use VDK or Microsft VSS driver to mount the image as \\.\PhysicalDrive in order to get access to the MBR.

Wonko


But ImDisk can read the partition table of an image file to get the size of the partition to mount (at least I think that's the way it works). So it should be no problem to modify some bytes of the image file to correct the partition size. No need to mount it as physicaldrive if you can manipulate the image directly :cheers:

#40 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 04:24 PM

But ImDisk can read the partition table of an image file to get the size of the partition to mount (at least I think that's the way it works). So it should be no problem to modify some bytes of the image file to correct the partition size. No need to mount it as physicaldrive if you can manipulate the image directly :cheers:

Sure :cheers:, that's exactly the way it works:
http://www.boot-land...?...=2148&st=21
but if you have the physicaldrive mounted, you have it all accesible, if the image is mounted in IMDISK, the whole image files should be "busy" and you would need to unmount it in order to access the MBR (in the sense of first sector of the image file). (haven't actually tried - needs to be tested and confirmed or denied).

VDK connects only partially with \\.\Physicaldrive, whilst the Microsoft VSS drivers seem like having a "complete" hook to it, so you can use "normal" partion enlarging/reducing tools on it.

Another way is to mount the disk in a Qemu VM booting from Partition Logic:
http://partitionlogic.org.uk/
and resize (NTFS only) from it:
http://partitionlogi...bout/index.html

:cheers:

Wonko

#41 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 15 February 2010 - 04:47 PM

but if you have the physicaldrive mounted, you have it all accesible, if the image is mounted in IMDISK, the whole image files should be "busy" and you would need to unmount it in order to access the MBR (in the sense of first sector of the image file). (haven't actually tried - needs to be tested and confirmed or denied).

Well I guess the ImDisk driver locks the image file while it is mounted. BUT ImDisk has write access to the file :cheers:
So ImDisk should be able to access the MBR (in the sense of first sector of the image file) and fix the partition table if you extend the mounted image size.

btw. I just noticed that ImDisk extends the filesystem of a mounted partition even if other partitions directly follow the mounted one, screwing up not only the partition table, but the filesystem (and data) of the following partition as well. :cheers:

#42 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 04:51 PM

btw. I just noticed that ImDisk extends the filesystem of a mounted partition even if other partitions directly follow the mounted one, screwing up not only the partition table, but the filesystem (and data) of the following partition as well. :cheers:

Yep. :rofl:

And this is reason #2 for using \\.\PhysicalDrive :cheers:

:cheers:

Wonko

#43 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 15 February 2010 - 05:45 PM

And this is reason #2 for using \\.\PhysicalDrive :cheers:


But then you need to have enough 'free space' on the virtual drive to extend the partition. And that most likely means you need to increase the file size of the image file. ImDisk can do this on-the-fly. I don't know if there are any virtual disk drivers that provide 'PhysicalDrive' access which are able to do this.

I still hope Olof can fix the partition table and probably warn if ImDisk extends a partition which is not the last one in the image file :cheers:

#44 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 06:38 PM

But then you need to have enough 'free space' on the virtual drive to extend the partition. And that most likely means you need to increase the file size of the image file. ImDisk can do this on-the-fly. I don't know if there are any virtual disk drivers that provide 'PhysicalDrive' access which are able to do this.

Well, I don't know either but a workaround could be using sparse files and a tool to enlarge them (when offline) before mounting. :cheers:

I seem to remember a similar tool around, but cannot find it right now. :cheers:

:cheers:
Wonko

#45 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 15 February 2010 - 06:59 PM

Writing a tool to enlarge a file shouln't be a problem. I can give it a try if I find some time tomorrow :cheers:

#46 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 February 2010 - 08:11 PM

Writing a tool to enlarge a file shouln't be a problem. I can give it a try if I find some time tomorrow :cheers:

Just in case:
http://www.boot-land...?showtopic=8480
http://www.boot-land...?...=6745&st=38
http://www.boot-land...?...=4856&st=14
http://www.codeproje...parseFiles.aspx
http://support.micro....aspx/kb/957180
http://gbatemp.net/i...p;#entry2479636

:cheers:

Wonko

P.S.: Found 'em, they are Colinux tools:
http://www.henrynestler.com/
http://www.henrynest...in-stripped.zip

http://colinux.wikia.com/wiki/MkSparse
http://colinux.wikia.com/wiki/MkFile

#47 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 16 February 2010 - 03:22 PM

Ooookkkkk :cheers: So out of all this, I'm to assume that there are tools to enlarge IMA files? or TheK will write up something? I thought I was in page number 4 (There goes Lama back to read read :rofl: )


No need to write anything. Wonko already found a tool :rofl:

OK, step by step:

First you need to download the following tools already posted by Wonko:

http://www.henrynest...in-stripped.zip
This package contains the mkFile.exe tool which is what you need to enlarge the image file.
A Description and help for the tool can be found here: http://colinux.wikia.com/wiki/MkFile

Let assume you have an image file (for example c:\test.ima) of 2GB and you want to enlarge it to 3GB.
mkFile -r -g c:\test.ima 3
Now you will have 1GB of free space available to extend your virtual parition.

Then download Partition Logic : http://partitionlogic.org.uk/
Choose the CD version and extract the ISO.

For the next step you need to rename the .ima file to .hdd (for example c:\test.hdd).

Now open VirtualBox and create a new virtual machine.
Add your image file (now with the .hdd extension) as a virtual IDE drive and the Partition Logic ISO as virtual CD/DVD drive.
Start the virtual machine and boot from CD.

Use Partition Logic to resize the partiton and filesystem.

Done :cheers:

#48 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 February 2010 - 03:37 PM

Or you can use Qemu without renaming anything. :cheers:
Win32 ports:
http://lassauge.free.fr/qemu/
http://www.bttr-software.de/qemu/

Qemu Manager site is down, you can download version 6.0 from here:
http://www.brotherso...oad-163091.html

Another one to test is winQemu:
http://sourceforge.n...ojects/winqemu/

:cheers:

Wonko

#49 karyonix

karyonix

    Frequent Member

  • Advanced user
  • 481 posts
  •  
    Thailand

Posted 19 February 2010 - 02:35 PM

@Lama
Just convert disk image to VHD and use Windows 7 diskpart to resize it.
  • Use raw2vhd to convert disk image to VHD format. Then, manually rename its file extension to .vhd.
  • Use Windows 7 diskpart expand command to expand size of virtual disk.
  • Use Windows 7 diskpart extend command to extend size of partition.
EDIT1:

... there must be some command to "Attach" IMG file as another hard disk instead of copying IMA (or IMG) on RAM and then attaching it as HDD.

There is. Read section How to create/mount raw disk image with FiraDisk 0.0.1.12 in opening post of FiraDisk thread. You can attach disk image but cannot boot from it.

#50 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 19 February 2010 - 03:55 PM

Partition Logic does not detect any hard disk :cheers: second, it maybe VirtualBox but I'm not surprised, how can a person simply rename file extension to change its format? :cheers: This concept did work in my media player (mp2 to mp3) but VBox it ceratinly didn't (it saw as Free space instead). While mounting it with ImDisk, it actually got mounted right (but not with 3GB, obviously the partition size has to be increased via partition logic type softwares provided that they're detected by something). QEmu also didn't recognize .IMA :(


I know that you can't change a file format by giving it another extension :smiling9:
But different programs use different extensions for the SAME format :cheers:

You need at least VirtualBox 3.1 or newer and you have to open the image as 'Parallels (*.hdd)' file.
I tested it with VirtualBox 3.1.2 and my own XPRAM_1.img created by IMG_XP_Create and it works.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users