<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>msys &#8211; Virtually Fun</title>
	<atom:link href="https://virtuallyfun.com/category/msys/feed/" rel="self" type="application/rss+xml" />
	<link>https://virtuallyfun.com</link>
	<description>Fun with Virtualization</description>
	<lastBuildDate>Thu, 25 Mar 2021 11:03:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.1</generator>
	<item>
		<title>Couldn&#8217;t reserve space for Cygwin&#8217;s heap</title>
		<link>https://virtuallyfun.com/2020/08/24/couldnt-reserve-space-for-cygwins-heap/</link>
					<comments>https://virtuallyfun.com/2020/08/24/couldnt-reserve-space-for-cygwins-heap/#respond</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Mon, 24 Aug 2020 08:04:42 +0000</pubDate>
				<category><![CDATA[gcc]]></category>
		<category><![CDATA[microsoft windows]]></category>
		<category><![CDATA[mingw]]></category>
		<category><![CDATA[msys]]></category>
		<category><![CDATA[Win32]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/wordpress/?p=10451</guid>

					<description><![CDATA[I have this old toolchain that relies on MSYS 1.0 from 20+ years ago. It&#8217;s great. I know others always love the newer, but I&#8217;m happy with this one. Well this morning I wanted to rebuild some Qemu 0.90 thing &#8230; <a href="https://virtuallyfun.com/2020/08/24/couldnt-reserve-space-for-cygwins-heap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="979" height="512" src="https://virtuallyfun.com/wp-content/uploads/2021/03/cygwinheap-problem.png" alt="" class="wp-image-10917" srcset="https://virtuallyfun.com/wp-content/uploads/2021/03/cygwinheap-problem.png 979w, https://virtuallyfun.com/wp-content/uploads/2021/03/cygwinheap-problem-300x157.png 300w, https://virtuallyfun.com/wp-content/uploads/2021/03/cygwinheap-problem-768x402.png 768w, https://virtuallyfun.com/wp-content/uploads/2021/03/cygwinheap-problem-500x261.png 500w" sizes="(max-width: 979px) 100vw, 979px" /></figure>



<p class="wp-block-paragraph">I have this old toolchain that relies on MSYS 1.0 from 20+ years ago.  It&#8217;s great.  I know others always love the newer, but I&#8217;m happy with this one.</p>



<p class="wp-block-paragraph">Well this morning I wanted to rebuild some Qemu 0.90 thing and I got this fun error trying to run configure:</p>



<pre class="wp-block-code"><code>      0 &#91;main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x440000, State 0x10000
d:\mingw\msys\bin\bash.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
</code></pre>



<p class="wp-block-paragraph">What the heck?!  MSYS uses cygwin?  I guess I should have known.  So the solution is to <a href="https://blog.csdn.net/wzhg0508/article/details/46239761">&#8216;rebase&#8217; the DLL</a>, as it tries to take a static &#8216;grab&#8217; at some memory block, because&#8230;. I guess subsystems or loaded DLL&#8217;s suck?</p>



<p class="wp-block-paragraph">I rebooted and got the same error.</p>



<p class="wp-block-paragraph">So obviously it&#8217;s a lot more involved.</p>



<p class="wp-block-paragraph">So looking the rebase I have is part of the Platform SDK.  Maybe there are others.</p>



<pre class="wp-block-code"><code>D:\MinGW\msys\bin&gt;"D:\MinGW\include\directx\Microsoft Visual Studio 8\VC\PlatformSDK\Bin\rebase" -b 0x50000000 msys-1.0.dll

REBASE: Total Size of mapping 0x0000000000110000
REBASE: Range 0x0000000050000000 -0x0000000050110000</code></pre>



<p class="wp-block-paragraph">And now I can run stuff again. YAY.</p>



<p class="wp-block-paragraph">I&#8217;m sure this has been covered time and time again, but you know it&#8217;s mostly to remind me in another 20 years.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2020/08/24/couldnt-reserve-space-for-cygwins-heap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Running Windows 2003 r2 x64 on Qemu 0.9.0</title>
		<link>https://virtuallyfun.com/2009/07/10/running-windows-2003-r2-x64-on-qemu-0-9-0/</link>
					<comments>https://virtuallyfun.com/2009/07/10/running-windows-2003-r2-x64-on-qemu-0-9-0/#comments</comments>
		
		<dc:creator><![CDATA[neozeed]]></dc:creator>
		<pubDate>Fri, 10 Jul 2009 21:00:00 +0000</pubDate>
				<category><![CDATA[gcc]]></category>
		<category><![CDATA[mingw]]></category>
		<category><![CDATA[msys]]></category>
		<category><![CDATA[QEMU]]></category>
		<category><![CDATA[Windows 2003 r2 x64]]></category>
		<guid isPermaLink="false">https://virtuallyfun.com/?p=135</guid>

					<description><![CDATA[This took me a LOT longer then it should have to figure out. So for anyone else wanting to run the 64bit versions of Windows on Qemu (I havent tested Vista/2008/7 yet) Only version 0.9.0 will work. Because sourceforge is &#8230; <a href="https://virtuallyfun.com/2009/07/10/running-windows-2003-r2-x64-on-qemu-0-9-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>This took me a LOT longer then it should have to figure out. So for anyone else wanting to run the 64bit versions of Windows on Qemu (I havent tested Vista/2008/7 yet) Only version 0.9.0 will work.</p>
<p>Because sourceforge is still giving me errors I&#8217;ll provide direct links&#8230;</p>
<p>Anyways to buidl Qemu you&#8217;ll need a MinGW/MSYS enviroment. The new stuff works on Vista x64 so that&#8217;s good to me, as it&#8217;ll run natively.</p>
<p>You&#8217;ll need the following files:</p>
<p><a href="http://vpsland.superglobalmegacorp.com/install/mingw/MinGW-5.1.4.exe">MinGW-5.1.4.exe</a><br />
<a href="http://vpsland.superglobalmegacorp.com/install/mingw/MSYS-1.0.11-rc-1.exe">MSYS-1.0.11-rc-1.exe</a><br />
<a href="http://vpsland.superglobalmegacorp.com/install/mingw/msysDTK-1.0.1.exe">msysDTK-1.0.1.exe</a><br />
<a href="http://vpsland.superglobalmegacorp.com/install/mingw/w32api-3.13-mingw32-dev.tar.gz">w32api-3.13-mingw32-dev.tar.gz</a><br />
<a href="http://vpsland.superglobalmegacorp.com/install/mingw/mingwrt-3.15.2-mingw32-dev.tar.gz">mingwrt-3.15.2-mingw32-dev.tar.gz</a></p>
<p>First, install MinGW by choosing the &#8216;current&#8217; version, then check the following options:</p>
<p>*MinGW Base tools<br />
*G++ compiler<br />
*MinGW make</p>
<p>Allow it to instal into c:\MinGW</p>
<p>Next install MSYS with the default options. Then it&#8217;ll ask you the following, respond as I have:</p>
<blockquote><p>Do you wish to continue with the post install? [yn ] y</p>
<p>Do you have MinGW installed? [yn ] y</p>
<p>Please answer the following in the form of c:/foo/bar.<br />
Where is your MinGW installation? c:/mingw</p></blockquote>
<p>Install msysDTK with the default options.</p>
<p>Now you should be able to run the msys CLI<br />
Start -&gt; run -&gt; mingw -&gt; msys -&gt; msys</p>
<p>Let&#8217;s expand out the win32api &amp; mingw32 dev updates:</p>
<blockquote><p>cd /mingw<br />
tar -zxvf /c/install/qemu-build/w32api-3.13-mingw32-dev.tar.gz<br />
tar -zxvf /c/install/qemu-build/mingwrt-3.15.2-mingw32-dev.tar.gz</p></blockquote>
<p>Now your &#8216;gcc -v&#8217; should return something like this:</p>
<blockquote><p>Reading specs from c:/mingw/bin/../lib/gcc/mingw32/3.4.5/specs<br />
Configured with: ../gcc-3.4.5-20060117-3/configure &#8211;with-gcc &#8211;with-gnu-ld &#8211;wi<br />
th-gnu-as &#8211;host=mingw32 &#8211;target=mingw32 &#8211;prefix=/mingw &#8211;enable-threads &#8211;dis<br />
able-nls &#8211;enable-languages=c,c++,f77,ada,objc,java &#8211;disable-win32-registry &#8211;d<br />
isable-shared &#8211;enable-sjlj-exceptions &#8211;enable-libgcj &#8211;disable-java-awt &#8211;with<br />
out-x &#8211;enable-java-gc=boehm &#8211;disable-libgcj-debug &#8211;enable-interpreter &#8211;enabl<br />
e-hash-synchronization &#8211;enable-libstdcxx-debug<br />
Thread model: win32<br />
gcc version 3.4.5 (mingw-vista special r3)</p></blockquote>
<p>Ok, now let&#8217;s build the prerequisits, zlib &amp; SDL.</p>
<p><a href="http://www.zlib.net/zlib-1.2.3.tar.gz">zlib-1.2.3.tar.gz</a></p>
<blockquote><p>cd /<br />
mkdir -p /usr/src<br />
cd /usr/src<br />
tar -zxvf /c/install/qemu-build/zlib-1.2.3.tar.gz<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>Now SDL.</p>
<p><a href="http://www.libsdl.org/release/SDL-1.2.13.tar.gz">SDL-1.2.13.tar.gz</a></p>
<blockquote><p>tar -zxvf /c/install/qemu-build/SDL-1.2.13.tar.gz<br />
cd SDL-1.2.13<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>Now we need to tweak some things that MinGW seems to have issues finding in the /usr/local path.. I&#8217;m sure there is a better &#8216;fix&#8217; but hell, this is quick &amp; cheap!</p>
<blockquote><p>cd /mingw/include<br />
ln -s /usr/local/include/zconf.h .<br />
ln -s /usr/local/include/zlib.h .<br />
ln -s /usr/local/include/SDL .<br />
cd /mingw/lib<br />
ln -s /usr/local/lib/libSDL.a .<br />
ln -s /usr/local/lib/libz.a .<br />
cd /bin<br />
ln -s true.exe texi2html.exe<br />
ln -s true.exe pod2man.exe</p></blockquote>
<p>Ok, now we just need the source to Qemu 0.9.0&#8230;. It&#8217;s becoming something RARE which is weird considering just how compatable this version is&#8230; So I&#8217;d recommend keeping a copy in email or something.</p>
<p><a href="http://ftp.riken.go.jp/pub/FreeBSD/distfiles/qemu/qemu-0.9.0.tar.gz">qemu-0.9.0.tar.gz</a></p>
<blockquote><p>cd /usr/src<br />
tar -zxvf /c/install/qemu-build/qemu-0.9.0.tar.gz<br />
cd qemu-0.9.0<br />
./configure &#8211;target-list=x86_64-softmmu<br />
make</p></blockquote>
<p>Now instead of the usual Qemu 32bit x86 emulator, you&#8217;ll get qemu-system-x86_64.exe in the x86_64-softmmu directory. Running it is just like the regular Qemu. So first I&#8217;m going to create a 16GB disk to boot from like this:</p>
<blockquote><p>qemu-img create -f qcow win64.disk 16G</p></blockquote>
<p>*NOTE if you have any issues where it just doesn&#8217;t work, use the qemu-img from <a href="http://www.h6.dion.ne.jp/~kazuw/qemu-win/qemu-0.9.0-windows.zip">here</a>. I&#8217;ve had issues with the one that I&#8217;ve built, but the emulator works&#8230;. go figure.</p>
<p>Now let&#8217;s boot from the disc:</p>
<blockquote><p>$ x86_64-softmmu/qemu-system-x86_64.exe -m 1024 -L pc-bios/ -hda win64.disk -cdrom en_win_srv_2003_r2_enterprise_x64_cd1.iso -net nic,model=rtl8139 -net user -boot d</p></blockquote>
<p>Now if you don&#8217;t have the ISO files, and have physical discs don&#8217;t fret! It&#8217;s easy to have Qemu point to them&#8230; Let&#8217;s say your CD-ROM (DVD/BR disk) is D: then it&#8217;s just a matter of running:</p>
<blockquote><p>$ x86_64-softmmu/qemu-system-x86_64.exe -m 1024 -L pc-bios/ -hda win64.disk -cdrom \\.\d: -net nic,model=rtl8139 -net user -boot d</p></blockquote>
<p>Easy, right? Remember the -m flag for memory, otherwise your VM will run in a TINY 128mb of ram.. And it&#8217;ll be insanely SLOW.</p>
<p>And then you&#8217;ll get this!</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-1.jpg"><img decoding="async" class="alignleft size-full wp-image-8364" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-1.jpg" alt="" width="736" height="432" /></a></p>
<p>The first screen.. It doesn&#8217;t sound all that 64 bit does it?</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-2.jpg"><img decoding="async" class="alignleft size-full wp-image-8365" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-2.jpg" alt="" width="736" height="432" /></a><br />
Now we are talking! It certainly is the 64 bit version&#8230; It reminds me of the PowerPC/MIPS/Alpha builds where once the Kernel has loaded, it&#8217;s all Windows NT..</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-3.jpg"><img loading="lazy" decoding="async" class="alignleft size-full wp-image-8367" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-3.jpg" alt="" width="736" height="432" /></a><br />
Select your partition, and let&#8217;s format away!</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-4.jpg"><img loading="lazy" decoding="async" class="alignleft size-full wp-image-8368" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-4.jpg" alt="" width="736" height="432" /></a><br />
Time for the file copy&#8230; This will take a while.</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-5.jpg"><img loading="lazy" decoding="async" class="alignleft size-full wp-image-8369" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-5.jpg" alt="" width="736" height="432" /></a><br />
Finally!</p>
<p>Then it&#8217;ll reboot, and you&#8217;ll get the happy bootloader!</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-6.jpg"><img loading="lazy" decoding="async" class="alignleft size-full wp-image-8370" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-6.jpg" alt="" width="656" height="516" /></a><br />
Bootloader in action..</p>
<p><a href="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-7.jpg"><img loading="lazy" decoding="async" class="alignleft size-full wp-image-8371" src="https://virtuallyfun.com/wp-content/uploads/2009/07/windows-2003-r2-7.jpg" alt="" width="656" height="516" /></a><br />
I haven&#8217;t timed it, but I suspect it&#8217;ll be longer then 39 minutes.</p>
<p>As you can see with the right version of Qemu it&#8217;s trivial to get Windows 2003 r2 x64 running&#8230; It&#8217;s good for doing some .net 32/64 bit testing&#8230; Which reminds me of another tidbit..</p>
<p>Some things in .net land will NOT work on IIS running in 64 bit mode. You&#8217;ll have to throw the switch to get a 32bit .net on IIS. The good news though is that this can take advantage of 2GB for a normal exe, and if you tag it, 3GB to under 4GB of ram.. So the 64bit version is not without waste.</p>
<blockquote><p>%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i -enable<br />
iisreset<br />
CScript &#8220;%SystemDrive%\InetPub\AdminScripts\adsutil.vbs&#8221; set w3svc/AppPools/Enable32bitAppOnWin64 1<br />
iisreset</p></blockquote>
<p>I did verify that this would get sharepoint to run on 2003 x64.. As I always feel better trashing a VM then real iron&#8230;</p>
<p>And don&#8217;t forget the flexibility of the -redir command on Qemu to allow you to redirect ports into the VM&#8230;</p>
<p>Say you want to use terminal server into your VM, you can redirect say port 1000 into the vm by adding:</p>
<blockquote><p>-redir tcp:10000:10.0.2.15:3389</p></blockquote>
<p>Then it&#8217;s a simple matter of using a terminal server client to localhost:10000</p>
<p>I hope this clears up how easy it is to build your own Qemu, and of course how to run something other then the &#8216;normal&#8217; 32bit version of Qemu.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://virtuallyfun.com/2009/07/10/running-windows-2003-r2-x64-on-qemu-0-9-0/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
