Difference between revisions of "Debootstrap to LiveCD"
From Knoppix Documentation Wiki
(→Script) |
(→Preamble) |
||
Line 2: | Line 2: | ||
So far I have created a script to boot from Knoppix, then debootstrap and create a new livecd without using Knoppix as a base. | So far I have created a script to boot from Knoppix, then debootstrap and create a new livecd without using Knoppix as a base. | ||
− | Reason for this many scripts are still being copied from the Knoppix disk. The idea of this method is to create a fresh-from-scratch Knoppix. | + | Reason for this many scripts are still being copied from the Knoppix disk. |
+ | |||
+ | The idea of this method is to create a fresh-from-scratch Knoppix. | ||
This in time will be further simplified to debootstrap to livecd. | This in time will be further simplified to debootstrap to livecd. | ||
+ | |||
+ | Some keypoints | ||
+ | *Not all knoppix packages are listed in the KNOPPIX_PACKAGES variable, some packages are coppied automatically further in the script such as copying files from /etc, /lib/modules/* and so on. | ||
+ | *This was done using Knoppix V5.02 Live CD. | ||
==Script== | ==Script== |
Revision as of 05:51, 25 June 2006
Preamble
So far I have created a script to boot from Knoppix, then debootstrap and create a new livecd without using Knoppix as a base. Reason for this many scripts are still being copied from the Knoppix disk.
The idea of this method is to create a fresh-from-scratch Knoppix. This in time will be further simplified to debootstrap to livecd.
Some keypoints
- Not all knoppix packages are listed in the KNOPPIX_PACKAGES variable, some packages are coppied automatically further in the script such as copying files from /etc, /lib/modules/* and so on.
- This was done using Knoppix V5.02 Live CD.
Script
#!/bin/bash SOURCEDIR=/mnt/hda1/source MASTERDIR=/mnt/hda1/master mkdir ${SOURCEDIR}/KNOPPIX mkdir ${MASTERDIR}/KNOPPIX cd /cdrom && find . -size -10000k -type f -exec cp -p --parents '{}' ${MASTERDIR} \; debootstrap --arch i386 sid ${SOURCEDIR}/KNOPPIX http://http.us.debian.org/debian KNOPPIX_PACKAGES="\ ash-knoppix-26 \ hwsetup \ udev \ pump \ modutils \ module-init-tools \ linux-image-2.6.17 \ loop-aes-module-2.6.17 \ madwifi-modules-2.6.17 \ ndiswrapper-modules-2.6.17 \ rt2x00-modules-2.6.17 \ unionfs-knoppix-modules-2.6.17 \ zr364xx-modules-2.6.17 \ zydas-modules-2.6.17 \ linux-image-2.6.17 \ linux-kernel-headers-knoppix \ linux-sound-base \ gawk \ dhcp3-common \ console-tools \ console-data \ console-common \ pciutils" for PACKAGE in ${KNOPPIX_PACKAGES}; { for ITEM in `dpkg --listfiles ${PACKAGE} | grep -v "\.$" | grep -v "divert"`; { if [ -d ${ITEM} ]; then mkdir -p ${SOURCEDIR}/KNOPPIX${ITEM}; else cp -ax ${ITEM} ${SOURCEDIR}/KNOPPIX${ITEM}; fi; }; }; cd ${SOURCEDIR}/KNOPPIX/etc && rm -rf init* rc* passwd* group* shadow* hotplug sysconfig modu* cd /KNOPPIX cp -ax init* rc* passwd* group* shadow* hotplug sysconfig modu* ${SOURCEDIR}/KNOPPIX/etc/. rm -rf ${SOURCEDIR}/KNOPPIX/dev cp -ax /KNOPPIX/dev ${SOURCEDIR}/KNOPPIX/. cp -ax /KNOPPIX/lib/modules/* ${SOURCEDIR}/KNOPPIX/lib/modules/. cp -ax /KNOPPIX/lib/linux-sound-base ${SOURCEDIR}/KNOPPIX/lib/. cp -ax /KNOPPIX/usr/src/* ${SOURCEDIR}/KNOPPIX/usr/src/. mkdir ${SOURCEDIR}/KNOPPIX/cdrom mkdir ${SOURCEDIR}/KNOPPIX/floppy mkdir ${SOURCEDIR}/KNOPPIX/dvb cp -ax /KNOPPIX/vmlinuz ${SOURCEDIR}/KNOPPIX/. cp -ax /KNOPPIX/tftpboot ${SOURCEDIR}/KNOPPIX/.
mkisofs -R -U -V "Knoppix" -publisher "SNIaKNOPPIX" -hide-rr-moved -cache-inodes -no-bak -pad ${SOURCEDIR}/KNOPPIX/ | nice -5 /usr/bin/create_compressed_fs - 65536 > /mnt/hda1/master/KNOPPIX/KNOPPIX
mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o knoppix.iso master/