1 |
#! /bin/bash -x |
2 |
|
3 |
# original script found at http://www.geocities.com/ted_johnson2/knoppix.txt |
4 |
# Set up filesystem mount points. |
5 |
# /dev/hda1 is swap of 4096MB |
6 |
# /dev/hda2 is ext2 fs of 4096MB |
7 |
# /dev/hda3 is ext2 fs of 8192MB |
8 |
# |
9 |
# All of these need to be created ahead of time |
10 |
# or edit the lines below to adjust to your FS |
11 |
# layout. Do not run this until you resolve all the |
12 |
# fs layout settings. You have been warned. |
13 |
|
14 |
SWAP=/dev/hdc1; export SWAP |
15 |
SOURCE=/dev/hdc2; export SOURCE |
16 |
DEST=/dev/hdc3; export DEST |
17 |
|
18 |
umount $SOURCE |
19 |
umount $DEST |
20 |
|
21 |
mke2fs $SOURCE |
22 |
mke2fs $DEST |
23 |
|
24 |
mkswap $SWAP |
25 |
swapon $SWAP |
26 |
|
27 |
rm -rf /mnt/source |
28 |
rm -rf /mnt/master |
29 |
|
30 |
mkdir /mnt/source |
31 |
mount $SOURCE /mnt/source |
32 |
|
33 |
mkdir /mnt/master |
34 |
mount $DEST /mnt/master |
35 |
|
36 |
mkdir /mnt/source/KNOPPIX/ |
37 |
|
38 |
# Begin copying the disk to the work directory. |
39 |
|
40 |
cp -Rp /KNOPPIX/* /mnt/source/KNOPPIX/ |
41 |
cp -Rp /cdrom/* /mnt/master/ |
42 |
|
43 |
# If you changed the desktop to something more usable than the |
44 |
# HORRIBLE default settings, your new settings will be copied. |
45 |
|
46 |
#cp -Rp /home/knoppix/* /mnt/source/KNOPPIX/etc/skel/ |
47 |
#cp -Rp /home/knoppix/.kde/* /mnt/source/KNOPPIX/etc/skel/ |
48 |
#cp -Rp /home/knoppix/.kde/share/* /mnt/source/KNOPPIX/etc/skel/.kde/share/ |
49 |
|
50 |
# Remove some stuff. |
51 |
|
52 |
rm /mnt/master/KNOPPIX/KNOPPIX |
53 |
rm /mnt/master/KNOPPIX/boot.cat |
54 |
|
55 |
# stop here so I can configure the system files that were on the read |
56 |
# only fs - now they are in /mnt/source/KNOPPIX |
57 |
|
58 |
echo "Going to chroot now. Press Ctrl-d to exit." |
59 |
echo "Run |
60 |
mount -t proc /proc proc also |
61 |
vi /etc/resolv.conf and /etc/apt/sources.list (if u want to add local mirrors) then do |
62 |
apt-get update etc..." |
63 |
|
64 |
chroot /mnt/source/KNOPPIX |
65 |
#echo "Go fix stuff." |
66 |
exit 0 |