Showing posts with label Boot-Process. Show all posts
Showing posts with label Boot-Process. Show all posts

Saturday, March 22, 2008

Removing / Stopping Unwanted Services from Linux boot

The first thing you should do when you install a shiny new gnu/Linux system is remove unwanted services from default runlevel (default is runlevel 2 incase of debian and related distros ).

Most advanced users would manually remove the syslinks from the runlevel /etc/rc{0-6}.d directories. This is not only messy and also prone to errors. I advise you to look the update-rc.d tool from the sysv-rc package. The sysv-rc package is installed as part of standard gnu Debian Linux base system, so it pays to learn this one over other GUI or Ncurses based tools.

Alright enough of talk let me go ahead remove some unwanted services, let's get rid the The Internet Superserver(inetd) here.

$ sudo update-rc.d -f inetd remove update-rc.d: /etc/init.d/inetd exists during rc.d purge (continuing) Removing any system startup links for /etc/init.d/inetd ... /etc/rc0.d/K20inetd /etc/rc1.d/K20inetd /etc/rc2.d/S20inetd /etc/rc3.d/S20inetd /etc/rc4.d/S20inetd /etc/rc5.d/S20inetd /etc/rc6.d/K20inetd

The name of the service 'inetd' (referred to as basename in manual pages) are the init scripts that reside in the /etc/init.d directory. Have a look the scripts in this directory or look closely the boot time messages to find likely targets to remove.

Sunday, October 21, 2007

Booting GNU / Debian Linux in Verbose Mode

Nobody with a sane mind watch their computer boot up, its not very interesting to watch messages of kernel being loaded and services started flashing by.

If you read my last nights post on understanding the GNU / Debian Linux boot process then you have a fairly good idea of the importance of learning about the GNU / Debian Linux booting process. This knowledge will aid you in troubleshooting Linux boot problems.

The GNU/Debian Linux by default boots in a quiet mode with very few messages printing to the computer console (as you can see in the video). Let's make the computer be more verbose by turning on the VERBOSE variable in /etc/default/rcS file .

# Set VERBOSE to "no" if you would like a more quiet bootup. VERBOSE=yes

Save the file and reboot the machine. Watch and learn what goes on when the machine boots up. What next ? if you are done understanding how it works its time to hack the system find ways to speedup the boot process and try to free some system resources by getting rid of unused services and kernel modules. Happy Hacking !!!

Saturday, October 20, 2007

Understanding the GNU / Debian Linux Boot Process

Learning a Unix-like operating system is like a Herculean task for most of us. Most people even those working in the IT industry break into cold sweats on hearing words like Unix, Linux and Debian. Such aura of mystery and wizardry commonly associated with it is perhaps much to do with fear is unknown rather than the difficulty of learning the operating system(s).

One of the important advantage of learning a Unix-like operating system is in its transparency. If you want to understanding the intrusive details of how an operating system works you can dig right into the bowls of the operating system and to its source code. A closed source Operating system like Microsoft Windows NT XP or Vista will not allow you do that thus a very bad choice for learning OS concepts.

The boot process starts the moment you power up your PC and until the time the computer is able allow you to log on. Understanding this booting process of a GNU/ Debian Linux is an essential part of mastering the OS, the From Power Up To Bash Prompt HOWTO written a decade ago provides a detailed look at the boot process from Power up to the bash prompt . Even the experienced Linux users will learn from this HOWTO.

The author(s) of the HOWTO document sums it up as thus.

I find it frustrating that many things happen inside my Linux machine that I do not understand. If, like me, you want to really understand your system rather than just knowing how to use it, this document should be a good place to start. This kind of background knowledge is also needed if you want to be a top notch Linux problem solver.

This HOWTO is can be found in doc-linux package on GNU/Debian in text and html formats.The Debian Documentation page has an extensive list of manuals that are available to aid the learning the OS. Also visit the The Linux Documentation Project(TLDP) for more such HOWTO's , Guides and FAQ's.

Friday, September 28, 2007

Mounting a Windows partition automatically at boot time

If you have setup a Microsoft Windows and Linux dual boot system you may want to mount the windows partition automatically when you boot into GNU/Linux. As usual I don't suggest using any special scripts or packages for this. We will use the standard *nix files system table (fstab for short) file which stores all the entries about all known filesystems on the system and place an entry for our partition. Lets get started,Just place the following line into your /etc/fstab (filesystem table) file and you are done. /dev/hdaX /mnt/C vfat defaults,auto 0 0
  • /dev/hdaX if you are using a IDE harddrive, X is the number of the partition (use fdisk -l to list your partition info)
  • /mnt/C the mount point, where the windows partition is attached
  • vfat - vfat for 98x or ntfs for NTFS partition
  • auto - Mount the partition at boot time
Other possible parameters you can use uid/gid , showexec, umask etc.. the fstab manual page (man fstab) has detailed information about all the options. Also if you want your windows partition to check for errors with fsck.vfat at boot time check the last entry in the line from 0 0 to 0 1 .

Popular Posts