Previous Section  < Day Day Up >  Next Section

Recipe 13.10. Installing Software from Knoppix

13.10.1 Problem

You need to run apt-get, apt-rpm, up2date, or some other updater utility that needs to be run from inside its own root filesystem.

13.10.2 Solution

In Knoppix, you can chroot to the root filesystem on the hard drive. Open a Knoppix root shell, then do:

root@ttyp0[knoppix]# mount -o rw /mnt/hda6

root@ttyp0[knoppix]# chroot /mnt/hda6

root@Knoppix:/

This gives you a root shell in the filesystem on the hard drive, as though you were booted directly into it. You are no longer in the /mnt directory in Knoppix. Now you can run any command, as though the system had booted normally. That includes commands for updating software like apt-get.

13.10.3 Discussion

From an ordinary Knoppix session it's easy to keep track of your whereabouts, as all the filesystems on the hard drive are mounted under /mnt. But in chroot, you won't see Knoppix files. If you get confused, try poking around and reading filenames—you should recognize files that belong on the hard drive, and not to Knoppix.

13.10.4 See Also

  • chroot(8)

    Previous Section  < Day Day Up >  Next Section