5 steps to a faster Linux boot

You don’t need to have a wireless kernel module loaded if you’re on Ethernet LAN. This task is complex and will require a kernel recompilation, which unfortunately is not the easiest task to accomplish.

Efficient Boot Time in Linux

Photo by Udo Herzog

Boot TimesDid you forget that on Linux?

We’ve seen and heard that Linux seldom faces a system halt or crash. Most of the people who have switched to Linux stay happy with the fact that they need not press the 3-button command to get the task manager every now and then, on their old machines. Linux has no doubt proved to be a blessing in disguise for machines which have limited hardware options and are low on resources.

This might indicate that a lot of geeks keep their boxes turned on for days(may be months in some cases!) However, for a normal use Linux machine, a daily boot would be pretty obvious.

We have seen a lot of tips and tricks to make Windows boot faster than before. Such recommendations have been popular and remarkably acknowledged across the world wide web. On similar grounds, we shall today try and figure out a few ways in which an average user can help reduce the boot time of a Linux box.

  1. Use a lightweight window manager: KDE and GNOME are no doubt the two most widely used window managers. But this, by no means shall mean that they’re the only option you have. Check out for a lot of options you have at your disposal. Based on your requirements, you may switch to a lighter window manager or desktop to help you get most out of the available hardware juice by drastically reducing the graphical boot time and memory consumption.
  2. De-select the unnecessary services: There are a lot of services running on the back ground, which you would be unaware of. A lot of them, you’d never need! If you’re using Linux just as a desktop, you would not need httpd, sendmail, etc. If you never use a bluetooth device, make sure you turn off the bluetooth service at startup. If you happen to use Linux just as a Web server, you can close a lot of services which a web server doesn’t need. You can see all the services and their roles at the Administration panel within the menu and take a look at the Services. Just disable all of the services you do not want to start automatically.
  3. Use a text based login in lieu of Graphical login window: Most of us love the graphical login window on Linux. However, for machines which are low on resource, there is an alternative - Text based login. The graphical login increases load times. Most of Linux machines boot to run level 3 instead of run level 5. This will probably halt at the text-based login, where you’ll just have to log in and issue startx to start the desktop of your choice.
  4. Use a lightweight Linux distro: Before deciding on the Linux distro, you need to check out the juice your hardware has. Instead of installing the bulky Fedora, you may opt for Arch, Ubuntu or Puppy Linux. The boot times for Arch and Puppy Linux are amazingly small. Amongst larger distributions, OpenSuSE has one of the fastest boot times.
  5. Disable unnecessary kernel modules - Only for Geeks and Administrators! This one is for the people who love things out-of-the-box! The Linux kernel consists of a lot of modules, each associated with an operation of a task or group of inter-related tasks. For example - You don’t need to have a wireless kernel module loaded if you’re running over an Ethernet LAN. This task is complex and will require a kernel recompilation, which unfortunately is not the easiest task to accomplish. To go along with this, you will need the kernel source, which can be downloaded from the distro’s website. Thereafter, you need to follow the standard steps for compiling a kernel, with a difference that you shall go through and disable all the modules you don’t need.
    At this point, you may take help of Bootchart. It lets you find out which kernel modules are currently installed and are running on your system. Apart from this, it illustrates for you what is happening during your system boot!

These were a few methods which would help you run Linux better and faster than before. These recommendations are made keeping an eye on the Linux users who do not cherish today’s fast and hardware rich machines! Stay tuned for more action.


Don't like it? There are lots of published articles, pick a random one.

oCricket

Praval Singh posted this article on Wed, Jul 30th, 2008 at 1:00 am
Categorized under Featured, Linux and has the following tags

Prev Article: Take the A List Apart 2008 Survey

Next Article: Startup Ideas you can steal and spawn

Archives: Visit the Archives for more articles.

Comments Post Yours

There are 3 responses so far. You can follow any responses to this entry through the RSS feed. You can leave a response, or trackback from your own site.

  1. a lot of the more user-friendly distros, like ubuntu, or fedora, will load tons of crap like bluetooth and wi-fi drivers and CUPS at boot time, by default. kinda like windows…

  2. Do most linux distributions provide hybrid sleep?

    I never boot up my computer, just press the space bar and 2 seconds later I log in.

    Greetz Erik

  3. My own reflections on the article:

    1. Use a lightweight window manager

    KDE and GNOME aren’t just window managers, they’re “desktop environments.” For years, KDE and GNOME have competed to provide the most featureful graphical user interface for Linux. And with all those features comes a lot of CPU and RAM usage. Historically, this has meant that either of them worked really well on the lastest processors with plenty of RAM, but not so well on older systems. In modern terms, with modern versions of the software, KDE and GNOME’s slowness is likely imperceptible on a dual-core machine with at least 1GB of RAM, but is likely noticable on anything older or less-well-powered than that.

    Me, I use a tiling window manager named w3m. It sacrifices a large number of bells and whistles in order to occupy a very small footprint. This is pretty much at the bottom of the weight scale, as far as window managers go, though there are a few that are more-lightweight, and it’s possible to do without a window manager entirely, in some situations.

    If you don’t want to learn something radically different from GNOME or KDE, try XFCE or Enlightenment. If you’re feeling a little more adventurous, try Afterstep or WindowMaker.

    One of the things you’ll discover if you switch down from GNOME or KDE, however, is that most of the other window managers won’t automatically mount CDs, flash drives or floppy disks for you. You can still do it manually, and it’s possible to set it up to occur regardless of your window manager, but it’s something you’ll likely have to deal with.

    2. De-select the unnecessary services
    On any modern operating system, there are tens of programs running in the background, handling things without direct interaction from you. Most of these programs are started while you’re booting up, at various “init” levels. Disabling these services means that your computer won’t have to start them while you’re still booting up.

    I can’t tell you what’s safe to disable in your case, but I can tell you to be careful. Each program is there because either the maintainers of your distro thought it would be a good idea for it to be there, or because your system administrator thought it would be a good idea for it to be there. Removing them can cause issues ranging from a slow system (Such as when I disabled PulseAudio on my laptop a while back, and had to wait for programs using ALSA to timeout.) to a severely broken system. Killing inetd may make your system inaccessible from other computers. Killing ntpd could make your clock start running fast or slow. Killing klogd and syslogd could cause all sorts of problems.

    3. Use a text-based login in lieu of Graphical login window

    Technically, it’s called a “display manager”, for those interested in the terminology.

    This is certainly a possibility, but it has its own drawbacks. While you can avoid having to start gdm, kdm or xdm (which do take a significant amount of time in my system’s boot cycle…and I’ve got a top-of-the-line home-built desktop.), you’ll have to learn at least a little bit about the command-line interface of Linux. Which is something you should do in any case if you plan to be proficient in using and administering your Linux box, but it’s something you should be ready for, rather than surprised by.

    Additionally, some modern distros coughubuntucough write a lot of messages to virtual-terminal console screens. These are the types of screens you’ll be seeing initially if you get rid of gdm, kdm and xdm. As a result, using virtual terminals for system operation can get frustrating, as these message will often overwrite or push out whatever it was you were trying to see.

    By the way: the “startx” command is the one you’ll most likely be looking for first if you remove gdm, xdm and kdm.

    4. Use a lightweight Linux distro
    In my experience, light-weight Linux distributions that aren’t targeted to specific system purposes are essentially the same as the heavier distributions, but with some of the above steps already taken care of. They’ll often use XFCE instead of GNOME or KDE, for example, and they’ll use lightweight alternatives to OpenOffice, rather than OpenOffice itself. Sometimes they’ll replace Firefox with Galeon or Opera.

    All in all, they’re good choices if they will do what you need them to do. However, keep in mind that it’s the popular distributions that have the most community support. If you need assistance with something, you’ll probably find help easier if you use Ubuntu or one of its derivatives than if you use Fluxbox.

    5. Disable unnecessary kernel modules - Only for Geeks and Administrators!
    If you’ve used wifi on Linux, there’s a good chance you’ve already skirted this one. Otherwise, be very, very careful. Messing around with your kernel configuration is Risky Business, and not something to be done unless you can put up with making mistakes a couple times in the process. And these mistakes can mean everything from making the system unbootable to corrupting the data on your hard drive.

    (That said, it was one of the first things I did when I first tried Linux as a kid. But I made lots of mistakes at first and lost my data a number of times. My friends–the ones who’d gotten me into Linux in the first place, and who were package and software maintainers on their own time–had no help to offer, as they hadn’t messed with it themselves.)

    Hope that helps.

Post yours

Sidenotes

Quick notes, scribbles, somehow related to this website and to what I do. Or perhaps I'm just plain lazy to make them into a full article.

Great Indian Developer Summit 2009

I got a Press Release of the upcoming GIDS '09 and here is an excerpt. The summit's program covers Java, REST, Unit testing, Groovy, Spring, Struts 2.0, SOA, Cloud Computing, Web Services, JRuby, RoR, Ruby, JVM, ...21st Jan, 2009

The flourishing gun market in Pakistan

VICE Travel: Darra, Pakistanby Top-Notch112 (Via: Deep Green Crystals) 20th Jan, 2009

Angry Ringtone for iPhone and others

[audio:http://audio.brajeshwar.com/angry-ring-ring.mp3] The ANGRY RINGTONE for iPhone. (Click the PLAY button above!) Download * iPhone Ringtone (.m4r) * MP3 Ringtone (.mp3) * Zipped (both .m4r and .mp3) To use it as an iPhone Ringtone; just double click the file "angry-ring-ring.m4r" and it ...15th Jan, 2009

IIM Ahmedabad's Leverage 2009

Leverage, the Venture Capital and Private Equity Club of IIM Ahmedabad and the Centre for Innovation Incubation and Entrepreneurship bring to you the 1st edition of the Venture Capital and Private Equity Conference on the ...12th Jan, 2009

Fedora 10 Released

Let's talk history! Fedora was created in late 2003 as a Linux based Operating System which gives the users an admittance from anywhere in the world to the most up-to-date free and open source software ...28th Nov, 2008

View the Sidenotes Archive

Play the Penguin Game

Recommended

  • AS 2.0 Reference Reference for ActionScript 2.0 Programming Language used in Flash. Primarily stashed here for my own personal reference.
  • ActionScript 3.0 Reference Flash/Flex ActionScript 3.0 Reference.
  • Forum Oinam’s technical discussion forum where developers and designers can discuss all technical topics.
  • o! Just Me Of colorful cultures, entertainment, media, life hacks, music, books and movies from hollywood & bollywood.
  • Downloads All downloads, Free and Open Source.
  • oCricket oCricket is about Cricket and people enthusiastic about it.
  • Ode to Apple Dedicated to Apple - Mac, iPhone, iPod, iTunes, Quicktime, Apple TV and all the awesome softwares for the Apple Mac.

Download free Brajeshwar Wordpress Theme

Brajeshwar

Brajeshwar I firmly believe in keeping things simple, easy for users and I envison pushing the technical envelop time and again for the betterment of viable commercial and practical applications. More about me.

Brajeshwar's affinity with Adobe

My Photos

More photos on Flickr

Member of 9rules Network

Since its inception on 11th June, 2001, "Brajeshwar" has 949 Articles and 6,472 comments, contained within 22 categories and 1,497 tags.