]> git.sur5r.net Git - bacula/rescue/commitdiff
removed unused scripts from knoppix/cdrom
authorKermorgant <grizzli@users.sourceforge.net>
Wed, 5 Apr 2006 11:43:18 +0000 (11:43 +0000)
committerKermorgant <grizzli@users.sourceforge.net>
Wed, 5 Apr 2006 11:43:18 +0000 (11:43 +0000)
FAQ : explains how to customize the iso

gestdiskinfo : added netmask to the start_network script and creation of tmp, proc and sys on demand

make_static_bacula : use of sed to modify the WorkingDirectory directive (use of /tmp while commenting out original value)

rescue/knoppix/.cvsignore [new file with mode: 0644]
rescue/knoppix/Makefile.in [new file with mode: 0644]
rescue/knoppix/cdrom/FAQ [new file with mode: 0644]
rescue/knoppix/cdrom/README
rescue/knoppix/cdrom/makebinaries [deleted file]
rescue/knoppix/cdrom/makecdimage [deleted file]
rescue/knoppix/cdrom/makeinitrd [deleted file]
rescue/knoppix/cdrom/makekernel [deleted file]

diff --git a/rescue/knoppix/.cvsignore b/rescue/knoppix/.cvsignore
new file mode 100644 (file)
index 0000000..ee40e78
--- /dev/null
@@ -0,0 +1,10 @@
+Makefile
+diskinfo
+format.hda
+mount_drives
+partition.hda
+sfdisk
+start_network
+1
+bacula-fd
+bacula-fd.conf
diff --git a/rescue/knoppix/Makefile.in b/rescue/knoppix/Makefile.in
new file mode 100644 (file)
index 0000000..f6b06c7
--- /dev/null
@@ -0,0 +1,13 @@
+
+all:
+
+install:
+
+uninstall:
+
+clean:
+       (cd cdrom; make clean)
+
+distclean:
+
+depend:
diff --git a/rescue/knoppix/cdrom/FAQ b/rescue/knoppix/cdrom/FAQ
new file mode 100644 (file)
index 0000000..25ed491
--- /dev/null
@@ -0,0 +1,45 @@
+Questions :
+* CAN I MODIFY THE BACULA-KNOPPIX ISO ?
+* HOW DO I MODIFY THE ISO ?
+* WHERE CAN I LEARN MORE ON REMASTERING KNOPPIX ?
+
+
+Answers :
+
+* CAN I MODIFY THE BACULA-KNOPPIX ISO ?
+ Yes. It should be very easy provided you know a bit about debian (apt-get, apt-cache, debian structure)
+
+
+
+* HOW DO I MODIFY THE ISO ?
+ If you have already built an iso, you should have a directory containing Knoppix's source (see cdrom/config file). 
+ If not, cd to knoppix/cdrom, edit 'config' file and type 'make environment'
+
+ Do the following :
+
+#  cd knoppix/cdrom
+# . config
+# chroot $REMASTER_PATH/source/KNOPPIX
+# mount -t proc /proc proc
+# apt-get update
+
+ Warning : Do not do an 'apt-get upgrade' 
+ Now, you can install packages with apt-get or edit config files.
+
+ When you have finished, do
+# umount /proc
+# exit
+if you have gathered all the client configurations under roottree (see README), do :
+# make knoppix
+
+
+* WHERE CAN I LEARN MORE ON REMASTERING KNOPPIX ?
+
+ The Remastering Howto :
+  http://www.knoppix.net/wiki/Knoppix_Remastering_Howto
+ The Remastering forum :
+  http://www.knoppix.net/forum/viewforum.php?f=2
+
+ HOWTO: Upgrading the kernel :
+  http://www.knoppix.net/forum/viewtopic.php?t=21145
index 4ec5e3b5e6d268cdefa2b4954782489a9d6f64ee..70550e1228a61c241cc3425bfd533263d6029e55 100644 (file)
@@ -1,6 +1,6 @@
 This folder knoppix/cdrom was created by Mikael Kermorgant <mikael.kermorgant@gmail.com> on Thu, 30 Mar 2006
 
 This folder knoppix/cdrom was created by Mikael Kermorgant <mikael.kermorgant@gmail.com> on Thu, 30 Mar 2006
 
-It contains scripts aimed at creating a bootable rescue cd based on knoppix (see http://www.knoppix.org). 
+It contains a modified copy of the linux/cdrom folder created by Kern Sibbald for the Bacula Rescue CD and scripts aimed at creating a bootable rescue cd based on knoppix (see http://www.knoppix.org). 
 The first aim I had when building this cd was to make rescue cds for the debian servers I backup with bacula, which I failed to do with the original rescue cd.
 
 Requirements:
 The first aim I had when building this cd was to make rescue cds for the debian servers I backup with bacula, which I failed to do with the original rescue cd.
 
 Requirements:
@@ -8,7 +8,7 @@ Requirements:
  - 1,5 Go space on hard drive
  - It should boot on any hardware that Knoppix can boot on
  - cloop-utils version > 2.0 (only on the machine you build the iso)
  - 1,5 Go space on hard drive
  - It should boot on any hardware that Knoppix can boot on
  - cloop-utils version > 2.0 (only on the machine you build the iso)
-
+ - already installed, configured and running bacula-fd (optional but helps having a working configuration on the cd)
 
 A - To build an ISO image for burning a CD, do the following :
 
 
 A - To build an ISO image for burning a CD, do the following :
 
@@ -47,4 +47,4 @@ B - Build an iso image for multiple clients
 
   Copy bacula-<hostname>.tar.gz on the machine you built the iso and extract it in bacula-rescue-<version>/knoppix/cdrom/roottree and execute :
 
 
   Copy bacula-<hostname>.tar.gz on the machine you built the iso and extract it in bacula-rescue-<version>/knoppix/cdrom/roottree and execute :
 
-  make knoppix
\ No newline at end of file
+  make knoppix
diff --git a/rescue/knoppix/cdrom/makebinaries b/rescue/knoppix/cdrom/makebinaries
deleted file mode 100644 (file)
index 97b6c06..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/sh
-
-# this script finds all binaries and updates them with the ones 
-# from your system, in order to maintain them more easily.
-# Be careful. If you have specially made binaries (perhaps lean ones),
-# they will be overwritten.
-
-TOPDIR=`pwd`
-R=roottree
-PATH="/sbin:/bin:/usr/sbin:/usr/bin:$PATH"
-
-
-# Cleanup and make necessary directories
-rm -rf $R/sbin
-mkdir -p $R/etc $R/initrd $R/lib $R/mnt $R/mnt/cdrom
-mkdir -p $R/proc $R/root $R/sbin $R/tmp $R/var 
-mkdir -p $R/dev $R/sys $R/initrd $R/sysroot
-mkdir -p $R/etc/terminfo $R/etc/terminfo/l
-mkdir -p $R/var/lib $R/var/log $R/var/run $R/var/state
-mkdir -p $R/var/lib/nfs 
-mkdir -p $R/var/log/news
-touch $R/var/log/news/news.crit $R/var/log/news/news.err $R/var/log/news.notice
-
-cd $R
-ln -sf sbin bin
-cd $TOPDIR
-
-#
-# Some users have a different shell for root, so be
-#  sure to add it to the rootsbin list. Note, the shell may
-#  be copied twice, but it is not worth the effort to run uniq
-#  here.
-#
-TMPFILE=`mktemp -t bin.XXXXXXXXXX`
-if [ $? !=  0 ]; then
-   echo "Could not make temp file"
-   exit 1
-fi
-cat rootsbin.list >${TMPFILE}
-command=`grep ^root: /etc/passwd | cut -d ':' -f 7`
-command=`basename $command`
-if [ x$command != "xbash" ] ; then
-   echo "roottree/sbin/$command" >>${TMPFILE}
-fi
-
-echo "Building root /sbin. Some Could not find messages are normal ..."
-for file in `cat ${TMPFILE}` ; do
-    command=`basename $file`
-    fullfile=`which $command 2> /dev/null`
-    if [ x$fullfile != x ] ; then
-#       echo "updating $command in roottree with $fullfile"
-        cp -fpd $fullfile $file
-        if [ $? != 0 ] ; then
-           echo "Update failed."
-           exit 1
-        fi
-        strip $file 2>/dev/null
-    else
-        echo "==== Could not find $command on your system ===="
-        rm -f $file
-    fi
-done
-rm -f ${TMPFILE}
-
-cd roottree/sbin
-ln -sf halt reboot
-# Eliminate recursive link
-rm -f sbin
-cd $TOPDIR
-
-# Copy all needed shared libraries
-echo "Building root shared libaries ..."
-rm -f `find roottree/lib/ -maxdepth 1 -type f 2>/dev/null`
-#
-# Statically linked binaries create an error
-# message from ldd, so we ignore those
-#
-for lib in `find roottree/sbin/ -type f -exec ldd {} \; | awk '{print $3}' | sort | uniq` ; do
-  if [ -e $lib ] ; then
-     cp -fp $lib roottree/lib/
-     if [ $? != 0 ] ; then
-        echo "Update failed."
-        exit 1
-     fi
-  fi
-done
-#
-# Wouldn't you know, there is one so that is critical to have or
-#  nothing will load on 2.6 kernels.
-#
-cp -fp /lib/ld-linux.so.* roottree/lib/
-strip `find roottree/lib/ -maxdepth 1 -type f` 2>/dev/null
-
-# Grub crap
-mkdir -p roottree/usr/share/grub
-cp -fpr /usr/share/grub/* roottree/usr/share/grub
-
-#
-# Get a bunch of stuff from /etc
-#
-echo "Building /etc ..."
-cp -p /etc/services roottree/etc/
-if [ $? != 0 ] ; then
-   echo "Update failed."
-   exit 1
-fi
-
-for file in `cat rootetc.list` ; do
-   if [ -e $file ] ; then
-      cp -fp $file roottree/etc/
-   else
-      echo "==== Could not find $file in /etc ===="
-   fi
-done
-if [ -e /etc/modules.conf ] ; then
-   cp -fp /etc/modules.conf roottree/etc/
-fi
-if [ -e /etc/modprobe.conf ] ; then
-   cp -fp /etc/modprobe.conf roottree/etc/
-fi
-rm -rf roottree/etc/pam.d
-if [ -e /etc/pam.d ] ; then
-   cp -a /etc/pam.d roottree/etc/
-   if [ -e /etc/pam.conf ] ; then
-      cp -fp /etc/pam.conf roottree/etc/
-   fi
-fi
-
-if [ -e /etc/init.d ] ; then
-   rm -rf roottree/etc/init.d
-   cp -aL /etc/init.d roottree/etc/
-fi
-
-if [ -e /etc/udev ] ; then
-   rm -rf roottree/etc/udev
-   cp -aL /etc/udev roottree/etc/
-fi
-
-
-if [ -e /etc/ssh ] ; then
-   cp -a /etc/ssh roottree/etc/
-   echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-   echo "!!!!                                             !!!!"
-   echo "!!!! Warning your /etc/ssh directory was copied. !!!!"
-   echo "!!!! Keep this directory and the CDROM secure.   !!!!"
-   echo "!!!!                                             !!!!"
-   echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-fi
-if [ -e /etc/security ] ; then
-  cp -a /etc/security roottree/etc/
-fi
-
-#
-# Pull a few files needed by PAM
-#
-if [ -f /lib/libnss_files.so.1 ] ; then
-  cp -fp /lib/libnss_files.so.1 roottree/lib/
-fi
-cp -fp /lib/libnss_files.so.* roottree/lib/
-cp -a /lib/security roottree/lib/
diff --git a/rescue/knoppix/cdrom/makecdimage b/rescue/knoppix/cdrom/makecdimage
deleted file mode 100644 (file)
index 7e1128d..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#! /bin/sh
-
-# This script makes a copy of an existing boot cd or iso on
-#   disk so that we can add the Bacula code to it for remastering
-#
-# When we are done if there is no error, we should have the
-#   cdrom image in cdimage
-#
-
-export LANG=C
-
-# Print Usage message
-usage () {
-   cat <<END_OF_DATA
-Usage: make_rescue_disk
-  -h, --help             print this message
-  --type=cdrom|iso       start with a cdrom or iso image
-  --where=path           the path to the device (mounted) or the iso
-END_OF_DATA
-}
-
-if [ ! `whoami` = "root" ] ; then
-  echo ""
-  echo "You need to be root to run this, otherwise"
-  echo "I cannot mount the loopback. Continuing anyway ..."
-  echo ""
-fi
-
-
-#
-# Process command line options
-#
-for option in "$@" ; do
-   case "$option" in
-   -h | --help)
-      usage
-      exit 0
-      ;;
-   --type=cdrom)
-      type=cdrom
-      ;;
-   --type=iso)
-      type=iso
-      ;;
-   --where*)
-      where=`echo "$option"|cut -c 9-`
-      ;;
-   *)
-      echo "Unknown option specified: $option"
-      usage
-      exit 1
-      ;;
-   esac
-done
-
-if [ x$type == x ] ; then
-   echo " "
-   echo "You can make the rescue disk either from a mounted CDROM or"
-   echo "from a .iso image. Please enter cdrom or iso:"
-   read type   
-   if [ $type == 'cdrom' ] ; then 
-      echo "OK want mounted CDROM"
-   elif [ $type == 'iso' ] ; then
-      echo "OK want iso image"
-   else
-      echo "Type missing"
-      exit 1
-   fi
-fi
-if [ x$where == x ] ; then
-   echo " "
-   echo "Enter location of image e.g. /mnt/cdrom or /home/src/.../rescue.iso"
-   read where
-fi
-if [ ! -e $where ]; then
-   echo "Cannot find rescue image $where"
-    exit 1
-fi
-if [ $type == iso ]; then
-  rm -rf mnt
-  mkdir mnt
-  mount -o loop $where mnt
-  if [ $? != 0 ] ; then
-    echo "Mount failed."
-    rm -rf mnt
-    exit 1;
-  fi
-  rm -rf cdimage
-  mkdir cdimage
-  cp -a mnt/* cdimage/
-  if [ $? != 0 ] ; then
-    echo "Copy from iso to cdimage failed"
-    unmount mnt
-    rm -rf mnt cdimage
-    exit 1;
-  fi
-  unmount mnt
-  rm -rf mnt
-fi
-if [ $type == cdrom ] ; then
-  rm -rf cdimage
-  mkdir cdimage
-  cp -a $where/* cdimage
-  if [ $? != 0 ] ; then
-    echo "Copy from cdrom to cdimage failed"
-    rm -rf cdimage
-    exit 1;
-  fi
-fi
-#
diff --git a/rescue/knoppix/cdrom/makeinitrd b/rescue/knoppix/cdrom/makeinitrd
deleted file mode 100644 (file)
index e543af8..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh
-
-TOPDIR=`pwd`
-
-LOOP2=/tmp/bacula_rescue_loop2
-rm -rf $LOOP2
-mkdir -p $LOOP2
-
-# Assume that everything to be loaded into memory with the
-# RAM disk image (initrd) is is in the roottree directory. 
-
-echo "Creating the Initial RAM disk image.... "
-
-# first find out how much space we need. 
-ISIZE=`du -s -k  roottree/ | awk '{print $1}'`
-
-# add 2 Meg for extra   
-ISIZE=`expr $ISIZE + 2048`
-echo "Initial RAM disk contents will be $ISIZE KB"
-
-# delete the existing RAM disk image, if there is one
-rm -f root
-
-dd if=/dev/zero of=$TOPDIR/root bs=1k count=$ISIZE
-
-# cleanup any prior left over stuff
-umount $LOOP2  2>/dev/null >/dev/null
-losetup -d /dev/loop2 2>/dev/null >/dev/null
-
-# associate it with /dev/loop2
-losetup /dev/loop2 $TOPDIR/root
-
-# make an ext2 filesystem on it. Set reserve to 0
-mke2fs -q -m 0 /dev/loop2 $ISIZE
-if [ $? != 0 ] ; then
-  echo "Build failed."
-  exit 1
-fi
-
-# we mount it...
-mount /dev/loop2 $LOOP2
-# ... and delete the lost+found directory 
-rm -rf $LOOP2/lost+found 
-
-# then we copy the contents of our roottree to this filesystem
-cp -dpR roottree/* $LOOP2/
-cprtn=$?
-
-# and unmount and divorce /dev/loop2
-umount $LOOP2
-losetup -d /dev/loop2 
-rm -rf $LOOP2
-
-# If above copy failed, bail out
-if [ $cprtn != 0 ] ; then
-  echo "RAM disk build failed."
-  exit 1
-fi
-
-# This is a newer way of creating a ramfs, which we don't use
-# (cd roottree; find . | cpio --quiet -c -o) >root
-
-echo "Building initial RAM disk done"
-
-# Now we have the image of the RAM disk in $TOPDIR/loopfiles/root. We
-# compress this one and write the compressed image to the boot tree:
-
-echo "Compressing the RAM disk image.... "
-
-# delete any existing one
-rm -f cdtree/boot/isolinux/initrd.img
-
-# and gzip our RAM disk image and put it in the right place.
-gzip -9 -c root >cdtree/boot/isolinux/initrd.img
-if [ $? != 0 ] ; then
-  echo "Build failed"
-  exit 1
-fi
-
-rdsize=`expr $ISIZE \* 1024`
-echo "Ramdisk size is $rdsize"
-
-echo "Making isolinux.cfg"
-cat >cdtree/boot/isolinux/isolinux.cfg <<END_OF_DATA
-default linux
-prompt 1
-display boot.msg
-timeout 300
-F1 boot.msg
-F2 options.msg
-F3 general.msg
-F4 kernel.msg
-label linux
-  kernel vmlinuz
-  append ramdisk_size=$rdsize initrd=initrd.img
-label memtest86
-  kernel memtest
-  append -
-END_OF_DATA
-
-# we are done with the RAM disk image, delete it
-rm -f root
-
-echo "Initial RAM disk initrd.img is built."
diff --git a/rescue/knoppix/cdrom/makekernel b/rescue/knoppix/cdrom/makekernel
deleted file mode 100644 (file)
index 9e3600f..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/sh
-
-# This script updates the kernel and modules from your
-#   current system. 
-#
-
-TOPDIR=`pwd`
-KERNEL=$1
-if test x${KERNEL} = x ; then
-   KERNEL=`uname -r` 
-fi
-
-rm -rf roottree/dev
-tar xfz dev.tar.gz -C roottree
-if [ $? != 0 ] ; then
-   echo "Update failed."
-   exit 1
-fi
-
-#
-# Update modules in root RAM disk
-#  Keep kernel directory structure
-#
-echo "Updating modules in root RAM disk"
-rm -rf roottree/lib/modules
-mkdir -p roottree/lib/modules
-cp -af /lib/modules/$KERNEL/ roottree/lib/modules/
-
-# clean up just a bit removing stuff we do not support
-rm -rf roottree/lib/modules/$KERNEL/build
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/bluetooth
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/pcmcia
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/usb
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/video
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/isdn
-rm -rf roottree/lib/modules/$KERNEL/kernel/sound
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/sound
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/crypto
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/net/wireless
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/net/appletalk
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/net/tokenring
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/net/irda
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/media
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/infiniband
-rm -rf roottree/lib/modules/$KERNEL/kernel/drivers/crypto
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/appletalk
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/bluetooth
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/ipv6
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/irda
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/atm
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/bridge
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/sunrpc
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/wanrouter
-rm -rf roottree/lib/modules/$KERNEL/kernel/net/tux
-
-
-
-kernel="/boot/vmlinuz-$KERNEL"
-echo "Coping $kernel to $TOPDIR/cdtree/boot/isolinux/vmlinuz"
-cp -f $kernel $TOPDIR/cdtree/boot/isolinux/vmlinuz
-if [ $? != 0 ] ; then
-   echo "Could not find kernel. Update failed."
-   exit 1
-fi
-if [ -e /boot/map ] ; then
-   cp -f /boot/map $TOPDIR/cdtree/boot/isolinux/map
-   if [ $? != 0 ] ; then
-      echo "Update failed."
-      exit 1
-   fi
-fi