fulvioo
Hello. First of all this is just a mix of information I gathered during the last weeks when I decided to make my own live cd. Since there was a bunch of old and inaccurate tutorials, this could be a fresh and good source of information for you.

This looks like a long post, but if you follow this steps, you will see its quite easy.

If you don't want to use your hdd, you can do this by vmware as well.

This will make a knoppix-like distribution fully customized.
If you dont like knoppix, try these other guides:
For slackware, Use http://www.linux-live.org/
For DSL, use http://damnsmalllinux.org/cgi-bin/forums/i...806;hl=remaster
For mandrake, use: http://home.tiscali.nl/berenstraat/


1) Ok, first of all I created 2 partitions: hda1 with 1gb for SWAP, and hda2 with ~6gb for ext3.

2) Then I booted the live cd from a knoppix based distro (tested with feather, miniknoppix, knoppix, whoppix (other based should work as well)).

3) Become root
sudo su

4) Mounting the partition
mount -t ext3 /dev/hda2 /mnt/hda2

5) Creating the needed folders
mkdir /mnt/hda2/source
mkdir /mnt/hda2/source/KNOPPIX
mkdir /mnt/hda2/master
mkdir /mnt/hda2/master/KNOPPIX
mkdir /mnt/hda2/master/boot
mkdir /mnt/hda2/master/boot/isolinux

6) Copying files
cp -a /KNOPPIX/* /mnt/hda2/source/KNOPPIX
cp /cdrom/boot/isolinux/* /mnt/hda2/master/boot/isolinux
rm -f /mnt/hda2/source/KNOPPIX/etc/resolv.conf
cp /etc/resolv.conf /mnt/hda2/source/KNOPPIX/etc/resolv.conf
cp /etc/X11/XF86Config-4 /mnt/hda2/source/KNOPPIX/etc/X11/XF86Config-4

6.1) To Edit BOOT LOGO read the post from "je" at:
http://www.knoppix.net/forum/viewtopic.php?t=7

7) Working inside the copied files (chroot)
cd /mnt/hda2/source
chroot KNOPPIX
mount -t proc /proc proc

8) Setting up the configurations to customise the distro inside X ;)
cd /home
cp -R /etc/skel knoppix
chown -R knoppix.knoppix knoppix/
vi /etc/X11/Xwrapper.config
Change the line:
allowed_users=console
to:
allowed_users=anybody

9) Now lets use the default user "knoppix" instead root to customize KDE
su knoppix
cd /home/knoppix
startx /usr/bin/startkde -- :1

10) Now change anything you want inside kde

11) Removing Stuff
apt-get update
apt-get remove --purge tetex-base
apt-get remove --purge kde-18n-**
apt-get remove --purge vim
apt-get remove --purge emacs21
apt-get remove --purge etc... and so on...
rm -rf /usr/src/*
rm -rf /usr/share/doc/*

12) To install stuff..
apt-get update
apt-get install packagename

13) Checking what we got installed. The next line will show in order what is installed and how big it is. We can remove them using: apt-get remove --purge packagename
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n

14) Removing orphan packages (will remove useless stuff)
deborphan | xargs apt-get -y -purge remove
deborphan --find-config | xargs dpkg --purge

14.1) Find out what is big by folders
du -cb / | sort -n

15) Restoring some options we changed before
vi /etc/X11/Xwrapper.config
Change the line:
allowed_users=anybody
to:
allowed_users=console
rm -fr /etc/X11/XF86Config-4
vi /etc/resolv.conf
Change:
nameserver x.x.x.x
to:
#nameserver 127.0.0.1


16) Getting back to console
click on K (kde menu), LogOut, End Sesssion


17) Restoring skel (default user) folders, configs, files to be restored when the live cd is made:
exit
cd /home
rm -rf /etc/skel
mv knoppix/ skel
mv skel /etc
chown -R root.root /etc/skel

18) Clear stuff and things we typed:
apt-get clean
apt-get autoclean
rm -f /etc/skel/.bash_history
rm -f root/.bash_history


19) Done. Let's get out from chroot and come back to the live cd we booted.
umount /proc
CTRL+d


20) Lets create an image of what we have done
mkisofs -R /mnt/hda2/source/KNOPPIX | create_compressed_fs -b - 65536 > /mnt/hda2/master/KNOPPIX/KNOPPIX

21) And finally, let's create the .iso file
cd /mnt/hda2/master
mkisofs -pad -l -r -J -v -V "MyDistro" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o MyDistro.iso /mnt/hda2/master/


enjoy
belgther
but this should work without knoppix, too, doesnt't it?
fulvioo
What you mean without knoppix?
This is a HOWTO to remaster knoppix based distributions.
belgther
I thought the most important thing here was the boot files, which can be got without knoppix, too...
Or did I understand everything wrong?
fulvioo
The boot files are very important. But you will need more than that to port a regular debian based distro or any other distro to knoppix. Actually I did a couple of searches on this topic some time ago, and I only could find very few information.

There is some places where they call "Knoppix from Scratch" which tries to guide all the changes on the file system to port knoppix.

But anyway, you should try the tutorial. It is great if you need a customized tool, it has a very good hardware detection (works on most of the computers) and it boots very fast.

Company and school presentations with it could be a plus. Think about it :)


I hope it was usefull,

cheers
genxweb
QUOTE(fulvioo @ May 3 2005, 08:14 AM)
The boot files are very important. But you will need more than that to port a regular debian based distro or any other distro to knoppix. Actually I did a couple of searches on this topic some time ago, and I only could find very few information.

There is some places where they call "Knoppix from Scratch" which tries to guide all the changes on the file system to port knoppix.

But anyway, you should try the tutorial. It is great if you need a customized tool, it has a very good hardware detection (works on most of the computers) and it boots very fast.

Company and school presentations with it could be a plus. Think about it smile.gif


I hope it was usefull,

cheers
*



You could also look up the linux from scratch project and customize and create your own distro in a few days of work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.