Page 1 of 1

cpu-detect cheatcode

Posted: 20 Dec 2011, 10:33
by oranus
Porteus 32 and 64 bit distro is works wery well separately. But sometimes we need to use each of them on appropriate hardware. So I look at http://www.porteus.org/forum/viewtopic.php?f=81&t=710 topic but it's hard for newbie. Cheat code "from_dir" is not available so we need two partition for it.

I suggest to add "cpu-detect" cheat code. Thus Porteus will be the unique auto cpu and vga detect OS.
Thanks fanthom to vga-detect for make easy our life :)

Posted after 2 hours 21 minute 52 seconds:
Cheat code "from_dir" is not available so we need two partition for it.
Sorry I write it wrongly. I find another post 32 and 64 bit same partition. But this cheatcode made easy life when booting to detect right version esp. for newbie.

Re: cpu-detect cheatcode

Posted: 20 Dec 2011, 11:01
by Hamza
Hello,

I don't understand what you mean.

Do you want to include both Arch inside an ISO and implement a cheatcode (cpu-detect) which it detects the CPU Arch before to load the kernel and other stuffs for this kernel arch ? Like an Universal ISO for both arch ?

Re: cpu-detect cheatcode

Posted: 20 Dec 2011, 11:27
by oranus
Hi Hamza,

Yes you right. 32 and 64 bit Arch will be in the iso. Cpu-detect cheat code detect 64 or 32 bit Arch.
Finally Portues will be run 64 or 32 bit depends on cpu technology.

Re: cpu-detect cheatcode

Posted: 20 Dec 2011, 12:48
by Hamza
Technically, this feature cannot be made as the kernel is loaded before linuxrc and the only way to implement a cheatcode is in linuxrc which it loads after kernel.

The only way I am think about this "feature" is to implement a menu which it contents both arch, one for 32, another for 64.

Re: cpu-detect cheatcode

Posted: 20 Dec 2011, 18:56
by brokenman
What would be the benefit of having 32 and 64bit in the same ISO?

Porteus is a system that one boots into. A bootloader handles which kernel will be loaded. When i turn on my computer i can choose between 32bit or 64bit because the bootloader gives me the option. Putting together both in one ISO would mean the file would be 600MB and no longer a lightweight. In order to 'sniff' the architecture and autoload the correct 32bit or 64bit version automatically depending on which machine you are one would be nice ... but a little overkill since one press of the bootlader menu achieves the same.

There may be applications for this in the case that one uses a VM ... but other than that i see no advantage.

Re: cpu-detect cheatcode

Posted: 22 Dec 2011, 00:56
by fanthom
What would be the benefit of having 32 and 64bit in the same ISO?
i can see one benefit: Porteus is small enough to make it on 700MB CD with both (32/64) editions so you need to carry only one CD instead of two :)
that would be handy for PC repair service or such... (some old PC's may not have an option for booting from usb)

Anyway - (as pointed by Hamza already) automatic CPU arch detection would have to be performed by bootloader to find out which kernel should be loaded. this is not possible at the moment i'm afraid. maybe Grub2 will have this option in the future?

from_dir= cheat should work for ISO's as well so it should be possible to create Hybrid 32/64 Porteus ISO which contains both arch's.
i would like to see a syslinux menu containing 2 items: 'Porteus 32bit' and 'Porteus 64bit'. each menu would point to a submenu which would be a current porteus config with all booting options (text, copy2ram, etc)
i have a very little experience in creating syslinux submenus but maybe in my free time i'll prepare that ISO - just as another proof of concept :)
or maybe there is someone from the community interested in this challenge (just in case you would be bored enough over xmas period)?

Re: cpu-detect cheatcode

Posted: 23 Dec 2011, 09:14
by oranus
Thanks eveyone for share their opinion.

@fanthom
I search about sub menu for syslinux. I hope I'll be succeed.

Re: cpu-detect cheatcode

Posted: 25 Dec 2011, 01:07
by Tonio
How do the folks on systemrescuecd(Gentoo based specialized live cd) do it? They have multiple kernels some 32 bit as well as 64 bit. Might be intersesting to see? The user decides which kernel to use, there is no cheatcode :(

I like both versions of Porteus and use the one that comes handy in a particular situation(machine 64 bit or 32 bit).

Like fanthom suggests, maybe make a multicd option of having both Porteus versions on a cd/usb to boot either one?
There is a specialized script that allows us to do it if we want, and Porteus is supported :)

http://multicd.tuxfamily.org/#SupportedDistros