How to update QEMU-puppy 2.17 to 4.0?

Booting, installing, newbie
Message
Author
robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#31 Post by robermann79 »

This is my experimentation. All the files are inside the attachment.
EDIT: added also the kqemu Windows's driver

Code: Select all

This file contains a "proof of concept" about making a portable Puppy 4 distro, that is:
- an USB key bootable Puppy installation, which also is
- capable of running inside another Linux or Windows operating system, thanks to QEMU

This work (distributed with a GPL license) is in no way original and of course I don't claim any right :). It is based on:
- Erik Veenstra's "QEMU-Puppy"
  - see http://www.erikveen.dds.nl/qemupuppy/index.html
  - in detail, I'm including his: 
    - "allinoneqemu.exe" binary
    - "allinoneqemu_linux" binary
    - Linux script implementation
- mderemick's "QEMU_Launcher"
  - see http://www.murga-linux.com/puppy/viewtopic.php?t=29107&start=15
  - I implemented his idea of using UNetbootin for installing Puppy and then use QEMU with it

Follow these steps:
1. peek an USB key (I used an 8 Gb key)
2. with UNetbootin  install Puppy in the USB key:
 2.1 download an ISO (I installed Puppy 4.3.1 - see http://distro.ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.3.1/pup-431.iso)
 2.2 download and run UNetbootin (from http://unetbootin.sourceforge.net)
 2.3 on UNetbootin, click on "Disk Image", choose the ISO just downloaded, choose the USB drive and click OK
3. in the same key copy (in the root directory):
 - allinoneqemu.exe
 - allinoneqemu_linux
 - winqemu.bat
   - this try also to start the kqemu service for best performances. If you want install it on Windows, right-click on kqemu.inf, then click "Install"
 - linqemu.sh
   - if in the PATH there is already a preinstalled qemu command, it uses that, appending the "-kernel-kqemu" option
 - kqemu.inf and kqemu.sys
   - (Windows's driver for kqemu)
 
That is it, you have a portable Puppy.

My further steps were:
4. the first run was in Windows (winqemu.bat), when I saved the Puppy personal file (this step created also the swap file)
5. restart, booting directly from the key
6. restart and launching linqemu.sh from another Linux

Just as a test, I used also a QEMU tunnel port: 8000 guest's port can be accessed from the 5555 host's port. Then I started DidiWiki (which do run in port 8000) in the guest, and accessed it from the host, for example:
wget http://localhost:5555

As you can see, both the scripts are just a hint, they can be improved in many ways (configurability, logging). And I'm not a QEMU hacker, as you can see. Feel free to enhance them in any way - and, to really feel free, share them :)
Last edited by robermann79 on Sat 19 Dec 2009, 19:27, edited 7 times in total.

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#32 Post by ICPUG »

EDIT - These comments are no longer relevant as robermann79 has updated his instructions above.

robermann79

Sorry to be picky but this is beginning to look really good. I (and newbies) like step by step instructions.

The Readme talks of QEMU and Erik's files (a link to these would be nice) . However it does not say where/how to implement mderemick's stuff - unless this is some of the stuff in step 3.

How is the subsequent dwnload file here (used/implemented)?

Here's a suggestion. Start with a blank flash drive and follow your instructions word for word. If you find along the way you have to do something not in the instructions then add it to the instructions. Be really careful to ensure you don't assume the reader knows something. For example in step 3 you say copy in some files. Where - in the root directory?
Last edited by ICPUG on Fri 18 Dec 2009, 13:03, edited 1 time in total.

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#33 Post by robermann79 »

ICPUG wrote: Here's a suggestion. Start with a blank flash drive and follow your instructions word for word. If you find along the way you have to do something not in the instructions then add it to the instructions. Be really careful to ensure you don't assume the reader knows something.
Mmm this was my goal and I followed my own steps with a blank key. Maybe it was not clear that all what you need is inside the attachment (it was a tar.gz, now is a ZIP). Unzip and copy them in the key :)
EDIT: I've just updated the README

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#34 Post by mikeb »

Yeah...I used Erik's setup with puppy 2 during a stint in college...was really handy.

I believe he is a member here

mike

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#35 Post by robermann79 »

I just tried the above scripts with also a DSL linux (http://ftp.belnet.be/packages/damnsmall ... 4.4.10.iso) - really handy :)

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#36 Post by ICPUG »

Thanks robermann79. I think I might try updating my Portable Puppy 2.17.1 now!

You say the attachment was previously tar.gz, now .zip. Actually, it was labelled .gz and when I tried to look at it I got some strange messages (with Winzip). I extracted the tar file (not labelled as tar though) but then Winzip gave up.

Excellent work.

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#37 Post by robermann79 »

Let me know if you have any other problem. Thanks for the feedback.

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#38 Post by robermann79 »

I've updated the ZIP adding Windows's KQEMU driver and changing the scripts.

In my old Linux machine (700 Mhz + 512 MB RAM) it seems that the -kernel-kqemu qemu's option does not enhance the performances - really they are worst!

[In order to test the -kernel-kqemu option, you have to install qemu and kqemu packages on your host machine, then run "modprobe kqemu". Finally run "linqemu.sh". It should use /usr/bin/qemu with -kernel-kqemu]

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#39 Post by mikeb »

I never succeeding in getting kqemu to work.
You need /dev/shm running and the right module for your kernel.....I dangled upside down whilst doing the chalston and still did not get anywhere...

mike

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#40 Post by robermann79 »

mikeb wrote:I never succeeding in getting kqemu to work.
You need /dev/shm running and the right module for your kernel.....I dangled upside down whilst doing the chalston and still did not get anywhere...

mike
In the host I'm running Opensuse 11.2 (with twm for saving memory - it just use 45 MB), it has both qemu (v0.11.0) and kqemu precompiled for the right kernel. Of the options:
1. qemu
2. qemu + kqemu (that is kqemu.ko)
3. qemu + kqemu with -kernel-kqemu

On my machine the third is useless (too slow), the first two seem to have a very similar perfomance (and no apparent error log).

I've tried also Virtual Box and VMWare Player. The best performant is this last one (on VMWare you can boot from the same USB stick where you installed the portable Puppy)
Last edited by robermann79 on Tue 22 Dec 2009, 22:49, edited 1 time in total.

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#41 Post by robermann79 »

Update: I tried the VMKnoppix 5.3.1 CD Live (see http://www.rcis.aist.go.jp/project/knop ... ex-en.html), which, among other, contains qemu (v0.9.1) and kqemu. I was able to successfully test all the options, timing the elapsed time between the boot and shutdown of the "portable Puppy":
1. qemu: 2m30sec
2. qemu + kqemu: 1m53sec
3. qemu + kqemu with -kernel-kqemu: 1m33sec

(Very interesting is the script qemu-knoppix.sh, inside the CD). Do you have any comparison data / impression on performance?
Last edited by robermann79 on Wed 23 Dec 2009, 10:13, edited 1 time in total.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#42 Post by mikeb »

Ok ..I never got notified or your post so sorry if it seems I was ignoring you.
In the meantime catdude help my hand after trying out on his setup for me and voila...it ran...was one tiny piece of the puzzle...I will post his how to soon...:)

As for performance....

user mode..... kqemu gives a decent boost generally.
tested and install under it and was near native in speed...without used to take forever....have not tested kernel mode for install yet...

kernel mode.....for puppy was drastically improved gui performance..was like cold porridge before. win 2000 faster too.
98 will not boot..that's a known limitation but performance is snappier under user mode anyway.
NT4 ...got it happy in the end but was slower than user mode.

So overall a worth while improvement.

by the way in kernel mode the guest sees the real processor (and upsets acpi slightly) which is probably why some guests get upset...

mike

robermann79
Posts: 22
Joined: Wed 17 Sep 2008, 12:02

#43 Post by robermann79 »

mikeb wrote: I will post his how to soon...:)
Have you already posted it? By the way... Happy new Year! :D

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#44 Post by mikeb »

I have indeed
http://www.murga-linux.com/puppy/viewtopic.php?t=50575

happy new year too :)

mike

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#45 Post by ttuuxxx »

Why not take 2.17 edit the sfs and replace with Barry's latest
-Rox, Seamonkey, Desktop icons, Geany, jwm,gtk-themes,rounded jwm, backgrounds, and call it a day, it would be like 10MB almost smaller, take less resources and look just as good :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#46 Post by ttuuxxx »

also directions are located @ http://www.erikveen.dds.nl/qemupuppy/ :wink:
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

rberke
Posts: 9
Joined: Sat 08 Mar 2008, 12:33

QEMU, Puppy 4.3.1, booting, disk img

#47 Post by rberke »

I think I've been struggling on mostly the same path as this thread, but with a twist. I have a WinXP laptop, with low level disk encryption. Can't alter the boot sector to control a dual boot. I can boot from Puppy 4.3.1 CD okay, if I'm willing to end my Win session and suffer slow start up time. QEMU and hard drive seems a good solution for me.

I can launch QEMU 0.10, load up puppy 431 from ISO. I couldn't save to 'CD' from QEMU. Probably QEMU can't handle multisession writes as a real CD drive can. (Also tried 0.12.1, but that stops/exits immediately during attempts to run it.)

I was able to create a puppy4.img file using QEMU, then load up again from ISO and run Qparted, format for ext3, flag for bootable, and run Puppy's universal installer okay. All seems succesful so far. There's mention of GRUB, but I don't know what to do about it.

I exit my QEMU session. Start a fresh one aiming at the puppy4.img file, but MU doesn't proceed past the message 'Booting from hard drive'. I gave it 20 minutes.

I tried again from scratch. Tried to follow GRUB install instructions, but run into supposedly that /dev/sda1 is read-only. When I look at the mount table/display, it shows /dev/sda1 is mounted rw.

On my exit I told Puppy I wanted to save settings to file on hard drive. It did save them. I don't know where, but hope it's within the .img file somehow. I'm mystified how or when to use it. Upon reboot my settings were saved and reused.

Shouldn't my successful install cycle have made it so the .img would be bootable, and no longer use the .ISO file?

Sorry if this should be posted elsewhere. It seems to me to involve the same issues as with a flash USB drive about where to tell QEMU to pay attention.

Thanks to anyone who can clarify for me.

RichardB
Columbia, MD

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#48 Post by mikeb »

grub4does would be an easy way to set up a frugal install. For booting you add one line to the boot.ini file ...no partitioning and boot flag moving and no touching the mbr and boot sector.
The one file is added and a menu made and the main files from the cd and you are done. Would run a whole lot better than emulation.

heres a cute description
http://www.ph-islands.net/pupinstall/winxp.php

mike

User avatar
CatDude
Posts: 1563
Joined: Wed 03 Jan 2007, 17:49
Location: UK

Updated qemu-puppy

#49 Post by CatDude »

Hi

After nearly 3 weeks of trial & error hacking away at init files (inside of the initrd.gz),
i have managed to get a working version of Puppy-4.00 (k2.6.21.7)

I do not profess to knowing exactly what i was doing :roll: , and therefore cannot vouch for my hacks being 100% correct.
So, if someone who understands this stuff better than i do could take a look at it and check it out,
that would be very much appreciated.

I have tested it in all 3 modes:
  • Puppy in Puppy
    Puppy in Windows
    Running natively from the USB
In all 3 modes, i have been able to go online (ethernet),
download and install .pets,
make changes, for example: change desktop icons to the ones i downloaded,
and all changes are saved (if i choose to save them) to the pup_save.2fs

I have uploaded a copy of it here:
  • I am offering this with ABSOLUTELY no warranty whatsoever
    ######### USE ENTIRELY AT YOUR OWN RISK! #########
After downloading and unpacking the archive,
please read the CatDudes-readme.txt file.
The original readme.txt file is also in there.

The current pup_save.2fs
has been set up with the following:
  • Keyboard = uk
    Timezone = London
    Video = Xvesa at 800x600x16
Hope someone finds it useful
CatDude
.

Image
.
[img]http://www.smokey01.com/CatDude/.temp/sigs/acer-futile.gif[/img]

Dngrsone
Posts: 4
Joined: Wed 28 Mar 2012, 17:55

Works for me

#50 Post by Dngrsone »

Thanks, CatDude, the updated Qemu-Puppy works for me in Ubuntu 10.04 and Win 7.

My biggest issue so far is the transparency settings on my Ubuntu terminal are too excessive, making it hard to see my Puppy console well, so I will have to fix that.

... and learning my way around Puppy-- it will take me a little time to explore the various programs and determine which ones I want to keep, & etc.

Out of curiosity, what version Qemu did you use?

Post Reply