Creating Your New Distro


Now that preparations are completed, you can begin the fun part: making Myppix. Start thinking now, if you haven't already, about exactly what you want in a Knoppix built especially for you. What settings do you always alter? What software do you always install? What packages never get used? Fonts, colors, home pages what do you like? Try to make a list of the things to go into your Linux.

Meanwhile, set up your remastering environment by returning to Chapter 11 and following all of the instructions in the "Preparing Your Environment" section.

All set? Good. Let's move on. In Chapter 11, you removed any software that didn't seem appropriate for the kiddies. For instance, you said bye-bye to internationalization packages, emacs, security tools, Thunderbird, Apache, development packages, and a whole lot more. You're not a kid, though, and you probably want to keep some of that stuff, so this time things are going to be a bit different. From your creation of Archix, you most likely have an idea of the things you want to remove from your own distro, but let's take another look at that procedure anyway.

As always, before adding or removing software, you need to tell APT to update the list of software available on repositories:

 # apt-get update 

Information appears on your terminal as APT connects to repositories listed in the /etc/apt/sources.list file. The first thing to do is update APT itself, just in case there's something new in there that you need, so enter the following on the command line:

 # apt-get install apt apt-utils -t unstable 

unstable in this command means, roughly, the beta set of Debian packages. APT asks whether you want to install the packages you indicated, as well as a few others. Enter Y, and, after that process completes, run the update command again. Then you can nuke some packages.

It's always vital to keep tabs on how much space is currently used in your distro, so run the disk usage command:

 # du -c 

Wait while this command lists every directory and its size, and then pay attention to the last line. For example, a last line that reads

 2458927 total 

tells you that Knoppix is using 2.45GB of space, and you'd need to get rid of as much software as possible so that you can install the packages you want to use when you run Myppix. It's helpful to first erase the packages that are taking up the most space. To find out what packages are on Knoppix, sorted by size, with the largest found at the bottom, run this command (actually, two commands, joined together by the pipe):

 # dpkg-query -W --showformat='${Installed-Size} ${Package}\n' image from book 

To elucidate the names of the i18n packages, rerun the previous command, but add another pipe followed by another grep so that you see only packages with i18n in the name:

 # dpkg-query -W --showformat='${Installed-Size} ${Package}\n' image from book    openoffice.org-thesaurus-en-us openoffice.org-help-en image from book    -t unstable 

By running this command, you have to install extra packages, but that's fine. You're still actually saving space; and more important, you're getting your toolkit in place just the way you want it.

If you like the vim text editor and never use emacs, you can gain a little more space with this command:

 # apt-get remove --purge emacs21-common emacs21 emacs21-bin image from book    -common emacsen-common 

Then update vim:

 # apt-get install vim vim-common vim-gtk vim-scripts vimpart image from book   Caution   

I'm serious! Do not press Y here! Press n! Otherwise, you'll be installing about 50 gazillion packages.

Look through the massive list of packages for anything with "mozilla" in the name. Yup — there they are: mozilla-firefox, mozilla-thunderbird, and mozilla-thunderbird-offline. Just what you want, so use the following command:

 # apt-get install mozilla-firefox mozilla-thunderbird image from book    klogd konq-plugins kpf kphone kppp krdc krfb -t unstable 

Cool. Now you're running the latest version of KDE. What else do you need? Well, Quanta, for example, is an excellent HTML editor that you can use to make Web pages and edit blog entries:

 # apt-get install quanta -t unstable 

What about security? If you use Knoppix to run security apps, you need to upgrade those, too:

 # apt-get install ca-certificates chkrootkit ethereal image from book    ethereal-common ettercap-common ettercap-gtk gnupg nessus image from book    nessus-plugins nessusd nmap openssl tcpdump tethereal image from book    xmms-volnorm -t unstable 

If you like nice fonts, try this:

 # apt-get install msttcorefonts -t unstable 

After that, run the deborphan command, which, you'll remember, lists libraries that are no longer in use by any other packages and therefore are safe to delete:

 # deborphan 

Then delete any packages that deborphan finds. That helps a bit.

You've installed a lot of software onto your system, and those installers are just taking up space that you need. How much space are the installers taking up? Check with this:

 # du -c /var/cache/apt/archives 

The results come in quickly; for example:

 166429 /var/cache/apt/archives 

Whoa. That's 166MB of software installers. Use APT to delete that stuff:

 # apt-get clean 

All gone. How big is your distro now?

 # du -c ... 2449237 total 

Excellent. You've got the software situation in hand. Time to perform final clean-ups.

All of this installing and uninstalling has been generating system mail that you need to remove:

 # rm -rf /var/mail/root 

Anything in the /tmp directory needs to go:

 # rm -rf /tmp 

Before exiting your chroot environment, unmount the proc filesystem:

 # umount /proc 
Caution 

Do not forget to do this or your new Knoppix variant may not work the way you're expecting!

Finally, it's time to leave chroot:

 # exit 

You're now back in your normal shell, where you have some further customizations to perform.



Hacking Knoppix
Hacking Knoppix (ExtremeTech)
ISBN: 0764597841
EAN: 2147483647
Year: 2007
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net