[sanniolug] [Massimiliano Mirra] [debian-knoppix] [HOWTO] Customized Knoppixfrom HD

  • From: Massimiliano Mirra <mmirra@xxxxxxxxx>
  • To: sanniolug@xxxxxxxxxxxxx
  • Date: Sun, 17 Aug 2003 03:06:35 +0200

Se serve chiarimento su qualche punto, chiedete pure.  Non chiedetemi
di tradurlo integralmente...

--- Begin Message ---
  • From: Massimiliano Mirra <mmirra@xxxxxxxxx>
  • To: debian-knoppix@xxxxxxxxxxxx
  • Date: Sat, 16 Aug 2003 23:23:15 +0200
This is for those who customize Knoppix and would like to try out the
results without burning a CD and without making a compressed
filesystem.

One way was described by Fabian Franz some time ago in a post titled
`How to boot a chroot directory'.

Another way is one I found by chance today and does not involve
chrooting, nor the hard disk dump is modified, it is just like running
from CD.  If a hard disk partition has a KNOPPIX/ directory in its top
level, linuxrc detects it as a Knoppix container; if the cloop
mounting stage in linuxrc is skipped (by commenting it out or not
creating the cloop at all) and bin/, sbin/ etc. exist under KNOPPIX/,
It Just Runs (tm).  Partition is kept read only.

Anyway, here is it the procedure:


- Choose a partition of about 2.5 gigabytes that will be devoted to
  the operation, as we will need to be in the top level.  (This might
  be circumvented by using some softlinks, haven't tried.)  I'll
  assume this partition will be mounted under /knoppix.

- Create a /knoppix/KNOPPIX and a /knoppix/KNOPPIX/dump directory.

- Dump Knoppix contents onto /knoppix/KNOPPIX/dump. [1]

- Copy miniroot.gz into /knoppix/KNOPPIX/. [2]

- Mount miniroot.gz and comment these lines in linuxrc: [3]

  #  if test -n "$FOUND_KNOPPIX" -a -f /cdrom/KNOPPIX/KNOPPIX; then
  #  # DEBUG
  #  # echo "6" > /proc/sys/kernel/printk
  #  insmod -f /modules/cloop.o file=/cdrom/KNOPPIX/KNOPPIX
  #  mountit /dev/cloop /KNOPPIX "-o ro" || FOUND_KNOPPIX=""
  #  fi

- While in /knoppix/KNOPPIX/, create softlinks to the bin, boot, etc,
  lib, opt, sbin, usr, var directories of the dumped Knoppix. [4]

- Add this stanza to /etc/lilo.conf:

  image=/knoppix/KNOPPIX/dump/boot/vmlinuz-2.4.20-xfs
        label=knoppix
        append="ramdisk_size=100000 init=/etc/init lang=us apm=power-off 
hda=scsi hdb=scsi hdc=scsi hdd=scsi vga=791 nomce quiet"
        initrd=/knoppix/KNOPPIX/miniroot.gz
        read-only

- Run LILO.  Reboot.


*** Details:

[1]

mount /cdrom
mknod /dev/cloop b 240 0
insmod cloop file=/cdrom/KNOPPIX/KNOPPIX
mount -t iso9660 /dev/cloop /mnt -oro
rsync -av /mnt/ /knoppix/KNOPPIX/dump/ # trailing slash in /mnt/ is critical!
umount /mnt
rmmod cloop

[2]

mount /cdrom/KNOPPIX/boot.img /mnt -oloop
cp /mnt/miniroot.gz /knoppix/KNOPPIX
umount /mnt

[3]

gunzip /knoppix/KNOPPIX/miniroot.gz
mount /konppix/KNOPPIX/miniroot /mnt -oloop
vi /mnt/linuxrc
...modify the content...
umount /mnt
gzip /knoppix/KNOPPIX/miniroot

[4]

cd /knoppix/KNOPPIX
ln -s dump/bin dump/boot dump/etc dump/lib dump/opt dump/sbin dump/usr dump/var 
.

_______________________________________________
debian-knoppix mailing list
debian-knoppix@xxxxxxxxxxxx
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix


--- End Message ---

Other related posts:

  • » [sanniolug] [Massimiliano Mirra] [debian-knoppix] [HOWTO] Customized Knoppixfrom HD