I've seen a lot of people struggling with creating new LiveCDs with the newer kernels but using the old LLS scripts and having problems so I thought I would share my version of LLS. I had customized it for my own particular purpose but I re-genericized it (i.e. removed the custom code and uncommented the parts that were removed) so it should work very close to Tomas's 6.3 version. At least I hope it does. A fair amount of credit goes to linus72 and fanthom for their helpful posts and customized/updated versions of LLS.
NOTE: I will try to assist where I can but this is provided as-is.
Also, it looks like the LZMA patches will be a thing of the past soon as the newest versions of the kernel are going to support something called XZ compression in SquashFS. So these scripts will need to be updated again for that.
I was also one of those that had lots of problems trying to compile my own live Ubuntu. The newer kernels these days use Squashfs4.0, I actually had to strip this out and use Squashfs3.4+sqlzma since there are no lzma patches for squashfs4.0.
Also, it seems like the busybox that comes with the linux live scripts didn't work, it was too old and it's modprobe could not correctly insert newer kernel modules. I had to compile my own version of busybox and replace the it, forcing me to replace the C runtime libraries and many other outdated libraries as well.
After all of that I thought I had it fixed however I had an issue trying to load the ulzma, lzma modules (missing symbols for some reason) and gave up there.
Thank you for posting these scripts! Can't wait to give them a try.
here is my linux-live-6.3.0_x86 originally provided by Ritchie (search his name)
also there is a "live-kit" which includes SalixOS' persistence wizard (requires zenity and libgnomecanvas)
which makes a .xfs formatted slax save
So, we need to get Fathom to create a new 2.6.38 linux-live skyhog99 with .xzm's!
I will start a thread at his forum for this tomorrow unless you get to it first?
OK, I just successfully made a livecd with a 2.6.38.2 kernel patched with aufs2 patch above^ post (squashfs-lzma/xz is already in kernel now, yes?)
I'm gonna post links to the squashfs-tools-4.2 you need from JRD at SalixOS, and USE THE LINUX-LIVE ABOVE AND REPLACE linux-live-6.3.0_x86/tools/mksquashfs and unsquashfs WITH THE MKSQUASHFS/UNSQUASHFS FROM THE 4.2 FROM JRD'S SQUASHFS-TOOLS!
Also, gonna post my 2.6.38.2-smp kernel .config so anyone can use it if they wish, it is full of everything
Get the linux-live in previous post, the aufs2 patch in previous post, the "live-kit" in previous post, and the kernel source
apply aufs2 patch, use the config above and compile kernel, install live-kit, place "linux-live-6.3.0_x86" in /root, and resulting kernel will make a live system.
Run the build script from /root/linux-live-6.3.0_x86/ and live media will be in /tmp/live-data-*/
./build
ALSO; here is the i686 kernel and kernel modules pkg's I used and made to test the 2.6.38.2 kernel
this is a live kernel made using the .config above
Kernel below was compiled on a Slackware 13.1 system for pentiumPro (i686)
same as Slackware's hugesmp kernel with more added
2) Then I installed the kernel, kernel modules, linux-live, squashfs-tools-4.2, and live-kit from above
and ran the build script from /root/linux-live-6.3.0_x86 and the resulting media in /tmp/live-data-*/ booted up fine off my usb!
**REMEMBER TO REPLACE THE MKSQUASHFS/UNSQUASHFS IN /root/linux-live-6.3.0_x86/tools WITH THE MKSQUASHFS/UNSQUASHFS FROM SQUASHFS-TOOLS-4.2 (IN /USR/BIN)
after installing squashfs-tools-4.2 do as root
cp -r /usr/bin/mksquashfs /root/linux-live-6.3.0_x86/tools/
cp -r /usr/bin/unsquashfs /root/linux-live-6.3.0_x86/tools/
then run the build script!
This uses the old .lzm modules, but it works with 2.6.38.2
Fathom's new testing porteus has xzm scripts (dir2xzm,etc) but we would need some scripts in linux-live edited for .xzm vs .lzm right?
Hope this helps
if I missed anything please post
if anyone has any good info please post!
EDIT: apparently just running the build script creates a non-lzma compressed .lzm's!?
which results in a larger live media
I tried editing liblinuxlive for xz compression (-comp xz) but it doesn't seem to work
we need Fathom to create a new linux-live-6.3.0_x86 for making xz compressed .xzm and initrd.xz like his Porteus
EDIT: apparently just running the build script creates a non-lzma compressed .lzm's!?
which results in a larger live media
I tried editing liblinuxlive for xz compression (-comp xz) but it doesn't seem to work
we need Fathom to create a new linux-live-6.3.0_x86 for making xz compressed .xzm and initrd.xz like his Porteus
Yeah!
If you are using kernel 2.6.38.2, you can easy use it between squashfs 4.0 and squashfs 4.2 format packages.
But the squashfs-tools 4.2 can decompress the 4.0, the suqashfs-tools 4.0 can not decompress 4.2.
if you need a scripts to work between the two version, you may like theres modules.
The lzm3 is work for slax offical package.(We called it lzm format).
The lzm4 is work for squashfs 4.0 package (We called it lzm2 format).
The xzm is work for squashfs 4.2 package (We called it xz format).
linus72 wrote:
EDIT: apparently just running the build script creates a non-lzma compressed .lzm's!?
which results in a larger live media
I tried editing liblinuxlive for xz compression (-comp xz) but it doesn't seem to work
we need Fathom to create a new linux-live-6.3.0_x86 for making xz compressed .xzm and initrd.xz like his Porteus
Hey linus72-
I edited all the scripts and changed any .lzm references to .xzm and it seems to work fine (changing the name of the scripts from their lzm version to xzm, e.g. dir2lzm becomes dir2xzm). I left the -b 256K parameter alone as it appears to be supported by either lzm or xzm. The xzm versions of the files are a little bit smaller, not a lot. However, some of the size differences in the total distro might be because the 2.6.38.2 kernel is bigger than its predecessors. I will experiment with various xzm compression parameters that are available in the squashfs tools 4.2 and see if it makes any difference. It could be my imagination but the distro appears to boot very quickly so that's a good thing.
note that his mksquashfs,etc is not the one in your new LLS! his scripts are different too.
Thanks linus72.
fyi...I just ran some tests of activate/deactivate using the ones from my distro (keeping in mind the only thing I changed was to change all references from .LZM to .XZM) and it worked fine for me. I will take a look and see what the Porteus differences are.
EDIT: I did some more checking and fanthom's version has some additional functionality in it:
1- It allows you to login as root if not already. The original version just kicks you out with an error if you're not running it from root.
2- It updates the KDE menu, which would have no effect if that's not applicable.
I also noticed that it calls xactivate instead of kactivate (only if the file is marked executable). I'm not sure what this file does but I don't have either of these files in my distro so it must be something that was part of the base Slax distro. I always run activate from within a command prompt so I'm guessing that kactivate (or xactivate) would have some special functionality to make the GUI behave a certain way when you run it. Not critical functionality in my view.
Anyway - I could find nothing wrong with the stock version of activate/deactivate with the minor modification to look for .XZM vs. .LZM.
EDIT: This Linux Live Scripts assumes that the kernel is built with aufs and squashfs as modules, meaning if you "borrow" a kernel from another distro (e.g. Porteus), it may give you an error. Also it is designed to work with the new lzma2 compression in kernel versions 2.6.38.x and later. Not compatible with earlier kernels.
linus72 wrote:
skyhog99
bad news
cat get it to boot off ext3 usb with grub
says it can't find the "slax" folder, etc
will try with fat32 usb but expect same result
what could be wrong?
it boots off hdd, just not usb
@linus72
I've never been able to get an ext3 partition to work off a usb with any of the LLS versions (official or custom). I would try fat32. Let me know your experience.
it wont boot off usb unless the initrd.xz is changed back to initrd.gz
then it boots fine?!
what does that mean?
I did
xz -d initrd.xz
gzip --best initrd
and it booted fine after editing syslinux.cfg for .gz vs .xz
You're using grub? Maybe grub doesn't support .XZ?
UPDATE - I just created a USB bootable using unetbootin just to see if it would work and it does. I assume that if I created one manually by copying all the files to the USB stick and running the scripts that Tomas provides that makes it bootable it would work as well. I'm guessing that this means that Syslinux and Isolinux support XZ compression but GRUB does not. Maybe there's a newer version of GRUB that will work.
it doesnt work on fat32 usb either
im at porteus mini chat now with livedbg and dmesg
UPDATE!
ok, problem was boot parameter "max_loop=255" would cause initrd.xz to not load
now it loads great
also, skyhog99, previous LLS usb was rw, now usb is read-only, why?
thx for hard work bro
EDIT again
confirmed that porteus beta can use max_loop and verything is rw
your LLS wont load with max_loop=255 and media/persistent save is read-only
how to fix?
Thanks for testing this. I will take a look at it.
EDIT - OK, it looks like the logic to mount the device that contains the distro needs to be made smarter. As you know, that logic attempts to mount it with as many options as possible, then it backs down to fewer options and finally if all else fails it mounts it read-only. Apparently some of the options are causing it to always mount read-only which means changes= will never work. I never noticed this on a Live-CD, which is what I normally use, but on a USB stick it's a problem. Not sure what is causing this; could be Busybox or the newer kernel, but I will look at it further to see what can be done to fix.
EDIT2: Found it. It's the "user" option. It's apparently not supported by a lot of device types (ISO9660 and USB included) so the mount_device routine always mounts it read-only and changes= does not work. I'm uploading a new set of scripts now.
OK, I just successfully made a livecd with a 2.6.38.2 kernel patched with aufs2 patch above^ post (squashfs-lzma/xz is already in kernel now, yes?)
...
"
And I'm getting stuck when the live cd boots quite early in the process (after the kernel init, i guess) with the following message:
Setup union directory (using aufs)
mount: mounting aufs on union failed: No such device
ISO9660 extensions: RRP_1991A
Fatal error occured - can't setup union (aufs)
The base distribution is a Gentoo,
I tried with a kernel 2.6.38.2 and the config provided in the post and with another a 2.6.38 from the Gentoo distrib (then patched with AUFS),
I used standard Squasfs tools 4.0 then the 4.2 as indicated in the post,
XFS is compiled in the kernel,
Always the same error
Any idea about this problem ?
the live-kit-i686-1.txz contains some Slax scripts and the persistence wizard from Salix which requires libgnomecanvas
I suggest you compile the kernel yourself using the config I provided for 2.6.38.4 and the aufs patch
at above link.
the aufs you are using may be different in some way?
I was going to install a core install of Sabayon or Calculate Linux and see if it would work and I think I will try it:)
Thank's for your help !
I've manage to boot the live CD but some points are still a bit dark and I'll need to polish
- I got your archive from http://www.salixos.org/forum/viewtopic.php?f=20&t=2453
- Got a 2.6.38.4 kernel form kernel.org and aufs patch from your archive (it seems to be the same i was using before)
- Patched then compiled using your 26384 kernel config (with genkernel in Gentoo)
- I was unable to use your scripts lls-new-xz-generic because squashfs was failing with missing libsqlzma.so on my system
- I've used the scripts linux-live-6.3.0_x86 and squashfs-4.2 compiled on my system as you mention earlier in this thread
=> this lead to a working livecd
I still need to check the following
- What was wrong in my kernel conf because except this point all other combinations were already tested, that might be headache-compliant :-)
- The iso seems a bit large, I've read in this thread that maybe the compression might not be optimum, I need to review that
- Some warnings and errors are appearing in the live boot process but this is probably due to my system init/rc configuration
And I'm getting stuck when the live cd boots quite early in the process (after the kernel init, i guess) with the following message:
Setup union directory (using aufs)
mount: mounting aufs on union failed: No such device
ISO9660 extensions: RRP_1991A
Fatal error occured - can't setup union (aufs)
The base distribution is a Gentoo,
I tried with a kernel 2.6.38.2 and the config provided in the post and with another a 2.6.38 from the Gentoo distrib (then patched with AUFS),
I used standard Squasfs tools 4.0 then the 4.2 as indicated in the post,
XFS is compiled in the kernel,
Always the same error
Any idea about this problem ?
Thank's
Hi, check if aufs.ko is in the initrd image.
Think initrd_create is looking in the wrong place.
The problem is the path to aufs module hard coded in that script.
Linux-Live scripts should be generalized to be independent from distribution/kernel/architecture.
And I hope some day all should be put under version control...
Hiy'all, I'm trying to build a linuxlive from my slackware 13.37 installation (kernel 3.2.5) using lls-new-xz-generic scripts ... build and install to USB succeeded with no probs but boot hangs at point where it says "* starting windows filesystem support" ... the next step should be "* creating /dev entries for block devices" but it doesn't get there, so my guess is there's a problem creating dev entries, since windows filesystem support is built in to the kernel, which is loading ok. Any tips or suggestions would be greatly appreciated, since I'm rather at a loss for a solution at this stage.
John wrote:
Hiy'all, I'm trying to build a linuxlive from my slackware 13.37 installation (kernel 3.2.5) using lls-new-xz-generic scripts ... build and install to USB succeeded with no probs but boot hangs at point where it says "* starting windows filesystem support" ... the next step should be "* creating /dev entries for block devices" but it doesn't get there, so my guess is there's a problem creating dev entries, since windows filesystem support is built in to the kernel, which is loading ok. Any tips or suggestions would be greatly appreciated, since I'm rather at a loss for a solution at this stage.
Hi John,
I am having the exact same problem with my own LLS scripts (obviously modified from tomas). Mine are supposed to be for 64bit OS's. I don't know what I have done wrong as i've had a lot of experience in this with 32bit systems having maintained a version for 2.6.28, 2.6.32, 2.6.37, 2.6.38.
For my 64bit version I have of course been replacing the binaries and libraries for 64bit ones, for the 3.x.x kernels I am using AUFS 3, and for the OS I am using Archlinux. I'm really not sure what I have missed. but I have done some investigation which may help you, or may suggest we are having different problems.
what I have found is that the fail at 'Starting windows filesystems' on my system is in fact a failing in the mount_initrd_loops in liblinuxlive called very early from linuxrc, which calls mount_device.
in mount_device the following command:
mount -n -o $OPTIONS $FS "$DEV" "$2" >/dev/null 2>&1
seems to be causing the problem. thousands of loop devices appear in /dev, exactly how many is defined by how many free inodes you have in your filesystem. running
# df -i
will show you that you have none left!
which creates the error that can be seen in debug mode
"No space left on device"!
I have tired putting the system into debug shell mode even earlier in the linuxrc process and typing these commands manually. it is at the mount command that things go wrong.
if anyone can comment on this, please do! I am pulling my hair out.
Also, i see this an old post. not sure who is still looking around this site, used to be really active back in the day. john, if you have since worked it out, please let me know what you did.
amazing how talking it through with someone, or rather in this case typing to someone, or rather the reality typing to myself can really help.
its a problem with mount command
but mount works for the other stuff
mount only fails on loop devices
it's less likely to be related to LLS, as John is using skyhogs which must work and i am using my own breed...
so what different...
the kernel or initrd
quick scan of slax's 2.6.27.8 config against my 3.3.7 on loop devices reveals that my loop support is modulised. Tomas is built in.
quick check of lsmod reveals that its not loaded
modprobe can't find it.
mmm... on to something!
LLS requires loop support to be built in! obvious isn't it. How can you mount your drivers.l/xzm package without already having loop support. oh wait, unless you add to the /lib/modules of your initrd. well i guess either way is the solution
i built it in as per Tomas's lead. built in. Now I am onto my next problem.
hope this finds you other that 100 days late, helpful.
Andy- glad you were able to figure this out. This is very useful information for future. Good luck on your endeavors. Please share your scripts when you get it completely working.
I tried lls-new-xz-generic scripts with precompiled kernel 3.6.2 from linux-live-org site.I installed xz utilites and squash tools 4 also.I got liblzma.so.0 error "shared library libzma.so.0 cannot open.No such file"What may be reason .But it works well with Tomas current linux-live script Pl help me