Run Puppy and Windows at the same time, without an emulator

Under development: PCMCIA, wireless, etc.
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Run Puppy and Windows at the same time, without an emulator

#1 Post by disciple »

Intro:
If you don't know, Colinux is a way of running Linux at the same time as running Windows, without an emulator, so it should be a lot faster than something like QEMU (although I haven't tried kQEMU).

There are other distributions using Colinux, so this is hardly cutting edge, but the last report I saw of someone running Puppy/Colinux was a couple of years back (using a QEMU image), and people ask about it every now and then.

-----------------------
Installing Colinux:
This is what I did to run Puppy 4.1.1/Colinux:

1. Installed Cygwin and Cygwin/X (you could use Xming, which is supposed to be easier), so that I can run graphical applications.

2. Used the latest Colinux installer to get a Colinux kernel etc and network applications.

3. Made a file (512MB in this case) on C:\ drive to install Puppy in, kind of like a save file (If you have a puppy install on an ext2/ext3 partition you should be able to boot that instead, which would be better as you can install an ext2 filesystem driver to access it read/write from Windows (2000 or newer I think)). I can't figure out how to mount ext2 save files with the current version of Virtual Volumes, but you can use explore2fs for read-only access.
You should be able to make this from Puppy or Cygwin, or I think also with native Windows tools:

Code: Select all

dd if=/dev/zero of=puppy.2fs bs=1M count=512
mke2fs puppy.2fs
4. Extracted the contents of pup_411.sfs into the blank Puppy file (you can do this e.g. by booting a Puppy live CD, clicking the file to mount it, and copying the contents of /initrd/pup_ro2 into it. I just made my second Puppy/colinux install by booting the first one :))

5. Ran:
colinux-daemon kernel=vmlinux cobd0="c:\coLinux\puppy.2fs" root=/dev/cobd0 eth0=slirp initrd=initrd.gz
6. Chose ps/2 keyboard and the right locale, chose Xorg server, and any monitor, then exited instead of testing or starting X.

7. EDIT - just worked out how to setup the network and display automatically at each boot:
- found my Windows IP address by running

Code: Select all

ipconfig
- put it in /etc/profile

Code: Select all

export DISPLAY=192.168.1.51:0
- put this in /etc/rc.d/rc.local to connect to the network

Code: Select all

dhcpcd eth0
------------------
Booting Puppy:
Now I can boot puppy by running this batch script:

Code: Select all

colinux-daemon kernel=vmlinux cobd0="c:\coLinux\puppy.2fs" root=/dev/cobd0  eth0=slirp -t nt
And shut down by running

Code: Select all

poweroff
.
I don't recommend the fltk console, as it seems to be fairly useless... I wish I could use my Cygwin rxvt for the Colinux console :(
It is possible to mount your local hard drives using cofs, but I've found that it doesn't work properly (e.g. if I rename a file in rox, it disappears, until I restart Colinux), so I think in the future I'll connect to my C: drive using Samba instead.

[EDIT - SOLVED - SEE ABOVE]
I can start X either before or after booting Puppy, but every time I boot Puppy I have to run*

Code: Select all

dhcpcd eth0
export DISPLAY=192.168.1.51:0
I can't figure out what script to put this in to make Puppy run it at startup, even though I can successfully get him to mount hard drives and stuff at boot.
[/SOLVED]

Colinux connects to the X server over a fake ethernet connection, and Slirp (which I'm using) is just slow enough to be annoying. We have internet connection sharing disabled here, so I can't use a faster TAP connection in the normal way :(. It is possible to use Slirp for your internet/network connection but a TAP connection to your X server, but I can't figure out how to do it in Puppy... if I set the DISPLAY variable to use my TAP server it doesn't seem any faster, so I presume it is still connecting through the SLIRP server.

Starting my Cygwin/X server:
I like to run in multiwindow mode, so instead of having a virtual cygwin desktop, programs are all in normal Windows windows... so they just look like a normal program. The downside of this is that I can't run a window manager to get the puppy menu - if anyone can suggest something that will use Puppy's .desktop menu files to provide a graphical way to start applications, that would be great... although personally I know the command to start most things :) EDIT - you can use something like Lxpanel, although it requires a bit of configuration to make useful without being in the way.
(The other downside is that it means I'm using the inferior Windows window manager - I guess I could always try the "party trick" of using an X wm to manage the windows windows as well :))
The ac option allows my Puppy (and I guess anyone else on my network) to send windows to my X server without having to explicitly give it permission using xhost.

Code: Select all

XWin -multiwindow -emulate3buttons 200 -clipboard -ac
------------
What else?:
If somebody is keen, it would be great to make an easy way for someone to install Puppy/Colinux. Apart from issues I've already mentioned, you'd probably also want to figure out:
- sound (It looks to me like esd is the best way to go).
- how to use a more normal Puppy "frugal" install i.e. without extracting pup_xxx.sfs into the "save file", so that you can upgrade simply by replacing pup_411.sfs with a newer version. (yes, the Colinux kernel comes with a unionfs module now).[/code]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#2 Post by disciple »

Colinux connects to the X server over a fake ethernet connection, and Slirp (which I'm using) is just slow enough to be annoying.
Just slow enough to be annoying for connecting to the X server... for connecting to the filesystem of the host PC it is completely unuseable... it just took something like 30 minutes for me to copy 25MB between the colinux filesystem and my mounted windows partition, and that was using both 3.2GHz cpus at 100%

I really need to figure out how to get that SLIRP/TAP system working in puppy :(
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

Actually, I think I was confused - I think cofs doesn't go through Slirp... why is it so slow I wonder...
Apart from that the main problem is that poppler-based programs are incredibly slow.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

MLTaylor
Posts: 1
Joined: Fri 12 Mar 2010, 19:26

#4 Post by MLTaylor »

disciple wrote:
Colinux connects to the X server over a fake ethernet connection, and Slirp (which I'm using) is just slow enough to be annoying.
Just slow enough to be annoying for connecting to the X server... for connecting to the filesystem of the host PC it is completely unuseable... it just took something like 30 minutes for me to copy 25MB between the colinux filesystem and my mounted windows partition, and that was using both 3.2GHz cpus at 100%

I really need to figure out how to get that SLIRP/TAP system working in puppy :(
Wow! that IS slow!
[url=http://www.smallboxweb.com]indianapolis web design[/url]

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#5 Post by cb88 »

@disciple you might rather go the XEN route also you might want to look into the spice X compression protocol (quramranet) if you want to run puppy on a thin client form your windows PC etc.. its also rather impressive and is supposed to be in RHEL 6 i think.

With XEN you boot Linux and boot Windows and they share the hardware on top of a hypervisor instead of colinux sort of punching out of a running OS


From what I understand you have to be careful duing the setup of XEN and you will need IOMMU (enabled and supported by your BIOS) for it to work really well
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

dpesios
Posts: 6
Joined: Thu 10 Feb 2011, 21:54
Location: Greece

Booting lucid puppy (5.2) using coLinux in dual-boot system

#6 Post by dpesios »

Hi there,
To begin with i'm not a really experienced linux user but im trying to do the following just for fun, and im not sure whether this is the right place to post my question (so i dont bother if it is moved).
I have a dual-boot system with Windows XP where Puppy is installed on a seperate partition on the same disk (/dev/sda5).
I have installed coLinux on XP in hope of booting puppy through it but im having some problems. The notes i read from coLinux's site are quite obscure, not-detailed and ,i think, not-for-puppy (?).

The url is: http://colinux.wikia.com/wiki/Converting_Distributions

I follow the instructions and i dont know what im doing wrong (newbie ha ...)
Can someone more advanced than me tell me if the above-mentioned notes are applicable to Puppy ? And somehow indicate me a procedure about what i should do to make it work ?
" To have come this far is no small achievement:
what you have done is a glorious thing." The First Step - C. P. Cavafy

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#7 Post by starhawk »

Why do you want to use coLinux? Grub4DOS is included w/ most Puppy versions and will work just fine for almost anything.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

I have installed coLinux on XP in hope of booting puppy through it but im having some problems. The notes i read from coLinux's site are quite obscure, not-detailed and ,i think, not-for-puppy (?).

The url is: http://colinux.wikia.com/wiki/Converting_Distributions

I follow the instructions and i dont know what im doing wrong (newbie ha ...)
Yes, the documentation isn't too great :) I had to work from the generic colinux docs and from a couple of other tutorials I think. I didn't find a single tutorial that you could follow straight through with Puppy's setup.

If you need help with Colinux you are probably better off with a distro that has other people running it in Colinux. There is probably no one using Puppy in Colinux; I got given a new machine at work and haven't been motivated enough to put Colinux on it.
If you don't NEED Colinux I'd normally recommend that you not bother with even a distribution that is set up and ready-to-go with Colinux. Why do you want to mess around in that other "operating system"? Just get a real one ;)

If you really want to run Puppy in CoLinux, start with my instructions above. I never sorted out a decent connection speed, but if you can use internet connection sharing on your machine you should be able to use the fast TAP method.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

dpesios
Posts: 6
Joined: Thu 10 Feb 2011, 21:54
Location: Greece

Booting puppy using coLInux etc etc ...

#9 Post by dpesios »

Thanks for the answers.

I want to use coLinux just for experimentation. Grub4dost seems to be a great alternative but im not sure if it can do what i want; run Windows and Linux in parallel. And im already booting puppy using the classic Grub.

To the you the truth it isn't the first time i try to make coLinux work. Once i tried to boot another distribution (Debian) and the results were disappointing. However, at leat, this time i get the kernel panic: no init found message on console and hopefully this is an improvement.

Im just eager to learn new things.
Why do you want to mess around in that other "operating system"? Just get a real one
When i get serious im going to get a real one...

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Re: Booting puppy using coLInux etc etc ...

#10 Post by disciple »

dpesios wrote:Grub4dost seems to be a great alternative but im not sure if it can do what i want; run Windows and Linux in parallel. And im already booting puppy using the classic Grub.
Grub4dos does not help you run Windows and Linux simultaneously. It is just a variation of Grub.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Re: Booting puppy using coLInux etc etc ...

#11 Post by disciple »

dpesios wrote:However, at leat, this time i get the kernel panic: no init found message on console and hopefully this is an improvement.
I remember that error ;)
Are you trying to follow the instructions in the page you linked to?
Have you tried following the steps I described?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

dpesios
Posts: 6
Joined: Thu 10 Feb 2011, 21:54
Location: Greece

Re Re: Booting puppy using coLInux etc etc ...

#12 Post by dpesios »

Are you trying to follow the instructions in the page you linked to?
No i gave up on those (maybe stick with those again in the future %) ).
Have you tried following the steps I described?
I just finished trying the steps you descriced and managed to boot puppy(!). Slirp network/internet connection seems to work but i have no idea on how i can use TAP connection (and using Window's sharing). Whenever i ping to something inside Puppy (before passing as argument to coLinux-deamon eth0=tuntap) i get a bad name error (which i also have no idea what it means). I tested slirp using wget instead (as the manual of coLinux-daemon suggests).
We have internet connection sharing disabled here, so I can't use a faster TAP connection in the normal way
What is the normal way ?
Starting my Cygwin/X server ... using xhost.
Im starting xwin on the host side but whenever i run xhost on the virtual machine i get an error ( unable to open display "192.168.1.2" ).

As i told im not experienced [/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#13 Post by disciple »

I just finished trying the steps you descriced and managed to boot puppy(!).
Great.
But you're saying you haven't got Puppy connected to X yet, right?
Im starting xwin on the host side but whenever i run xhost on the virtual machine i get an error ( unable to open display "192.168.1.2" ).
xhost is run on a server to give another machine permission to connect to its display. You should therefore be running it in the host, not in the client (Puppy). If you start X with the ac option then you don't need to run xhost.
Quote:
We have internet connection sharing disabled here, so I can't use a faster TAP connection in the normal way

What is the normal way ?
However they describe using TAP in the Colinux documentation :)
Actually, I see they talk about a "network bridge" option now. I don't think that was mentioned before, and I'm wondering if it was the solution to my problem of having internet connection sharing disabled. Unless of course it is disabled too.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#14 Post by emil »

Very interesting discussion.
I had recently used andLinux, which is colinux with Ubuntu and comes as an exe installer for windows preconfigured.
I benchmarked performance and it is about 20%-50% slower than running nativly (although File I/O is noticable slow).
But desktop integration is nice!
Emil

dpesios
Posts: 6
Joined: Thu 10 Feb 2011, 21:54
Location: Greece

#15 Post by dpesios »

Got it.

Managed to connect Puppy to the Internet through a network bridge as described in their documentation.
Also connected to X and successfully saw abiword's window.

You guys rock :)
Thanks

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Re: Re Re: Booting puppy using coLInux etc etc ...

#16 Post by disciple »

[quote="dpesios]
Have you tried following the steps I described?
I just finished trying the steps you descriced and managed to boot puppy(!). [/quote]
Did you need to do anything differently from how I described?
I thought I'd try it again to see if I can use the network bridge method. But when I boot I get the error:

Code: Select all

Trying to move old root to /initrd ... okay Freeing unused kernel memory: 140k freed kjournald starting.  Commit interval 5 seconds Kernel panic - not syncing: No init found.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

dpesios
Posts: 6
Joined: Thu 10 Feb 2011, 21:54
Location: Greece

#17 Post by dpesios »

Did you need to do anything differently from how I described?
No,i did it exactly as you described.

The erroryou get is a little bit different from what i used to get in the beggining of my attempt (when i used to get kernel panic).

Did you pass initrd=initrd.gz to the colinux-daemon ?
Since it is needed on first boot. Make sure the "save file" you created isn't read-only (or the partiotion where it lies).

I dont know what else to suggest. I dont also know whether an excerpt from what i get on console would be helpful (so that you can compare the messages).[/quote]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#18 Post by disciple »

Ah, it looks like it was some sort of weird permissions problem. I've got it going with a fresh .2fs file.

For spectacular visual effects try running icon_switcher with X in multi-window mode ;)
Run `killall ROX-Filer` to get rid of it afterwards. You'll probably need to use Alt-tab and maybe a windows key to get to your terminal first.
This has got me thinking - I wonder what would happen if I killed explorer in Windows, then ran jwm. I don't think anything would happen - I think the X server's multi-window mode essentially pretends to the Linux programs that it is a window manager, and pretends to Windows explorer that it is a bunch of windows, so if I kill Windows' explorer the X display will still be "managed", even though there will be no window decorations or anything.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

dpesios
Posts: 6
Joined: Thu 10 Feb 2011, 21:54
Location: Greece

#19 Post by dpesios »

Pretty cool.
Attachments
lucidpuppy.JPG
Just a screenshot ...
(145.54 KiB) Downloaded 560 times

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#20 Post by disciple »

Anyone using multiwindow mode might find it helpful to get a menu dialogue program like pgtkmenu, which reads the .desktop files used to build Puppy's start menu.
http://www.murga-linux.com/puppy/viewto ... 049#443049

I'm not sure what other alternatives are out there. There is PupApps, but it does not read the .desktop files http://www.murga-linux.com/puppy/viewto ... 159#467159
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Post Reply