Tiny Core Linux

General TC => Tiny Core on Virtual Machines => Topic started by: TheNewbie on July 12, 2011, 01:39:16 AM

Title: TCL as Xen Dom0?
Post by: TheNewbie on July 12, 2011, 01:39:16 AM
As the title states, I'd like to know if anybody has had success with using tinycore/microcore as the dom0 for Xen, and, if so, their experience with it. If not, then it'd be great if somebody could help me a little bit with installing (if that's the right word) TC/MC as dom0:

- Do I need to remaster TC/MC with a new kernel to support a Xen installation?
- Do I have to compile Xen from source and convert it to tcz or some such, or is there a more preferable method to "install" Xen?
- Assuming Xen can be installed properly, would it be required to remaster TC/MC with Xen installed to use it as dom0 (considering that the virtualization is supposedly kernel-level)?

Sorry if my questions are idiotic and this has been answered somewhere else >.<

Also, if anybody knows a smaller, more convenient alternative is available... (type-1 hypervisor, I find type-2 is too laggy and is too poor of a solution to support Windows and various games/utilities)
Title: Re: TCL as Xen Dom0?
Post by: curaga on July 12, 2011, 03:03:47 AM
Quote
- Do I need to remaster TC/MC with a new kernel to support a Xen installation?

Yes. Xen and 486 support are mutually exclusive.

There are some threads on running TC as a Xen guest, but I don't remember if any were as a host.


I don't know if gaming under virtualization is a good idea no matter the system used, there's always overhead.
Title: Re: TCL as Xen Dom0?
Post by: danielibarnes on July 12, 2011, 07:55:11 AM
I'd like to know if anybody has had success with using tinycore/microcore as the dom0 for Xen

Linux as a dom0 was only supported as of 2.6.37 (http://blog.xen.org/index.php/2011/01/14/linux-2-6-37-first-upstream-linux-kernel-to-work-as-dom0/) in January (TC 3.x is 2.6.33.3). The kernel backends were not added until 3.0 (http://blog.xen.org/index.php/2011/06/02/xen-celebrates-full-dom0-and-domu-support-in-linux-3-0/). Short answer: you can't do it yet, but it should be possible to remaster TC 4.0 to do it.
Title: Re: TCL as Xen Dom0?
Post by: curaga on July 12, 2011, 11:16:33 AM
TC is fairly kernel agnostic, I've run 3.x with anything from .30 to .37. Sub-.33 need an udev rule added, but upwards upgrades should be fairly easy.
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 12, 2011, 11:34:57 AM
I don't know if gaming under virtualization is a good idea no matter the system used, there's always overhead.

Well, it's not just the overhead (although type-1 hypervisors are supposedly much faster too), there's a lack of decent driver support and such for guest OS's to use a GFX card's 3D acceleration, etc.

The wiki has a short guide on remastering (is that the right word? >.>) TC with a new kernel, but what are the TC kernel patches?
Title: Re: TCL as Xen Dom0?
Post by: curaga on July 12, 2011, 11:54:55 AM
http://ftp.nluug.nl/pub/metalab/distributions/tinycorelinux/3.x/release/src/kernel/33-patch-series/
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 12, 2011, 11:59:24 AM
Where are there so many squashfs patches?  ??? I assume that the ones in the 3.6 folder are the most recent. Is the "try-harder" patch necessary, or just the most recent squashfs-2011XXXX.patch?

On another note, I think Xen requires a 64-bit system (which I have), but TC seems to be finding only ~3.3GB of RAM (when in fact I have 4GB), which seems like it's acting like a 32-bit system. I was under the impression that TC is (or includes) 64-bit by default?
Title: Re: TCL as Xen Dom0?
Post by: curaga on July 12, 2011, 12:35:56 PM
Only the -warning and -try-harder patches are needed for a recent version, as the dated squashfs ones are backports to our kernel.

TC is 32-bit by default, but there is a 64-bit kernel available.
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 12, 2011, 01:43:26 PM
Only the -warning and -try-harder patches are needed for a recent version, as the dated squashfs ones are backports to our kernel.

So both the -warning and -try-harder patches are needed?

TC is 32-bit by default, but there is a 64-bit kernel available.

Hmmm. I noticed that there is a microcore64.gz, but there is no tinycore64.gz ... Also, there is a bzImage64, but when I tried editing boot options to use bzImage64 instead of bzImage, some error or other popped up =\
Title: Re: TCL as Xen Dom0?
Post by: maro on July 12, 2011, 11:07:09 PM
Hmmm. I noticed that there is a microcore64.gz, but there is no tinycore64.gz ... Also, there is a bzImage64, but when I tried editing boot options to use bzImage64 instead of bzImage, some error or other popped up =\

Are you using the 64-bit kernel (i.e. 'bzImage64') together with the 64-bit initrd for MC (i.e. 'microcore64.gz')?

You are correct that there is no "tinycore64.{iso|gz}" to be found for downloading, but after booting into a 64-bit MC system you can "create" one by just running
    tce-load -wi Xorg-7.5 Xprogs Xlibs wbar flwm_topside
(plus executing startx). And if you use persistence you won't have to do it again. You could also remaster (http://wiki.tinycorelinux.net/wiki:remastering) your very own "tinycore64.gz". Just note that the 'Xvesa' X server is not compatible with 64-bit, hence the use of 'Xorg' instead.
Title: Re: TCL as Xen Dom0?
Post by: Juanito on July 12, 2011, 11:23:56 PM
Xvesa will not work with a 64-bit kernel, hence there's no tinycore64
Title: Re: TCL as Xen Dom0?
Post by: curaga on July 13, 2011, 01:33:53 AM
Quote
So both the -warning and -try-harder patches are needed?

Well, so far all of our patches are only to improve the user experience. You can run a completely vanilla kernel on TC without anything breaking.

tmpfs-root may become mandatory in the future, breaking this tradition.
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 13, 2011, 03:20:47 PM
So, I'm going to get this straight -- I could update MC64 with a 2.6.37 kernel and apply various patches (http://"http://ftp.nluug.nl/pub/metalab/distributions/tinycorelinux/3.x/release/src/kernel/33-patch-series/") to get a pretty standard MC64 with a 2.6.37 kernel.

Following this, I would tce-load Xorg (as opposed to Xvesa), Xprogs, wbar, and a wm (flwm being the standard). Optionally, I could remaster the whole thing as a TC64.

I think that's the end of the TC-specific process, so if anything's wrong or weird, please do explain to me. If anybody's had experience with Xen in any Linux distro, feel free to help me out a bit, but for now, I'm going Googling for some tutorials.
Title: Re: TCL as Xen Dom0?
Post by: maro on July 13, 2011, 04:42:42 PM
... I could update MC64 with a 2.6.37 kernel and apply various patches (http://"http://ftp.nluug.nl/pub/metalab/distributions/tinycorelinux/3.x/release/src/kernel/33-patch-series/") to get a pretty standard MC64 with a 2.6.37 kernel. ...

I trust you understand that not just the kernel (i.e. 'bzImage') but also all kernel modules will have to be replaced for your private "MC64 with a 2.6.37 kernel". Furthermore I'm sure you understand that not all 2.33.3 patches will apply cleanly against a more recent sources.

BTW, what stopping you to "go for broke" and pick the most recent stable one (i.e. 2.6.39.3) as the basis of your experiment?
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 13, 2011, 04:58:42 PM
I trust you understand that not just the kernel (i.e. 'bzImage') but also all kernel modules will have to be replaced for your private "MC64 with a 2.6.37 kernel". Furthermore I'm sure you understand that not all 2.33.3 patches will apply cleanly against a more recent sources.

BTW, what stopping you to "go for broke" and pick the most recent stable one (i.e. 2.6.39.3) as the basis of your experiment?

Well...

TC is fairly kernel agnostic, I've run 3.x with anything from .30 to .37. Sub-.33 need an udev rule added, but upwards upgrades should be fairly easy.

Curaga claims that 2.6.37 is relatively simple to work with. I wouldn't want to overstep my boundaries by attempting to use 2.6.39.3 on my first try.



On another note...

Quote from: Wiki
If you are unsure, build all of your files into the initrd. This will give you a tinycore.gz which is significantly larger than the one provided by standard TC, but in most cases you could probably live with that until you have the time to sort out the details of what modules should be put where.

How can I find out which modules/firmware are in the standard tinycore.gz?

Also, how do I obtain a 64-bit kernel? kernel.org doesn't seem to differentiate, yet TC has a bzImage and a bzImage64.
Title: Re: TCL as Xen Dom0?
Post by: Juanito on July 13, 2011, 07:34:50 PM
How can I find out which modules/firmware are in the standard tinycore.gz?
Have a look at http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/release/src/kernel/config-2.6.33.3-tinycore

Quote
Also, how do I obtain a 64-bit kernel? kernel.org doesn't seem to differentiate, yet TC has a bzImage and a bzImage64.
I'd suggest reading http://cross-lfs.org/view/1.1.0/x86_64-64/
Title: Re: TCL as Xen Dom0?
Post by: gerald_clark on July 13, 2011, 07:37:13 PM
Kernel.org supplies source. You compile it the way you want it.
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 13, 2011, 10:13:20 PM
Ha, it seems I'm doomed to being an idiot at Linux forever.

I read the site that Juanito suggested I read, and I'm still a bit confused. I have to apply .patch files to the compiler tools? How would I do that? What compiler options do I have to use?  :-\

Sorry if I'm pissing people off with my never-ending stream of basic questions...
Title: Re: TCL as Xen Dom0?
Post by: curaga on July 14, 2011, 12:32:22 AM

How can I find out which modules/firmware are in the standard tinycore.gz?

Boot tc, "find /lib/modules" ;). No firmware in the base. sorter.sh creates the extensions, but for your first remaster, I'd recommend including all the modules in the initrd, it's easier.

Quote
Also, how do I obtain a 64-bit kernel? kernel.org doesn't seem to differentiate, yet TC has a bzImage and a bzImage64.

By compiling the source with toolchain64. If you search the forum, there are some instructions for that (it's a bit more complicated than a standard 32-bit one).
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on July 14, 2011, 01:06:51 PM
Ehhh... Wouldn't I need the 2.6.37 kernel headers...? And, for that matter, have the toolchain compiled with those headers? So complex  :'(
Title: Re: TCL as Xen Dom0?
Post by: skchopperguy on October 04, 2011, 02:31:51 PM
Hi all,

 Sorry to bark on an old thread but its exactly what I'm trying to work on right now.

 Has anyone successfully setup TCL64 as Xen Dom0?

 I'd love to figure this out so I can have TCL64 to load VM's on. Any help is appreciated.

Thanks!

 
Title: Re: TCL as Xen Dom0?
Post by: TheNewbie on November 30, 2011, 02:33:22 AM
TC 4.0 was the first to use 3.0.3 kernel, and all those libs and such should pretty much be up-to-date. In theory, you just need to get that compiletc (not sure if that's the right name?) extension and compile the Xen source. Haven't messed with this stuff for a while now though, so I'm not sure if it'll really go that smoothly.

Sorry for grave digging, but I figure this topic is on the first page of the subforum anyways.