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

apexwm

NanWag : A Windows Server 2008 is being used because the environment that the Macs are in is a heavy Windows environment. I am proposing that...

14 minutes ago by apexwm on Windows Server 2008 drops the ball for Mac compatibility
BellamysIT

Really good article. You bring to light a few really good things. However, isn't it true that over 70% of fortune 500 companies use sharepoint?...

16 minutes ago by BellamysIT on Designing a SharePoint farm: Tiers before bedtime
annonymous2

If Piratebay is a crime then so is borrowing a dvd you purchased to a family member or a friend. Why should we not be aloud to share. Most of the...

2 hours ago by annonymous2 on UK ISPs ordered to block Pirate Bay website
NanWag

File Services For Macintosh was causing Excel to prompt for Overwriting changes or Save Another Copy because it was changing the timestamp on the...

3 hours ago by NanWag on Windows Server 2008 drops the ball for Mac compatibility
Regis Machado

creative cloud $48/month in the USA, £48/month in the UK ($79). good for the competitors

4 hours ago by Regis Machado via Facebook on Adobe move promotes piracy
Tom Espiner

Hello KosGirl, Good question. I've asked Belfius for a response. The latest post I can find on Pastebin about it is here:...

5 hours ago by Tom Espiner on Hackers hold bank to ransom over stolen data
KosGirl

Have there been any further updates to this story? I can't find any information on whether the hackers released the data or not.

6 hours ago by KosGirl on Hackers hold bank to ransom over stolen data
SandJ

I have done 7 speed tests this morning on different speed test tools. They tell me my download speed is: 12.3, 12.3, 12.3, 11.1, 12.7, 12.7, 11.7...

7 hours ago by SandJ on Watchdog: TalkTalk's broadband speed test misled users
Jack Schofield

@Mary Microsoft could always send Mozilla a spec sheet and oblige them to meet the same standards as IE. Then Mozilla can spend millions of...

10 hours ago by Jack Schofield on Windows RT browsers and the point of Windows RT
goth1csnake3

Not before time, that people making films,dvd's get whats coming to them. Well done, Virgin Media.

12 hours ago by goth1csnake3 on Virgin Media: Spotify deal will bring down piracy
Simon Bisson and Mary Branscombe

Apex - the question then is what about letting the user choose to have a tablet where they don't have to have that responsibility? why can't the...

22 hours ago by Simon Bisson and Mary Branscombe on Windows RT browsers and the point of Windows RT
Simon Bisson and Mary Branscombe

Moley, Apex, thanks; I think there's an interesting other dimension of choice - the choice to have a platform that is 'locked down' in the sense...

22 hours ago by Simon Bisson and Mary Branscombe on Mozilla accuses Microsoft of shutting Firefox out of WOA
Yellowcave

Not surprised. I once used the methods to let my firewall just notify me of breaches. Not one single logged event was genuine. Once, we all...

1 day ago by Yellowcave on Mobile porn filters catch innocent content, says report
duplex

live realy sucks in facebook becuase people hack your profile

1 day ago by duplex on Irish watchdog: Facebook privacy still falls short
Ed Macnair

If only it was that simple. When you start accessing Cloud applications you are stuck with the security model the vendor provides...........unless...

1 day ago by Ed Macnair via Facebook on IT security? You're doing it wrong!
Phil at Cloud4

Another good updaet, I have enjoyed going on the journey reading this series on SharePoint 2010 and have learned alot. Great writing.

1 day ago by Phil at Cloud4 on Designing a SharePoint farm: Tiers before bedtime
muteen

roumers of an ipad Mini, isnt that just an iTouch!?

1 day ago by muteen on Apple rebrands iPad 4G as 'Wi-Fi + Cellular' for UK
apexwm

Thanks for this article and bringing this issue to light. Unfortunately this type of activity is common not only with Adobe, but many other...

1 day ago by apexwm on Adobe move promotes piracy
Andy Bolstridge

there's a very thin line between tax avoidance and tax efficiency - earning £850 a month and claiming dividends to bring my income up to normal...

1 day ago by Andy Bolstridge via Facebook on The Idle Self-employed
Andy Bolstridge

I see that they are happy to announce these numbers.. but no-one will take any notice until they start announcing sales numbers too.

1 day ago by Andy Bolstridge via Facebook on Microsoft's score card for Smoked by Windows Phone