Difference between revisions of "Debootstrap to LiveCD"


From Knoppix Documentation Wiki
Jump to: navigation, search
(Pretense)
(Begin)
Line 8: Line 8:
 
*In this example I used the knoppix 4.1 iso as the host.
 
*In this example I used the knoppix 4.1 iso as the host.
  
=Begin=
+
==Begin==
 
First create a working directory, in this examle we will use <code>/mnt/hda1/source/KNOPPIX</code>
 
First create a working directory, in this examle we will use <code>/mnt/hda1/source/KNOPPIX</code>
 
*choose a mirror of your choice: http://www.debian.org/mirror/list
 
*choose a mirror of your choice: http://www.debian.org/mirror/list

Revision as of 23:51, 5 June 2006


This HOW-TO is to create a Live CD using the Debian debootstrap utility to install your base, and then to further work towards a complete LiveCD of your preference.

Pretense

It is assumed that you have the understanding:

  • How to use vi, how to use the bash shell
  • In this example I used the knoppix 4.1 iso as the host.

Begin

First create a working directory, in this examle we will use /mnt/hda1/source/KNOPPIX

  • choose a mirror of your choice: http://www.debian.org/mirror/list
  • Also choose a release of your choice, either stable, testing, or unstable.
  • Choose the binary type, i386 or x86-64, power pc, etc.

In this example I have chosen my mirror to be ftp://ftp.egr.msu.edu/debian and I have chosen my release to be stable to run debootstrap

debootstrap --arch i386 sarge /mnt/hda1/source/KNOPPIX ftp://ftp.egr.msu.edu/debian

next you will want to mount your proc directory

Mount Proc

Mount the proc directory as follows:

mount proc -t proc /mnt/hda1/source/KNOPPIX/proc

Setup Networking

cp /etc/resolv.conf /mnt/hda1/source/KNOPPIX/etc/resolv.conf
cp /etc/hosts /mnt/hda1/source/KNOPPIX/etc/hosts
cp /etc/hostname /mnt/hda1/source/KNOPPIX/etc/hostname

CHROOT

chroot /mnt/hda1/source/KNOPPIX/ /usr/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login

reconfigure console

dpkg-reconfigure console-data

MAKEDEV

run makedev cd /dev

./MAKEDEV generic

BASE CONFIG

base-config

stay tuned

SNIa 03:07, 5 Jun 2006 (GMT)


work in progress, not yet refined

apt-get install hotplug hotplug-utils gawk

from the knoppix disc method

There is also a number of rc scripts

proper method

Since The mirrors I have to obtain the knoppix scripts are incorrect, i'm using dpkg --listfiles to see which files are a part of the knoppix scripts, and importing them by hand. :( Hopefully by weeks end I will have a beta knoppix from debootstrap complete. SNIa 04:19, 5 Jun 2006 (GMT)


Install knoppix scripts

apt-get install hotplug-knoppix knoppix-customize \
 linux-kernel-headers-knoppix networkconfig-knoppix \
 rebuildfstab-knoppix saveconfig-knoppix \
 scanpartitions-knoppix sysvinit-knoppix user-profile-knoppix

ENTIRE SCRIPT

#!/bin/bash
SOURCEDIR=/mnt/hda1/source
MASTERDIR=/mnt/hda1/master

mkdir ${SOURCEDIR}/KNOPPIX
debootstrap --arch i386 sarge /mnt/hda1/source/KNOPPIX ftp://ftp.egr.msu.edu/debian
mount proc -t proc ${SOURCEDIR}/KNOPPIX/proc

chroot ${SOURCEDIR}/KNOPPIX/ /usr/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login

Once Loged into chroot

dpkg-reconfigure console-data
cd /dev
./MAKEDEV generic
base-config
apt-get install hotplug hotplug-utils gawk


outside of chroot

knoppixfiles = "sysvinit-knoppix rebuildfstab-knoppix knoppix-setrootpassword \
hotplug-knoppix unionfs-knoppix-modules-2.6.12 automount-knoppix etcskel-knoppix \
hwdata-knoppix knoppix-remountrw knoppix-splash knoppix-splash-utils \
kudzu-knoppix-dev kudzu-knoppix-vesa libntfs5-knoppix linux-kernel-headers-knoppix \
rebuildfstab-knoppix rootshel-knoppix saveconfig-knoppix sambastart-knoppix \
scanpartitions-knoppix sshstart-knoppix sudoers-knoppix user-profile-knoppix usleep-knoppix"
 for package in knoppixfiles; { \
  for item in `dpkg --listfiles ${package}`; 
    { 
    if [ -d ${item} ];
    then 
      mkdir -p ${SOURCEDIR}/KNOPPIX/${item}; 
    else 
      cp -ax $i ${SOURCEDIR}/KNOPPIX/${item}; 
    fi; 
    };
};