Ten tricks to make Linux boot faster

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

COMMENT

Linux rarely needs to be rebooted but, when it does, it often takes longer than you'd like.

Fortunately, there are ways to speed things up. Some methods are relatively easy, while others are more difficult.

1. Disable unnecessary services
Depending upon the use of the machine, plenty of services won't be needed. If you're using Linux just for a desktop, you won't need sendmail, httpd and many other services.

If your server is only a web server, you can shut off many services as well.

To do this, you can go to the administration menu and take a look at the services entry. Just deselect all of the services that you don't want to start.

2. Disable unnecessary kernel modules
If your desktop is wired to the Ethernet, you don't need to have a wireless kernel module loaded.

This task is a bit more difficult and will require a kernel recompilation, which is not the easiest task to undertake. To do this, you will need the kernel sources. Then, follow the standard steps for compiling a kernel. The difference is that you're going to go through your system and disable all of the modules you don't need.

The best way to find out what kernel modules currently install and run on your system is to install Bootchart. Not only will this give you a good list of modules, it will illustrate for you what is happening during your system boot. You can also issue the command chkconfig –list | grep 3:on to find out what services are running.

Once you know what loading modules you don't need, you can remove them during a kernel recompilation. While you're at it, compile the kernel to exactly match your architecture.

3. Use a lightweight window manager instead of Gnome or KDE
I plug smaller-footprint window managers for a reason: they drastically reduce graphical boot time. Instead of having to wait that extra 30 to 60 seconds for Gnome or KDE to boot up, why not wait two to 10 seconds for Enlightenment or Xfce to boot up? Not only will they save you boot time, they will save your memory and the headache of dealing with bloatware.

4. Use a text-based login instead of a graphical login
Most of my Linux machines boot to run level 3 instead of run level 5. This will halt at the text-based login, where I only have to log in and issue startx to start my desktop of choice. The graphical logins do two things: increase load times and create headaches trying to recover from an X windows fubar.

5. Use a lighter-weight distribution
Instead of loading the heavyweight Fedora, why not try Gentoo, Arch or Puppy Linux?

The boot times for these smaller distributions are far faster than for the more bloated Fedora, and even Ubuntu. In terms of the latest versions, Ubuntu boots significantly faster than Fedora — and that is out of the box.

6. Use an OpenBIOS
If you're savvy enough to upgrade your PC's firmware, you might consider migrating to an open-source BIOS. One caveat to using open firmware is that it allows Linux to actually initialise the hardware as it boots, instead of relying on the BIOS. On top of that, many open BIOSes can be configured to meet your machine's specific needs.

If you don't go the open BIOS route, you can at least configure your BIOS not to search for a floppy drive that's not there or to boot directly to the first hard drive, instead of the CD drive first.

7. Avoid DHCP
If you are working on a home network, or a small business network, where address lease isn't a problem, go with static IP addresses. This will keep your machine from having to call out to a DHCP server to get an IP address. If you take this approach, make sure you configure your /etc/resolve.conf to reflect your DNS server addresses as well.

8. If you can spare it, get rid of hotplug
Hotplug is the system that allows you to plug in new devices and use them immediately. If you know your server won't need this system, delete it. This will cut down on boot time. On many systems, hotplugging consumes much of the boot time. The method utilised to remove hotplug will vary depending upon the distribution used.

Note that udev has, for the most part, replaced hotplug. However, if you're running an older distribution, the above does apply.

9. If you are really daring, you could give initng a try
The initng system serves as a replacement for the SysVinit system and promises to drastically decrease boot times in Unix-like operating systems. If you would like to see the initng system in action, you can give the Pingwinek LiveCD a try.

10. Use a hack with Debian
If you're using Debian, there is a simple hack you can use to switch your startup scripts to run in parallel. If you look at the /etc/init.d/rc script, you will see: 'Concurrency=none' around line 24. Change this line to 'Concurrency=shell' and you should see a reduction in boot times.

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

Roberto_Store

Now On Sale, Unlocked iPhone 4S / Galaxy Note In Factory Box. Roberto-Techie(UK) ”Now on Sales” Smartphone, Android,Tablets,Gadget &...

2 hours ago by Roberto_Store on Samsung Galaxy S III lined up for sale
Paul Smyth

Is this classic FUD? One thing I would definitely have notice is a Mozilla threat to stop supporting GNU/Linux.

4 hours ago by Paul Smyth via Facebook on Firefox rapid release improves Fedora Linux
UnderINK

I agree with the previous commenter wholeheartedly. I couldn't say it better myself. This is very 'Big Brother'. And while I agree with protecting...

8 hours ago by UnderINK on European e-identity plan to be unveiled this month
Simon Bisson and Mary Branscombe

Nice to see that Turing's idea of a general purpose computer doing once-hardware-powered tasks in software is now universal ;-) Mary

13 hours ago by Simon Bisson and Mary Branscombe on Software with everything
Jason Burchell

seriously now. I've only bothered to read a small bit of the comments. do me and the rest of the world a favour. stop saying it does not work or...

17 hours ago by Jason Burchell via Facebook on Music industry negotiating over 24-bit downloads
Philip Charles Cohen

Read about it and weep, John Donahoe ... In addition to Visa’s V.me, there is now MasterCard’s PayPass digital wallet soon to arrive; another...

21 hours ago by Philip Charles Cohen via Facebook on PayPal takes phone-based payments to the high street
apexwm

Leslie Satenstein : Where have you ever seen Mozilla even mention this? Firefox is the most popular browser in the GNU/Linux OS, so I don't see...

22 hours ago by apexwm on Firefox rapid release improves Fedora Linux
songmaster

SHleG: Do you remember building a clockwork scorpion kit (I'm pretty sure I have a photo of it somewhere) — I think it was called something like...

24 hours ago by songmaster on Software with everything
Chris Wortman

Good I love Yahoo! Their search engine is getting better than Google as of late. I find more of what I want on the first page, and usually within...

1 day ago by Chris Wortman via Facebook on Linux Mint 13 ramps up for KDE release
PatrickG

openhgs has made the point for Windows 8 multiple monitors without realising it! With Windows 7 you have to switch the mouse and so your focus...

1 day ago by PatrickG on Windows 8 could speed multi-monitor uptake
Leslie Satenstein

Mozilla has threatened to stop supporting Linux. I guess that UBUNTU is going with another browser. I indicated that if Mozilla stops supporting...

1 day ago by Leslie Satenstein via Facebook on Firefox rapid release improves Fedora Linux
Andy Bolstridge

Much as I abhor Microsoft's licensing practices, this is almost certainly down to purchasing IT equipment via 3rd party consultants - you get the...

1 day ago by Andy Bolstridge via Facebook on 6 million wasted licences and £1,200 PCs: welcome to government IT
Jack Schofield

@openhgs Windows users have had multiple desktops since Linus started writing Linux. They just haven't shipped as standard because not enough...

2 days ago by Jack Schofield on Windows 8 could speed multi-monitor uptake
Jack Schofield

@Phil at Cloud4 What, Microsoft gets £1,200 per PC and £1,622 per server? Gosh, I'm amazed....

2 days ago by Jack Schofield on 6 million wasted licences and £1,200 PCs: welcome to government IT
craigsc

You guys have no idea what is going on at Autonomy. Autonomy could have been a much more profitable organization. The sales operations at Autonomy...

2 days ago by craigsc on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Moley

How does this impact on dual or multi booting? Seems to me to more or less prohibit this, from Windows 8 anyway. Will Grub 2 recognise Windows 8,...

2 days ago by Moley on Windows 8 start-up speed forces USB boot workaround
apexwm

I don't understand why there cannot be a slight pause during the boot process so the user can press a key. Many operating systems do this, even if...

2 days ago by apexwm on Windows 8 start-up speed forces USB boot workaround
Gavin Goodman

You can now buy the Xi3 modular computer in the UK at http://www.ocdistribution.com . This can be bought with the Tand3m software, pricing and...

2 days ago by Gavin Goodman on CES 2012: Xi3 microSERV3R
Phil at Cloud4

I agree: Mike Lynch can clearly build a business and manage strategy. I suspect the exit of Mike is more likely the end of a planned handover...

2 days ago by Phil at Cloud4 on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Phil at Cloud4

This is unbeleivable government wastage with only one winner... Microsoft 1 - Tax payer Nil!

2 days ago by Phil at Cloud4 on 6 million wasted licences and £1,200 PCs: welcome to government IT