15

October
2012

Reintroducing cheatcode "from="

I didn't realize how important was this feature of Slax until I get many comments requesting it. What is it all about? When Slax starts, it searches for its boot device. A device is recognized as boot device if it contains a directory /slax/ and some .sb files inside. This way Slax can boot from any device, since it tries the search on all devices in given computer.

People sometimes want to run several distros from one device, and they complained they can't (for example) load Slax from /distros/slax7/ directory (while they have another distro in /distros/otherlinux/ as well). Now it is possible, simply pass following cheatcode (boot parameter) to Slax kernel commandline:
from=/distros/slax7/

This feature could be also used to speed up Slax loading if you have slow CD for example, you simply copy Slax data to your hard drive to c:\slax7\ directory and then boot from the CD and use cheatcode
from=slax7

How to use the cheatcode? (info for beginners): When Slax boots, you'll see a boot screen with logo and timer. You have actually 4 seconds to press Esc to cancel the timer and enter the boot menu. There, hit Tab. You'll see a commandline, so type the cheatcode at the end, don't forget to start with a blank character (space) as a separator.

Only the mentioned syntax is supported. In old Slax it was even possible to use from=/dev/sda1/slax/ but this is not supported at the moment since I don't think it would bring any advantage. If you really want to be sure to load Slax from a particular drive, then simply rename the directory to something unique, like /Slax007/ or such, and use from=/slax007/. It will work only if the given directory contains at least one compressed slax bundle (.sb)

Download test version (only TAR 64bit)

User comments
jcsoh 2012-10-15 13:11

How to use the cheatcode? (info for beginners): When Slax boots, you'll see a boot screen with logo and timer. You have actually 4 seconds to press Esc to cancel the timer and enter the boot menu. There, hit Tab. You'll see a commandline, so type the chatcode at the end, don't forget to start with a blank character (space) as a separator.

Typho error
"type the chatcode at the end,"
"chatcode" should be "cheatcode"

Jason 2012-10-15 15:59

Dont know if you will implement this, but still worth an ask :).
Grub2 is able boot a kernel directly from a .iso file using loopback and iso-scan/filename. This way with grub2 installed it is not even needed to extract the .iso.
However once the kernel and initramfs is loaded, using similar from= cheatcode, the live kit can loopmount the .iso and proceed as usual looking for slax data in the loop mounted iso.
This way .iso need not be extracted, just copied to a harddrive partition as is.

SHELLes 2012-10-15 20:06

Jason wrote
====================
Grub2 is able boot a kernel directly from a .iso file using loopback and iso-scan/filename
====================

Grub4dos too

Jason 2012-10-15 22:22

@SHELLes
I guess the only limitation would be then with loaders like legacy GRUB and LILO.

But I think it will also solve the problem of multiple slax folders, since the live kit will search for slax data only in the loop mounted .iso

Liquid Snake 2012-10-16 07:10

I guess this implementation from=/slax700 is enough for me. I will be able to boot with the CD and redirect to the flash drive.

Manfred 2012-10-16 10:41

could you please either correct the link or upload the right version?

Download test version (only TAR 32bit) points to

hxxp://fxp.slax.org/Slax-7.x/testing/slax-7.0-xorg-2012-10-16-x86_64.tar

Tomas M 2012-10-16 12:00

Ouch, thank you, link fixed :)

Manfred 2012-10-17 01:10

...may I also suggest to privide a 32bit version next time?

People like me can't test this version as I only own Intel Z5xx/6xx based netbooks/tablets.

Those devices aren't 64bit capable.

Manfred

Manfred 2012-10-17 01:12

*provide

Tomas M 2012-10-17 01:18

Actually it was my intention to publish just the 32bit version but as you can see I uploaded wrong ISO image (for 64bit) my mistake :)

Vitaly Izmailova 2012-10-21 03:37

Love your blog, in fact arrived by checking yahoo and google for a comparable issue to this post. Which means this might be a late post nevertheless keep up the great work.

Manuel 2012-11-07 15:27

I have slax in my HD as c:\slax\slax.iso and as c:\slax\*.sb so I can boot in native way and also from VMware. However, I wonder if it is still possible to use cheatcode from=slax.iso in order to eliminate duplicated information (slax\*.sb), and still being able to boot in both ways.

Thanks!

Jason 2012-11-07 19:40

@Manuel,

Maybe your requirement is similar to mine, I use virtualbox (as compared to you using VMWare). If you see my comment [2] above, I wanted the same, to avoid duplication so that slax can run from a virtual environment as well as native way.
If your bootloader is grub2 then using loopback command you can load the kernel and initrfs.img then the loaded initrfs has to loop mount the .iso and then checks and loads slax data from the loop mounted dir.

Manuel 2012-11-08 08:34

@Jason:

I am using gdldr (grub4dos)

Below are my menu.lst entries.
Both load kernel (vmlinuz and initfrs.img are phisically in c:\slax\boot\ )

This one does load kernel from physical files
c:\slax\boot\vmlinuz
c:\slax\boot\initfrs.img
but fails to find *.sb in c:\slax\slax.iso

title slax ISO
kernel /slax/boot/vmlinuz from=/slax/slax.iso slax.flags=xmode vga=773
initrd /slax/boot/initrfs.img
boot
======================================================

And this one loads kernel from c:\slax\slax.iso but can't find files in slax.iso, since it searches into c:\slax\

(I think its a grub4dos issue: disk map emulation becomes inaccessible when OS protected mode takes control)

title slax ISO 3 map
find --set-root /slax/slax.iso
map /slax/slax.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
=====================================================

I am confused in the loop stuff. How would you fix it?
Thanks so much in advance!

CK Lee 2013-01-05 19:57

I am booting slax from a does using freedoms and links. However when I used freedoms to copy the .SB files from the CD or another location to /slax the ffilenames were capitalized and so slax couldn't find them. When I rename them back to lowercase it works using windows. Is there a way to get slax to ignore the case of the filenames esp .SB files ?