homey
04-29-2004, 12:14 AM
This is an attempt to show how I made my own version of a linux livecd aka Knoppix remaster. I have also made one using Slackware and Slax but that's another story. :)
I was able to get good information by much digging around on the net. In particular, I found these articles to be very helpful and I used parts from both.
http://gnubox.dyndns.org:8080/~sunil/knoppix.php
http://dirk.eddelbuettel.com/quantian/howto_build.html
I made a hard drive install of Knoppix 3.3 to operate from which is handy as it has the cloop tools already installed. I made a 20GB partition ( /dev/hda5 ) for this and a 600MB swap partition ( /dev/hda6 ) . Another 20GB partition ( /dev/hda7 ) is used to put the work onto. I know that is way more than needed but I have a large hard drive and don't want it to feel unwanted.
Below is a summary of steps which I used while booted up in the hard drive system....
mkdir /mnt/build
mount /dev/hda7 /mnt/build
cd /mnt/build
mkdir orig-cdrom uncompressed source newcd
## those are 4 separate directories
mount /cdrom ## with knoppix 3.3 in it
cp -Rapv /cdrom/* orig-cdrom/
umount /cdrom
insmod cloop file=orig-cdrom/KNOPPIX/KNOPPIX
mount -o ro /dev/cloop uncompressed
cp -Rapv uncompressed/* source/ ## source is going to be the work place
umount /dev/cloop
rmmod cloop
Ok, now the work begins. These are very important steps.
cd /mnt/build
chroot source/
mount -t proc /proc proc ### don't forget to do this
## if you are done or leaving the project, don't forget to unmount the /proc with this command:
umount /proc
## then you need to remount it when starting up work again
Do yourself a favor and set the correct time zone in the chrooted environment before you go any further. If you don't do this you may get an error on boot up of the cdrom complaining about something like /etc/modules.conf is newer than the /lib/modules/2.4.24-xfs/modules.dep file.
tzconfig ## to change the time zone
``date 04281200 ## to change the date to April 28 12:00
Check it with the command: date
If you forgot to do this before you started, you may have success using the command: touch /etc/modules.conf and run the knoppix.clean script again to update the modules.dep file.
Here are a couple of very useful tools to help speed things up.
I printed out a master list of knoppix packages from this site ftp://ftp.uni-kl.de/pub/linux/knoppix/packages.txt . This is handy to check on stuff you may want to add or remove.
Another must have is a list of packages to be removed. This is also called a kicklist and is used with the command: dpkg -P `cat kicklist` This needs to be run several times along with apt-get remove < package name >
Here are the commands which I used
dpkg -P `cat kicklist`
dpkg -P `deborphan`
apt-get remove < package name >
apt-get install < package name >
apt-get update
apt-get upgrade
updatedb
depmod -a
sh knoppix.clean
If you suddenly lose the ablity to communicate with the apt-get resources, change the /etc/resolv.conf link to a regular text file using your ISP information. Example...
nameserver 100.100.200.3
This may happen often when working from Knoppix but it doesn't happen when using my Redhat install.
Run the command: dpkg -l > list.txt to make a list which you can check for those stubborn packages which have dependancies. If you are sure it won't be missed, you can use apt-get remove to get rid of it. Be careful about removing to much important stuff.
If you want to use another window manager such as fluxbox, you can edit the /etc/init.d/knoppix-autoconfig file. Look for the lines...
# Allow only supported windowmanager
#####the following is really one long string
case "DESKTOP" in gnome|kde|larswm|xfce|
windowmaker|wmaker|icewm|fluxbox|twm) ;; *)
DESKTOP="KDE"; ;; esac
I changed that to look like this..
# Allow only supported windowmanager
case "DESKTOP" in fluxbox) ;; *)
DESKTOP="FLUXBOX"; ;; esac
I changed the /etc/inittab to default to run level 3 ( command line )
# The default runlevel.
id:3:initdefault:
as many of the packages don't even need a window manager. If you do want to start the window manager, use the command: startx
When you get every thing set up the way you want it, you need to make the compressed image and make an iso from that. Then burn to a cd ( use a RW unless you are rich ).
Copy the boot.img and boot.cat files from the orig-cdrom /KNOPPIX directory to the newcd /KNOPPIX directory.
cd /mnt/build
mkisofs -R /mnt/build/source | create_compressed_fs - 65536 > /mnt/build/newcd/KNOPPIX/KNOPPIX
cd newcd
mkisofs -R -J -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -o ../mycd.iso .
#### that dot is needed in this case.
cd ..
cdrecord dev=0,0,0 blank=fast
cdrecord -v speed=4 dev=0,0,0 -data mycd.iso
I'll attempt to attach my kicklist and the knoppix.clean script
I was able to get good information by much digging around on the net. In particular, I found these articles to be very helpful and I used parts from both.
http://gnubox.dyndns.org:8080/~sunil/knoppix.php
http://dirk.eddelbuettel.com/quantian/howto_build.html
I made a hard drive install of Knoppix 3.3 to operate from which is handy as it has the cloop tools already installed. I made a 20GB partition ( /dev/hda5 ) for this and a 600MB swap partition ( /dev/hda6 ) . Another 20GB partition ( /dev/hda7 ) is used to put the work onto. I know that is way more than needed but I have a large hard drive and don't want it to feel unwanted.
Below is a summary of steps which I used while booted up in the hard drive system....
mkdir /mnt/build
mount /dev/hda7 /mnt/build
cd /mnt/build
mkdir orig-cdrom uncompressed source newcd
## those are 4 separate directories
mount /cdrom ## with knoppix 3.3 in it
cp -Rapv /cdrom/* orig-cdrom/
umount /cdrom
insmod cloop file=orig-cdrom/KNOPPIX/KNOPPIX
mount -o ro /dev/cloop uncompressed
cp -Rapv uncompressed/* source/ ## source is going to be the work place
umount /dev/cloop
rmmod cloop
Ok, now the work begins. These are very important steps.
cd /mnt/build
chroot source/
mount -t proc /proc proc ### don't forget to do this
## if you are done or leaving the project, don't forget to unmount the /proc with this command:
umount /proc
## then you need to remount it when starting up work again
Do yourself a favor and set the correct time zone in the chrooted environment before you go any further. If you don't do this you may get an error on boot up of the cdrom complaining about something like /etc/modules.conf is newer than the /lib/modules/2.4.24-xfs/modules.dep file.
tzconfig ## to change the time zone
``date 04281200 ## to change the date to April 28 12:00
Check it with the command: date
If you forgot to do this before you started, you may have success using the command: touch /etc/modules.conf and run the knoppix.clean script again to update the modules.dep file.
Here are a couple of very useful tools to help speed things up.
I printed out a master list of knoppix packages from this site ftp://ftp.uni-kl.de/pub/linux/knoppix/packages.txt . This is handy to check on stuff you may want to add or remove.
Another must have is a list of packages to be removed. This is also called a kicklist and is used with the command: dpkg -P `cat kicklist` This needs to be run several times along with apt-get remove < package name >
Here are the commands which I used
dpkg -P `cat kicklist`
dpkg -P `deborphan`
apt-get remove < package name >
apt-get install < package name >
apt-get update
apt-get upgrade
updatedb
depmod -a
sh knoppix.clean
If you suddenly lose the ablity to communicate with the apt-get resources, change the /etc/resolv.conf link to a regular text file using your ISP information. Example...
nameserver 100.100.200.3
This may happen often when working from Knoppix but it doesn't happen when using my Redhat install.
Run the command: dpkg -l > list.txt to make a list which you can check for those stubborn packages which have dependancies. If you are sure it won't be missed, you can use apt-get remove to get rid of it. Be careful about removing to much important stuff.
If you want to use another window manager such as fluxbox, you can edit the /etc/init.d/knoppix-autoconfig file. Look for the lines...
# Allow only supported windowmanager
#####the following is really one long string
case "DESKTOP" in gnome|kde|larswm|xfce|
windowmaker|wmaker|icewm|fluxbox|twm) ;; *)
DESKTOP="KDE"; ;; esac
I changed that to look like this..
# Allow only supported windowmanager
case "DESKTOP" in fluxbox) ;; *)
DESKTOP="FLUXBOX"; ;; esac
I changed the /etc/inittab to default to run level 3 ( command line )
# The default runlevel.
id:3:initdefault:
as many of the packages don't even need a window manager. If you do want to start the window manager, use the command: startx
When you get every thing set up the way you want it, you need to make the compressed image and make an iso from that. Then burn to a cd ( use a RW unless you are rich ).
Copy the boot.img and boot.cat files from the orig-cdrom /KNOPPIX directory to the newcd /KNOPPIX directory.
cd /mnt/build
mkisofs -R /mnt/build/source | create_compressed_fs - 65536 > /mnt/build/newcd/KNOPPIX/KNOPPIX
cd newcd
mkisofs -R -J -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -o ../mycd.iso .
#### that dot is needed in this case.
cd ..
cdrecord dev=0,0,0 blank=fast
cdrecord -v speed=4 dev=0,0,0 -data mycd.iso
I'll attempt to attach my kicklist and the knoppix.clean script