Creating a Complete Distribution on CD
When your first trial CD is working, it's time to do some cleaning. Basically, there are two locations where some major cleaning up of the boot process can be done. First, you have to take care of /etc/rc.d/rc.sysinit. In this file, which always is executed on system boot, a lot of things are taken care of and probably a lot of things can be skipped for your specific configuration. The most important things to look at all are the instances where files are created. Besides that, you can disable the lines where services are activated that you don't need. Think, for example, of services such as isapnp setup and probably many more.
Next, you have to clean the boot-up of your runlevel. Let's first do a quick refresher of how services are activated when entering a runlevel. On Red Hat, you find all the general scripts used to start services in /etc/rc.d/init.d. A script called smb, for instance, can be used to start Samba services. If you want this script to be executed when entering runlevel 3, you have to create a symbolic link that starts with S followed by a number to determine the exact moment when the script should be executed. By default, many of these links probably start services you don't need. You could encounter, amongst others, the link S60lpd in /etc/rc.d/rc3.d, which dictates that the line printer dæmon is started every time you enter runlevel 3. In order to clean the startup procedure of services you don't need, simply remove all of these links.
Returning to our initial example, say you want to use your Linux distribution for customers who have to complete an evaluation without providing a user name and password. By changing a simple line in /etc/inittab, you can log in your users automatically. You can use any account you like, because it is a read-only filesystem--you even could use root if you wanted. In order to log in to the system automatically, change
1:2345:respawn:/usr/bin/open -c 1 -w -- /bin/login -f username
Don't forget to remove the password for the user you are here. You probably don't want to oblige your users to fill in anything before they can start using your CD.
Before you can give the CD to an innocent user, you need to take one more step, making it possible to start the X Window System. It is rather easy to make this happen; simply give your default user a writable home directory. At an earlier stage you created a read/write accessible /var director, so this is a nice location in which to create the home directory. After that, X is happy to be able to create its temporary files, and everything works the way it should.
For Knoppix and the source code used for Knoppix automatic hardware detection, go to www.knoppix.org.
Sander van Vugt lives in the Netherlands. He works for Azlan Network Training (part of the Techdata Group) as a trainer and consultant, and he has written several books and articles about Linux.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
|Play for Me, Jarvis||Apr 16, 2015|
|Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites||Apr 15, 2015|
|Non-Linux FOSS: .NET?||Apr 13, 2015|
|Designing Foils with XFLR5||Apr 08, 2015|
|diff -u: What's New in Kernel Development||Apr 07, 2015|
- Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites
- Play for Me, Jarvis
- Non-Linux FOSS: .NET?
- Designing Foils with XFLR5
- Not So Dynamic Updates
- New Products
- Flexible Access Control with Squid Proxy
- Users, Permissions and Multitenant Sites
- New GeekGuide: Beyond Cron