[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-knoppix] [ANNOUNCE] how to knoppise a debian-woody-bootstrap & idea for booting a chroot knoppix!



Hi,

after I yesterday said that this was sooo easy to achieve and actually it was 
not difficult either ... 

... thx to the "new" knoppix repository: 

# Knoppix
deb http://developer.linuxtag.net/knoppix/ ./
deb-src http://developer.linuxtag.net/knoppix/ ./

Ok, I bootstrapped a woody, chrooted into the directory 
(/home/knoppix/newroot)

and tried to install all packages. Here is the list of the packages without 
problems:

automount-knoppix checkmem cloop-module cloop-src cloop configure-xawtv 
cupsconfig-knoppix etcskel-knoppix fonts-ttf-decoratives 
fonts-ttf-west-european hotplug-knoppix hwdata-knoppix k3b-defaults kbdconfig 
kde-update-menu-knoppix kdelock-knoppix kdeservicemenus-knoppix 
kernel-image-2.4.20-xfs keyboard-tr-knoppix knoppix-bookmarks-nl 
knoppix-bookmarks etcskel-knoppix knoppix-graphics knoppix-menu 
knoppix-remountrw knoppix-setpassword knoppix-sounds knoppix-terminalserver 
knx-flashplugin krecord loop-aes mkdesktophdicons-knoppix 
mkdosswapfile-knoppix mkmenusfromkde-knoppix mknbi mkpersistenthome-knoppix 
mount-aes mouseconfig netcardconfig-knoppix netpipes networkconfig-knoppix 
orinoco playvideodisk-knoppix ppp-scripts-knoppix rebuildfstab-knoppix 
rootshell-knoppix saveconfig-knoppix scanpartitions-knoppix sitar 
sndconfig-knoppix soundcardconfig-knoppix sshstart-knoppix 
startnessus-knoppix sudoers-knoppix sysvinit testdisk user-profile-knoppix 
wlcardconfig-knoppix xf86config-knoppix xsession-initscript-knoppix 
xsession-knoppix hwdata-knoppix xf86config-knoppix cloop-module cloop-src 
etcskel-knoppix hwdata-knoppix knoppix-graphics loop-aes user-profile-knoppix 
sysvinit user-profile-knoppix xsession-knoppix

Next need to be recompiled: (glibc 2_2 in woody and glibc2_3 in 
testing/unstable):

ash-knoppix
cloop-utils [OK]
dd-rescue [OK]
ddcxinfo-knoppix [OK]
genliloconf [OK]
hwsetup [OK, but need patch]
imaze
isdn-config
knoppix-customize
knx-alsa
linux-wlan-ng [???]
qtparted
scribus
syslinux-knoppix [ NOP, problems with old version of nasm (could recompile 
nasm, then package, but did not try) ]
usleep-knoppix [OK]
linux-wlan-ng-modules-2.4.20-xfs [???]

Those with OK did compile without problems. I could upload those backported to 
somewhere ...

Those with nothing behind I did not try, because I had not enough time and 
space ...

for knx-alsa and wlan I did just copy the kernel from another knoppix 
installation, but I think its also possible with just installing all the 
packages ... :-)

hwsetup needed just a patch, because of an old libkudzu in stable ... (Its 
trivial and attached)

Problematic:

knoppix-hdinstall knoppix-bookmarks-ct

knoppix-hdinstall cannot be installed, because it has an dependancy to 
genliloconf 0.1-3, but only 0.1-2 is available in knoppix repository ...

knoppix-bookmarks-ct does conflict with knoppix-bookmarks-nl ... :-)) (ok, but 
its not important)

Too big:

openoffice-de-en

I didn't want to install that package ... Especially, because its also 
availabe in debian directly ...

Need-Extra:

dialog xdialog (xserver-xfree86) ...

What I find problematic and what should be either fixed in all packages or 
just in one meta-package to bootstrap knoppix are the dependancies.

Especially shell-scripts have many dependencies that are not in the Deps-field 
(Just count all programs executed)

Perhaps a deb-helper should be written ... (Try to find out all executed 
commands and see if there is a binary in PATH, if there is then find out in 
to which package this belongs and add it to Dependencies, should not be so 
difficult)

dialog was btw. never mentioned in any dependancy ...

And I still have problems to find the fonts that "twm" needs ...

- adduser knoppix
- Add / to /etc/fstab ... :-)

Hi,

after I yesterday said that this was sooo easy to achieve and actually it was 
not difficult either ... 

... thx to the "new" knoppix repository: 

# Knoppix
deb http://developer.linuxtag.net/knoppix/ ./
deb-src http://developer.linuxtag.net/knoppix/ ./

Ok, I bootstrapped a woody, chrooted into the directory 
(/home/knoppix/newroot)

and tried to install all packages. Here is the list of the packages without 
problems:

automount-knoppix checkmem cloop-module cloop-src cloop configure-xawtv 
cupsconfig-knoppix etcskel-knoppix fonts-ttf-decoratives 
fonts-ttf-west-european hotplug-knoppix hwdata-knoppix k3b-defaults kbdconfig 
kde-update-menu-knoppix kdelock-knoppix kdeservicemenus-knoppix 
kernel-image-2.4.20-xfs keyboard-tr-knoppix knoppix-bookmarks-nl 
knoppix-bookmarks etcskel-knoppix knoppix-graphics knoppix-menu 
knoppix-remountrw knoppix-setpassword knoppix-sounds knoppix-terminalserver 
knx-flashplugin krecord loop-aes mkdesktophdicons-knoppix 
mkdosswapfile-knoppix mkmenusfromkde-knoppix mknbi mkpersistenthome-knoppix 
mount-aes mouseconfig netcardconfig-knoppix netpipes networkconfig-knoppix 
orinoco playvideodisk-knoppix ppp-scripts-knoppix rebuildfstab-knoppix 
rootshell-knoppix saveconfig-knoppix scanpartitions-knoppix sitar 
sndconfig-knoppix soundcardconfig-knoppix sshstart-knoppix 
startnessus-knoppix sudoers-knoppix sysvinit testdisk user-profile-knoppix 
wlcardconfig-knoppix xf86config-knoppix xsession-initscript-knoppix 
xsession-knoppix hwdata-knoppix xf86config-knoppix cloop-module cloop-src 
etcskel-knoppix hwdata-knoppix knoppix-graphics loop-aes user-profile-knoppix 
sysvinit user-profile-knoppix xsession-knoppix

Next need to be recompiled: (glibc 2_2 in woody and glibc2_3 in 
testing/unstable):

ash-knoppix
cloop-utils [OK]
dd-rescue [OK]
ddcxinfo-knoppix [OK]
genliloconf [OK]
hwsetup [OK, but need patch]
imaze
isdn-config
knoppix-customize
knx-alsa
linux-wlan-ng [???]
qtparted
scribus
syslinux-knoppix [ NOP, problems with old version of nasm (could recompile 
nasm, then package, but did not try) ]
usleep-knoppix [OK]
linux-wlan-ng-modules-2.4.20-xfs [???]

Those with OK did compile without problems. I could upload those backported to 
somewhere ...

Those with nothing behind I did not try, because I had not enough time and 
space ...

for knx-alsa and wlan I did just copy the kernel from another knoppix 
installation, but I think its also possible with just installing all the 
packages ... :-)

hwsetup needed just a patch, because of an old libkudzu in stable ... (Its 
trivial and attached)

Problematic:

knoppix-hdinstall knoppix-bookmarks-ct

knoppix-hdinstall cannot be installed, because it has an dependancy to 
genliloconf 0.1-3, but only 0.1-2 is available in knoppix repository ...

knoppix-bookmarks-ct does conflict with knoppix-bookmarks-nl ... :-)) (ok, but 
its not important)

Too big:

openoffice-de-en

I didn't want to install that package ... Especially, because its also 
availabe in debian directly ...

Need-Extra:

hotplug (!) dialog xdialog (xserver-xfree86) ...

What I find problematic and what should be either fixed in all packages or 
just in one meta-package to bootstrap knoppix are the dependancies.

Especially shell-scripts have many dependencies that are not in the Deps-field 
(Just count all programs executed)

Perhaps a deb-helper should be written ... (Try to find out all executed 
commands and see if there is a binary in PATH, if there is then find out in 
to which package this belongs and add it to Dependencies, should not be so 
difficult)

dialog was btw. never mentioned in any dependancy ...

sudoers-knoppix did not have sudo as dependancy ... :-/

And I still have problems to find the fonts that "twm" needs ...

- adduser knoppix
- Add / to /etc/fstab ... :-)
- Remove all links except /etc/rcS.d/S00knoppix-autoconfig, and in 0,1,2,3,4,6 
K10xsession. Also S99halt-knoppix and S99reboot-knoppix in 0 and 6. (See 
running knoppix)

The hw-detection did work ok and as expected. (After I installed hotplug, 
hotplug-knoppix needs to be fixed to have a dependancy on that)

(Btw. in sources.list I only had the stable+security sources)

So I installed XFree 4.1 to test the XServer ...

There was a problem with xinitrc, which had not permission 755. (Dunno, if 
debian or knoppix problem; just mentioning, as some other could have the same 
problem)

And I needed to add to /etc/X11/Xsession.d/45xsession a the beginning:

set +e (As xsession sets set -e and there "will" be errors in 45xsession)

I vote for 45xsession to be modularised :-) btw.

Also the /etc/profile did make errors when sourced in 45xsession and there 
where some files not in /etc/skel (especially .lynx* even after I installed 
lynx, did I oversee something ???) and /usr/share/profile/knoppix or similar 
...

But set +e did solve this ...


Then I needed to find a window-manager and I didn't want to install kde2/kde3 
...

So I installed twm, which had problems with its configuration, as I didn't had 
adobe-helvetica installed (Anyone know, which package this is ?)

And I forgot to install ogg123 (should be in dependancy to knoppix-sounds) ...

What could be especially interesting to everyone here is how I booted the with 
chroot installed debian/knoppix as I did have no other partition free ...

As I mentioned earlier I had it iunstalled in /home/knoppix/newroot (So I 
already had an installed knoppix as host-system)

Then I did create a initrd with debian's mkinitrd ... (People which use 
knx-alsa must be careful here and later change the modules.dep (!))

(Make sure dash is installed!!!)

Debian's mkinitrd has a small linuxrc and then a "bigger" 
/sbin/init-Shellscript, from which it gives control to the "real" init ...

I did loop-mount it and copy it to a also loop-mounted ext2fs-file ... (Needs 
to be big enough though)

Then I did change the modules.dep and removed all alsa-specific things ...

And then I did change the /mnt/sbin/init:

from:

if type chroot > /dev/null 2>&1; then
        exec chroot . $init "$@" < dev/console > dev/console 2>&1
fi

to:

if type chroot > /dev/null 2>&1; then
        #exec chroot . $init "$@" < dev/console > dev/console 2>&1
        echo "Starting Fabian's Hack ..." > /dev/console
        mount -o remount,rw / # needs to be rw
        exec chroot /home/knoppix/newroot $init "$@" < dev/console > 
dev/console 2>&1
fi

Especially note that / is mounted read-write, before the guest-system is 
booted and that such there are problems to remount it in the guest-system and 
to unmount it at the end...

So I did always use the MAGIC-SYSRQ-Key before shutting down the Guest system 
...

Alt-Gr+Print+Q for help
Alt-Gr+Print+U for emergency remount ro
Alt-Gr+Print+S for emergency sync
[...]

So its only a hack and not an easy one either, but it was the only possibility 
for me, that I know of, (except bochs or vmware) to boot an system that is 
not in / of the partition ...

Before the beginning I thought it would be possible to pivot_root in such a 
directory, but its not ... :-/

Perhaps and I'll try that soon, its possible to mount the hd to /mnt2, then to 
dir-mount /mnt2/home/knoppix/newroot to /mnt and the pivot_root into /mnt ... 
:-))

But we'll see :-))

I hope the informations in this article are interesting for you ...

Especially the debian-devs like Andres Tille (I'm looking forward to your 
"speech" about debian and knoppix at LinuxTag)

cu

Fabian
--- hwsetup.c.old       Thu Jul  3 15:23:04 2003
+++ hwsetup.c   Thu Jul  3 12:13:55 2003
@@ -261,7 +261,8 @@

 void hw_info(struct device *d)
 {
- enum deviceClass class=d->type;
+ //enum deviceClass class=d->type;
+ enum deviceClass class=d->class;
  enum deviceBus     bus=d->bus;
  char *unknown="UNKNOWN";
  /* These used to be much easier when they were still arrays... */
@@ -434,7 +435,7 @@
    printf("write  config(%s)\n",name);
    printf("update config(%s)\n",kconfig);
   }
- switch(d->type)
+ switch(d->class)
   {
    case CLASS_AUDIO:
     {
@@ -511,7 +512,7 @@
 #if defined(_i_wanna_build_this_crap_)
      if(d->bus==BUS_ISAPNP&&configure_isapnp(d,verbose)) continue;
 #endif
-     switch(d->type)
+     switch(d->class)
       {
        case CLASS_MOUSE:   /* Choose serial over PS2/USB mouse IF present
*/
                            /* For some reason, PS/2 ALWAYS detects a mouse
*/

Reply to: