How the Linux boot process begins – and how to overcome common problems
MBR problems
This multi-stage setup gives a very flexible approach to booting, but also leads
to problems if you simply delete Linux from your computer in a dual-boot
scenario.
If the partition with the second stage is deleted, Grub can’t load itself completely, so the boot will fail.
All your data is, of course, still present and safe on any other partitions, but there will be no way to boot the computer’s hard drive directly without rectifying the problem.
One solution is to restore the Dos MBR that Windows installs. You can do this from an installation CD or by running the fdisk /mbr command from a Windows 98 CD. This will replace the boot part of the MBR without modifying the partition table. As above, this code will simply boot the primary partition marked active.
Grub ignores this flag, allowing you to boot any partition, primary or extended, from any hard drive. There is an alternative open source install-mbr command for Linux that will install a compatible piece of code instead.
Another option is to make a backup of your MBR’s boot code before you install Grub. The easiest way to do this is from Linux, using the dd command, which we’ve seen a number of times over the past few months. Since we do not want to modify the partition table, we need only copy the first 446 bytes:
$ sudo dd if=/dev/hda of=boot.bin bs=446 count=1
You can write this back to your hard drive with the reverse options:
$ sudo dd if=boot.bin of=/dev/hda
No size options are necessary here, since you are writing the entire file to the hard drive. If you have a full backup copy of your MBR, as I have re commended you always do, you can write the first 446 bytes only using a version similar to the first command:
$ sudo dd if=mbr.bin of=/dev/hda bs=446 count=1
This issue presents itself also in the reverse case; if you install a copy of Windows after Linux, it will erase the boot code on the MBR and replace it with the Dos version, preventing you from booting into another operating system. To get around this, back up your Grub boot code before installing Windows, and then rewrite it after the installation is complete.
There are other ways to get around these problems. One method is to use a small separate partition for /boot. If you delete the main Linux partition, Grub’s files are still intact and you will still be able to boot successfully. Another option is to install Linux onto a primary partition, mark it as active and install Grub onto this partition instead of the MBR. This leaves the Dos MBR in place, which in turn boots Grub.
This is the easiest to maintain, but does require that Grub is placed onto a primary partition so that the Dos boot code can start it. Most distributions allow you to place Grub on the MBR or the root partition at install time.
Feisty Fawn
As you read this, the latest version of Ubuntu Linux, known as Feisty Fawn or
version 7.04, will have been released and made available to download. As usual,
it comes in three main flavours: Ubuntu with the Gnome desktop, Kubuntu with the
KDE desktop and Xubuntu with the lightweight XFCE desktop.
The new version has had significant interest during development, with some popular user-friendly features added to make life easier for users and get the desktop up and running as quickly as possible.
Following on from a somewhat disappointing Edgy Eft release, Feisty looks set to make much more of an impact, with some very favourable reviews of the development milestone releases. Next month, we will look at the new release, and as we have done previously with Dapper and Edgy, any necessary configuration steps to get the most out of it.
Related articles
Q.Why are some of the keys on my keyboard doing strange...
Q.Is my phone’s Bluetooth any use?
Q.Can I switch boot drives so that I can work on older...
Old Street roundabout is being touted by the Government as the UK's answer to Silicon Valley, but it seems our best innovations are coming from all over the UK
|
|
|
|
|
Computeractive Excel (2010) Online tutorialPrice: £19.99 |
Computeractive Word (2010) Online TutorialPrice: £19.99 |
Computeractive Powerpoint (2010) Online TutorialPrice: £19.99 |
Angry BirdsPrice: £9.99 |
Back Issue CD-Rom 14 (2011)Price: £15.99 |