LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   (TUTORIAL) How to Make LiveCD/USB from installed Slackware 13/current or Arch system! (https://www.linuxquestions.org/questions/linux-distributions-5/tutorial-how-to-make-livecd-usb-from-installed-slackware-13-current-or-arch-system-806373/)

linus72 05-06-2010 03:08 PM

(TUTORIAL) How to Make LiveCD/USB from installed Slackware 13/current or Arch system!
 
OK

Gonna share with everyone how I have finally learned how to make a bootable
persistent livecd/usb from your installed-to-hard-drive 13 or current system.

Its not very hard and is very useful for making a Rescue cd, or maybe even a kiosk-like usb-browser.

Materials Needed:

1) A installed Slackware 13 (prefer current) system

2) Quax's 2.6.33.3 aufs,squashfs,lzma patched kernel with gobs
of extra drivers
http://www.slax.org/forum.php?action...parentID=61323

3) Linux Live Scripts 6.3.0
http://www.linux-live.org/

Steps

1) Install a minimal or full Slackware current system to a hard drive partition
with at least 4-5GB of space.
( Install can be no more than 2.6-2.7GB for a ~700MB CD; anything bigger
will be a DVD size!)

2) Grab Quax's kernel source and compile it as you wish
I just changed 486 to 686 and you can make both aufs and squashfs as built-in to kernel (*) or as modules (M).
See link above at slax forum for more info
If using aufs/squashfs as built-in, you must edit LinuxLiveScripts as at slax link above.

After compiling kernel, install it and boot off of new kernel.

3) Grab LinuxLiveScripts 6.3.0 and untar it into /tmp
edit .config and build if need be, also edit linux-live-6.3.0/initrd/initrd_create
if you made aufs/squashfs as built-in!(see slax link above for kernel)

4) empty /var/cache/sbopkg, /var/cache/slackpkg, /var/slapt-get, /var/log/removed_pkgs, /var/log/removed_scripts, /var/log/sbopkg, and /var/lib/slackpkg
as these files are unnecessary.
also delete or mksquashfs /usr/doc folder.

5) after cleaning system, configure everything as you want, bookmarks,etc

6) goto /tmp and run the build script in /tmp/linux-live-6.3.0.

Takes about 3 hrs for a 2.7GB install

Read all about slax's boot cheatcodes as most apply
http://www.slax.org/documentation_boot_cheatcodes.php

Any questions or if I left something out please post
I figured this would be a continuing thread!

sycamorex 05-06-2010 03:12 PM

Good stuff. I'll definitely try it in the near future.

linus72 05-06-2010 03:36 PM

This is how I am making/made nFlxu slack edition
the new one uses this kernel I compiled, only changing 486 to 686 and different name
I just did make menuconfig, then compiled it.

As for X, I used 3 scripts from Absolute Linux, namely /usr/local/sbin safex vidconfig del_caller
combined with /etc/rc.d/rc.local

heres del_caller


http://multidistro.com/downloads/Apps/del_caller

safex

http://multidistro.com/downloads/Apps/safex

vidconfig

http://multidistro.com/downloads/Apps/vidconfig

the script del_caller deletes the script vidconfig after 1st boot when running persistent
if you want it to run at each boot, get rid of del_caller

heres the rc.local I used

http://multidistro.com/downloads/Apps/rc.local

When I made nFlux slackware current, I deleted xorg.conf and replaced it with xorg.conf-vesa
cp /etc/X11/xorg.conf-vesa /etc/X11/xorg.conf

and so when you choose "no" and use vesa driver in vidconfig ncurses gui, it uses the xorg.conf
if you choose "yes", it makes new xorg.conf
it recognized my nvidia mx4000 card easily when i answered "yes"
but on my HP amd athlon64 with sis integrated graphics I had to use "no" or vesa option

If you guys have any hints for how to setup livecd to have option to boot to runlevel 3 or 4
I'm all ears!

I have nflux set for runlevel 4
after making livecd, it doesn't respond to boot parameters like "3" or "autoexec=teleinit~3"
but, I think I could have a inittab.3 or something as a user needs to choose 3 if they have a X issue.
any ideas??

linus72 05-06-2010 05:00 PM

The new slackware version of nflux current is ready, I made this Gem using the above info!
http://www.linuxquestions.org/questi...ml#post3959740

linus72 05-08-2010 06:28 PM

I have made a very good kernel from Quax's sources with many things added in
including alot of built-in support for ext2, 3, and 4
aufs and squashfs as (M), aufs set at 511 (load up to 511 slax modules)
arch i686
it also has all this http://www.slax.org/forum.php?action...parentID=61323


Download "kernel-live-2.6.33.3-qx2.txz"
http://multidistro.com/downloads/App...6.33.3-qx2.txz

config for kernel
http://multidistro.com/downloads/App...g-2.6.33.3-qx2

this kernel will make a livecd of installed system using LinuxLiveScripts 6.3.0

it comes as a .txz, installable as a pkg
use "explodepkg" on it to has these files

boot/vmlinuz-2.6.33.3-qx2
boot/config-2.6.33.3-qx2
boot/System.map-2.6.33.3-qx2

lib/firmware
lib/modules/2.6.33.3-qx2

etc/rc.d/rc.modules-2.6.33.3-qx2

also a install script (doinst.sh) that says

Code:

( cd boot ; rm -rf vmlinuz )
( cd boot ; ln -sf vmlinuz-2.6.33.3-qx2 vmlinuz )
( cd boot ; rm -rf config )
( cd boot ; ln -sf config-2.6.33.3-qx2 config )
( cd etc/rc.d ; rm -rf rc.modules )
( cd etc/rc.d ; ln -sf rc.modules-2.6.33.3-qx2 rc.modules )

remember to do /sbin/lilo too

So, basically setup your system, untar LinuxLiveScripts 6.3.0
into /tmp, edit build or config if need be,
then run the build script

this makes a great rescue cd, even a non-X one, or for experimenting with new software,etc

golfer7 06-05-2010 10:15 AM

linus72,

I wonder if it is possible to use kernel 2.6.34-qx1 instead of kernel-live-2.6.33.3-qx2.txz? I mean in order to use LLS 6.3.0 to remaster Slackware 13.1.

If I compile kernelsources for 2.6.34-qx1 using your .config config-2.6.33.3-qx2 will that do the trick? Or do I have to do something else?

BTW: I can not install nFlux Slackware 13.1 to harddisk using nflux-installer. I e the install program seems to work but when I try to boot up from harddisk I get kernel panic. I use GRUB. Is this correct?:
title nFlux Slackware 13.1 (sda7)
root (hd0,6)
kernel /boot/vmlinuz root=/dev/sda7 ro resume=/dev/sda5

nortonlui 06-05-2010 11:28 AM

Guys,

Don't forget this good script from Alien's

http://slackware.com/~alien/tools/usbimg2disk.sh

I use to install on Asus eeepc 701 and works fine !!!

linus72 06-05-2010 11:57 AM

Ah

mmm...what is kernel 2.6.34-gx1?

the kernel 2.6.33.3-13.1 is the one I use in newest nflux slack
http://multidistro.com/downloads/nflux.html

quax's kernel sources already patched with aufs and squashfs3.4 are here
http://mirror.live-modules.org/quax/...el%2F2010.1%2F

I compiled my kernel 13.1 from quax's 2.6.33.3-qx2 source for i686
its i486 as is

I havent gotten quax's new 2.6.34 kernel to successfully compile yet

If you want you could compile one of those
Or
I could pkg the 13.1 2.6.33.3-13.1 kernel/modules, stripped or full srcs etc for you?

as is its for i686

EDIT:
Oh did you read the manual-install text in /usr/doc?
which version of nflux slack do you have?
The manual-install explains the easy way to install to hdd
and grub-legacy is also there with lilo
you may have to edit /etc/fstab /etc/mtab
all info in /usr/doc/manual-install and /usr/doc/info of new version about that
but firt need to know if you have new version?

Heres a quote from /usr/doc/info
Quote:

It is a work-in-progress; sourced from Slack-Mini-Server's "sms-text-
installer".
If you want to instead "manually" install nFlux to a hard-drive
partition; I have included a tutorial (/usr/doc/manual-install)
I use to install Slax and it's derivatives, including nFlux,
to a prepared hard-drive partition(s).

HINT: the manual-install method is fun and you will learn
alot, please see all docs concerning Lilo, Grub, and Grub2!

For now, the best method involves using the nFlux-Installer
then Exit the installer when it comes time to install the
boot loader; either Lilo, Grub (legacy), or Grub2.

After exiting installer, you can then install Lilo or Grub to
either the MBR or root of a partition.
both liloconfig and grub(legacy)config are in fbpanel system menu
the manual-install test explains about how the installer basically just automates what the manual install method does
so, please read both of those in /usr/doc
also, note that there is a grub2 lzm entry to load grub2 module

golfer7 06-05-2010 12:44 PM

Quote:

Originally Posted by linus72 (Post 3993472)

mmm...what is kernel 2.6.34-gx1?

I have got Quax´s kernel 2.6.34-qx1 here: http://mirror.live-modules.org/quax/.../kernel/2010.1

Quote:

Originally Posted by linus72 (Post 3993472)
I havent gotten quax's new 2.6.34 kernel to successfully compile yet

I could do that.


Quote:

Originally Posted by linus72 (Post 3993472)
EDIT:
Oh did you read the manual-install text in /usr/doc?
which version of nflux slack do you have?
The manual-install explains the easy way to install to hdd
and grub-legacy is also there with lilo
you may have to edit /etc/fstab /etc/mtab
all info in /usr/doc/manual-install and /usr/doc/info of new version about that
but first need to know if you have new version?

Heres a quote from /usr/doc/info:

both liloconfig and grub(legacy)config are in fbpanel system menu
the manual-install test explains about how the installer basically just automates what the manual install method does
so, please read both of those in /usr/doc
also, note that there is a grub2 lzm entry to load grub2 module

No, I just used nflux-installer. I will however now try to edit /etc/fstab and /etc/mtab. That could possibly fix the kernel panic error.

linus72 06-05-2010 12:51 PM

so the 2.6.34 kernel compiled for you?
or no?

golfer7 06-05-2010 01:10 PM

Quote:

Originally Posted by linus72 (Post 3993527)
so the 2.6.34 kernel compiled for you?
or no?

Yes it did.

linus72 06-05-2010 02:35 PM

And did you remaster your install wint new 2.6.34 kernel or is that the problem?
as you stated at slax forum
beny wrote:
Quote:

hi, your Slackware kernel, should be Quax kernel 2.6.34-qx1 to have the right environment for LLS. imho.

As I said before I´m already using that kernel. LLS 6.3.0 does not work though. I e I can make a new ISO, but it does not work. "Cannot mount union"...
its not booting?

golfer7 06-05-2010 03:15 PM

linus72,

Yes, that's correct. My remastered Slackware 13.1 system with kernel 2.6.34-qx1 will not boot fully. It stops saying something about not being able to mount union.

Thanks for your kernel-live 2.6.33.3-qx2. I can remaster Slackware 13.1 with LLS 6.3.0 without problems with your compiled kernel.

Re. nflux-installer: It did not help to edit /etc/fstab and /etc/mtab. I get kernel panic anyhow. I'm sure I have got fstab/mtab right.

linus72 06-05-2010 03:20 PM

OK
can you tell me all about your setup?
partition its on
you installed lilo?
did you chroot in and do /sbin/lilo
aftre editing /etc/lilo.conf?

did you look at fstab/myab exam[ples in manual-install?

Note that the linux-live-6.3.0 in /root of new nFlux 13.1
is different than original
I added some stuff to initrd_create and also
the "magic" IF
if you have aufs,squashfs as built-in vs modules

golfer7 06-06-2010 02:15 AM

Quote:

Originally Posted by linus72 (Post 3993661)
OK
can you tell me all about your setup? partition its on you installed lilo? did you chroot in and do /sbin/lilo after editing /etc/lilo.conf?

I did not install LILO since I use GRUB on that computer. (I have 10 other Linux systems installed on the very same computer).

Quote:

Originally Posted by linus72 (Post 3993661)
did you look at fstab/myab examples in manual-install?

Yes I did (now). It does not help. (I get kernel panic when booting).

Quote:

Originally Posted by linus72 (Post 3993661)
Note that the linux-live-6.3.0 in /root of new nFlux 13.1 is different than original I added some stuff to initrd_create and also the "magic" IF if you have aufs,squashfs as built-in vs modules

That should not mean anything re. the function of nflux-installer. Or? Too bad that I can´t use nflux-installer. I have been looking for a program/script like that to be able to install my Slackware remasters.

I will now try to install nFlux Slackware manually. I´m sure that will work.

Edit later the same day
Maybe there is nothing wrong with nflux-installer after all. I did a manual install of nFlux Slackware 13.1 to a partition on my second harddisk. The same problem with kernel panic. Maybe the problem is connected with my second harddisk. It seems to me that your kernel 2.6.33.3-13.1 only want to recognize my first harddisk. I will try to install nFlux on another computer. A manual install of a Slackware live system should always be successful.

Edit a little later again the same day
Yes, I could use nflux-installer on another computer installing nFLUX to a partition on my first harddisk (/dev/sda). No need to edit fstab/mtab! Thanks linus72! Sorry if I made you believe there was something wrong with nFlux and/or nflux-installer.


All times are GMT -5. The time now is 05:39 AM.