Using Qemu to install Linux in a Windows XP
A message that is not in the archive (sent off-list or not yet received): 5100168789854548368@unknownmsgid
Quoted 12 lines
Date: Sat, 13 Nov 2004 15:13:55 -0500
From: Garth Dahlstrom <[email protected] >
Subject: Re: [Qemu-devel] Using Qemu to install Linux in a Windows XP
To: [email protected]
Message-ID: <[email protected] >
Content-Type: text/plain; charset=US-ASCIIQuoted 4 lines
Brett Bonfield wrote:
With QemuInstall-20041111 I get:qemu: could not load PC bios './bios.bin'
Quoted 7 lines
If the windows QEMU doesn't run that is undoubtly my bad, as I'm wrote the menu for it...
It seems after some investigation that there were a number of bugs...
I just made a new version (v20041113) of QEMUMenu available at my site
http://stacktrace.org/
How will we know when the new version has been incorporated into QemuInstall-2004xxxx.exe?
Quoted 8 lines
Fixed:
* -L parameter had a trailing slash, which caused QEMU to fail silently
* -L parameter was not quoted meaning default location in \Program
files\ would not be passed as a single parameter, so QEMU would fail
* Preferences were not being retrieved correctly because working
directory was being changed .bat file location after preferences were retrieved but before they were saved
Quoted 7 lines
Enhancements:
* Added search for *.dat as additional image files so QEMUMenu
picks up Zitu's make-a-file program imagesDrop it into C:\Program Files\Qemu (or where ever you installed to)
Let me know if that fixes everything up...
I ask the above just because I figure someone else may have beaten me to it :^)
Also, would you consider making QEMUMenu.bat work with "dd for Win32" as well as it works with Zitu's program. dd for Win32 is available
here: http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm
The advantage it has over mkqemuimage.exe is that it can make any size images, at least so far as I can tell. The logic John Newbigin emailed goes as follows:
- - -
"The requirement is to create a big empty file which can be presented as a harddisk. Under linux I would do this like this:
dd if=/dev/zero of=myfile.img bs=1024k count=3000
This will give you 3000Meg.
The file will be 'initialised' with \000s. It is possible to create a sparse file which is 'hollow' and will be allocated when you write to it. That can cause problems with some programs though so it is best to avoid that unless you know it works.
Windows does not share the philosophy which makes that kind of command possible.
Under windows, sparse files are not supported so we can use the dd tool in a different way. If you write anything to a large offset (say 3Gig) then all the space before that will be allocated.
Pick a file which you can read and is larger than 1024 bytes and try this command:
dd if=filethatalreadyexists of=newfile.img bs=1k seek=3071999 count=1 here seek is the offset into the newfile to start the writing. The number I am using = 1024 * 3000 - 1 which will give you 3000Meg again."
- - -
Thanks,
Brett
Quoted 8 lines · Brett Bonfield
[...]
Also, would you consider making QEMUMenu.bat work with "dd for Win32" as well as it works with Zitu's program. dd for Win32 is available
here: http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htmThe advantage it has over mkqemuimage.exe is that it can make any size images, at least so far as I can tell. The logic John Newbigin emailed goes as follows:
Then why not fixing mkqemuimage.exe to do that too ?
Fabrice.
[Qemu-devel] SDL compile error
Hi,
I keep getting this error when compiling qemu-fast with Suse 9.2. What
am I doing wrong? SDL and SDL-devel appear to be loaded. Is there an issue with the latest SDL? What version of SDL does qemu-fast work on?
Thanks, Shivkumar Shivaji
/usr/lib/libSDL.a(SDL_loadso.o)(.text+0x12): In function `SDL_LoadObject':
: warning: Using 'dlopen' in statically linked applications requires at runtimethe shared libraries from the glibc version used for linking /usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x43b): In function `_X11TransSocketOpen':
: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking slirp/misc.o(.text+0xc92): In function `getouraddr':/home/shiv/system/qemu-src/qemu/slirp/misc.c:96: warning: Using 'gethostbyname'in statically linked applications requires at runtime the shared libraries fromthe glibc version used for linking /usr/X11R6/lib/libX11.a(x11trans.o)(.text+0xc8f): In function `_X11TransSocketINETConnect':
: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libSDL.a(SDL_fbevents.o)(.text+0x942): In function `find_pid':
: undefined reference to __ctype_b' /usr/lib/libSDL.a(SDL_fbelo.o)(.text+0x465): In function eloSendQuery':
: undefined reference to __ctype_toupper' /usr/lib/libSDL.a(SDL_fbelo.o)(.text+0x5f1): In function eloInitController':
: undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status
Re: [Qemu-devel] SDL compile error
Quoted 8 lines · Shivkumar Shivaji
/usr/lib/libSDL.a(SDL_fbevents.o)(.text+0x942): In function `find_pid':
: undefined reference to__ctype_b' /usr/lib/libSDL.a(SDL_fbelo.o)(.text+0x465): In functioneloSendQuery':
: undefined reference to__ctype_toupper' /usr/lib/libSDL.a(SDL_fbelo.o)(.text+0x5f1): In functioneloInitController':
: undefined reference to `__ctype_tolower'
collect2: ld returned 1 exit status
The above is where the actual errors are. This means that your SDL is based on an older glibc (2.0 or something) but you have upgraded to a newer one (2.3 or something). The undefined symbols are internal glibc symbols which the dynamic loader knows how to resolve (via some hacks in the newer glibc) but which the static linker can't. The real fix is to download SDL source and recompile, that way the new SDL static library will not reference those symbols.
If you want a quick hack, compile the attached ctype_b.c file and link it into qemu-fast. You will probably want to edit the Makefile to do this. (You can also link it into libSDL.a I suppose. I haven't tried this so I do not recommend it.)
Quoted 8 lines
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
#define attribute_hidden
#define CTYPE_EXTERN_INLINE /* Define real functions for accessors. */ #include <ctype.h>
/*#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
const char _nl_C_LC_CTYPE_class[] =
const char _nl_C_LC_CTYPE_toupper[] = {{ 7, 1, 5, 3, 31 }, { 6 * sizeof (uint32_t) }, { 0, 0, 10 * sizeof (uint32_t), 0 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }}; const char _nl_C_LC_CTYPE_tolower[] = {{ 7, 1, 5, 3, 31 }, { 6 * sizeof (uint32_t) }, { 0, 0, 0, 10 * sizeof (uint32_t) }, { 0x00000000, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0xffffffe0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }}; const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);*/
const unsigned short int *__ctype_b = __ctype_b_loc+1;
const __int32_t *__ctype_toupper = __ctype_tolower_loc+1;
const __int32_t *__ctype_tolower = __ctype_toupper_loc+1;
Quoted 6 lines · Fabrice Bellard
Quoted 5 lines · Brett Bonfield
[...]
Also, would you consider making QEMUMenu.bat work with "dd for Win32" as well as it works with Zitu's program. dd for Win32 is available
here: http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm
Quoted 7 lines
Quoted 3 lines
The advantage it has over mkqemuimage.exe is that it can make any size images, at least so far as I can tell. The logic John Newbigin emailed goes as follows:
Then why not fixing mkqemuimage.exe to do that too ?
Fabrice.
I hope I didn't offend anyone and I definitely didn't mean to imply that dd for Win32 was somehow better than mkqemuimage.exe. Honestly, I don't know anything about mkqemuimage--someone on the Mepis forum suggested using dd so I investigated how to do that on Windows. Is there a good reason to use mkqemuimage instead of dd for Win32? I have no idea how to adjust mkqemuimage so that it meets my needs, but if someone else wants to take on that project I suspect I'm one of many people who would be grateful.
Brett
Le Mon, 15 Nov 2004 10:40:22 -0500, Brett Bonfield a écrit :
Quoted 25 lines
Quoted 6 lines · Fabrice Bellard
Quoted 5 lines · Brett Bonfield
[...]
Also, would you consider making QEMUMenu.bat work with "dd for Win32" as well as it works with Zitu's program. dd for Win32 is available
here: http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htmQuoted 7 lines
Quoted 3 lines
The advantage it has over mkqemuimage.exe is that it can make any size images, at least so far as I can tell. The logic John Newbigin emailed goes as follows:
Then why not fixing mkqemuimage.exe to do that too ?
Fabrice.
I hope I didn't offend anyone and I definitely didn't mean to imply that dd for Win32 was somehow better than mkqemuimage.exe. Honestly, I don't know anything about mkqemuimage--someone on the Mepis forum suggested using dd so I investigated how to do that on Windows. Is there a good reason to use mkqemuimage instead of dd for Win32? I have no idea how to adjust mkqemuimage so that it meets my needs, but if someone else wants to take on that project I suspect I'm one of many people who would be grateful.
Quoted 1 line
Brett
Is there a particular reason to not use qemu-img.exe? mkqemuimage is perhaps much simpler to use but have this 2G limit and only output raw images.
Anyway this is a nice tool that have been created for making empty images to use with qemu on windows instead of borrowing one from another project.
Quoted 33 lines · Ronald
Quoted 27 lines · Brett Bonfield
Quoted 7 lines · Fabrice Bellard
Quoted 6 lines · Brett Bonfield
[...]
Also, would you consider making QEMUMenu.bat work with "dd for Win32" as well as it works with Zitu's program. dd for Win32 is available
here: http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htmQuoted 7 lines
Quoted 3 lines
The advantage it has over mkqemuimage.exe is that it can make any size images, at least so far as I can tell. The logic John Newbigin emailed goes as follows:
Then why not fixing mkqemuimage.exe to do that too ?
Fabrice.
I hope I didn't offend anyone and I definitely didn't mean to imply that dd for Win32 was somehow better than mkqemuimage.exe. Honestly, I don't know anything about mkqemuimage--someone on the Mepis forum suggested using dd so I investigated how to do that on Windows. Is there a good reason to use mkqemuimage instead of dd for Win32? I have no idea how to adjust mkqemuimage so that it meets my needs, but if someone else wants to take on that project I suspect I'm one of many people who would be grateful.
Quoted 1 line
Brett
Quoted 6 lines
Is there a particular reason to not use qemu-img.exe? mkqemuimage is perhaps much simpler to use but have this 2G limit and only output raw images.
Anyway this is a nice tool that have been created for making empty images to use with qemu on windows instead of borrowing one from another project.
OOops, sorry, I wanted to say that qemu-img.exe should be used instead of other tools as it handles all images formats that QEMU supports and some manipulations like AES encryption and compression.
Fabrice.
Le Mon, 15 Nov 2004 22:46:09 +0100, Fabrice Bellard a écrit :
Quoted 25 lines
Quoted 16 lines · Ronald
Quoted 10 lines · Brett Bonfield
I hope I didn't offend anyone and I definitely didn't mean to imply that dd for Win32 was somehow better than mkqemuimage.exe. Honestly, I don't know anything about mkqemuimage--someone on the Mepis forum suggested using dd so I investigated how to do that on Windows. Is there a good reason to use mkqemuimage instead of dd for Win32? I have no idea how to adjust mkqemuimage so that it meets my needs, but if someone else wants to take on that project I suspect I'm one of many people who would be grateful.
Brett
Quoted 7 lines
Is there a particular reason to not use qemu-img.exe? mkqemuimage is perhaps much simpler to use but have this 2G limit and only output raw images.
Anyway this is a nice tool that have been created for making empty images to use with qemu on windows instead of borrowing one from another project.
Quoted 5 lines
OOops, sorry, I wanted to say that qemu-img.exe should be used instead of other tools as it handles all images formats that QEMU supports and some manipulations like AES encryption and compression.
Fabrice.
Perhaps I could remove mkqemuimage from the windows installer now, move it in a subdir, or put some info about images in a Readme, so qemu-img is used preferably. You choose.
I am not aware of frontends that use it, except for QEMUMenu.
About qemu-img.exe, it is not installed by default for windows build (?)
qemu-win32/Makefile 2004-11-16 00:58:16.795243392 +0100 renamed from Makefile 2004-11-16 00:56:50.556422348 +0100 +4 -6
@@ -10,18 +10,18 @@ LDFLAGS=-g LIBS= DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -TOOLS=qemu-img +TOOLS=qemu-img$(EXESUF) ifdef CONFIG_STATIC LDFLAGS+=-static endif -DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 +DOCS=qemu-doc.html qemu-tech.html qemu-img.html qemu.1 qemu-img.1 all: dyngen$(EXESUF) $(TOOLS) $(DOCS) for d in $(TARGET_DIRS); do \ $(MAKE) -C $$d $@ || exit 1 ; \ done -qemu-img: qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c +qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) dyngen$(EXESUF): dyngen.c
@@ -44,9 +44,7 @@ install: all mkdir -p "$(bindir)" -ifndef CONFIG_WIN32 install -m 755 -s $(TOOLS) "$(bindir)" -endif mkdir -p "$(datadir)" install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \ pc-bios/vgabios-cirrus.bin \
@@ -54,7 +52,7 @@ pc-bios/proll.bin \ pc-bios/linux_boot.bin "$(datadir)" mkdir -p "$(docdir)" - install -m 644 qemu-doc.html qemu-tech.html "$(docdir)" + install -m 644 qemu-doc.html qemu-tech.html qemu-img.html Changelog "$(docdir)" ifndef CONFIG_WIN32 mkdir -p "$(mandir)/man1" install qemu.1 qemu-img.1 "$(mandir)/man1"
Le Sun, 14 Nov 2004 16:41:42 -0500, Brett Bonfield a écrit :
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Brett Bonfield wrote:
With QemuInstall-20041111 I get:qemu: could not load PC bios './bios.bin'
If the windows QEMU doesn't run that is undoubtly my bad, as I'm wrote the menu for it...
Quoted 8 lines
Quoted 4 lines
It seems after some investigation that there were a number of bugs...
I just made a new version (v20041113) of QEMUMenu available at my site
http://stacktrace.org/How will we know when the new version has been incorporated into QemuInstall-2004xxxx.exe?
It's updated in today's build and in 0.6.1 (ftp://ftp.freeoszoo.org/qemu/win32/release/QemuInstall-0.6.1.exe)
I hope I have not breack anything because I have a new toolchain and I have only do a duke3d test run :)
Quoted 19 lines · Brett Bonfield
Also, would you consider making QEMUMenu.bat work with "dd for Win32" as well as it works with Zitu's program. dd for Win32 is available here:
http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htmThe advantage it has over mkqemuimage.exe is that it can make any size images, at least so far as I can tell. The logic John Newbigin emailed goes as follows:
- - -
"The requirement is to create a big empty file which can be presented as a harddisk. Under linux I would do this like this: dd if=/dev/zero of=myfile.img bs=1024k count=3000 This will give you 3000Meg.
The file will be 'initialised' with \000s. It is possible to create a sparse file which is 'hollow' and will be allocated when you write to it. That can cause problems with some programs though so it is best to avoid that unless you know it works.
Quoted 6 lines
Windows does not share the philosophy which makes that kind of command possible.
Under windows, sparse files are not supported so we can use the dd tool in a different way. If you write anything to a large offset (say 3Gig) then all the space before that will be allocated.
That isn't true. Under Windows, use the mksparse command.
Not all filesystems have to support sparse files but NTFS (and perhaps ext2/ext3 one day under Windows?) does.
<URL: http://www.insidewindows.info/mksparse.zip>
Cheers,
Anand
Signature · 3 lines
linux.conf.au 2005 - http://lca2005.linux.org.au/ - Birthplace of Tux April 18th to 23rd - http://lca2005.linux.org.au/ - LINUX Canberra, Australia - http://lca2005.linux.org.au/ - Get bitten!