Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-11-2009, 06:32 PM   #1
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Legacy Grub and Grub2 wars crash my Ferrari and Kubuntu 9.10

Don't do what I did!

I know that I am really clever, but... I installed Kubuntu 9.10 alpha 64bit from a DVDiso that I downloaded the day after it became available to my hda6 (10.6GB) Ext3 partition. I have a 1GB swap on hda1, used by all distros and as a resume from disk for all distros except kubuntu 9.10 karmic koala. I have Suse 9.3 on hda2 (38GB)., Kubuntu 7.04 on hda7 (10.6GB), hda8 is LVM (13.6GB) with two logical volumes shared by all distros except Suse9.3, and hda9 has OpenSUSE 10.2 (17.2GB). All distros are 64bit.

My Suse10.2 grub legacy was until Kubuntu 9.10 install working so well that I became complacent, I had successfully added the later additional entry in menu.lst for the Kubuntu 7.04 distro, and I thought that I would do similarly with karmic. Wrong!

I had no internet connection at the time - comes from living on a boat - and am now relying on an 'open' wireless ISP connection at 1 Mbps, i.e. no encrytion - which was the basic cause of my predicament.

I had numerous trials and tribulations installing what was supposed to be a Live-DVD, I had two copies burnt to DVD+RWs and had to keep swapping them to load various pakages during the install. I couldn't, even after changing the default boot commands, install the kde environment, whereas the Gnome install went ahead... I did manage to install to hda6 but I was not sure where to redirect the legacy Grub bootloader to. It appears that it overwrote the MBR. Well that would have been fine, had it not been that I am an experimental sort of guy and thought it would be fine to try Grub2 or Grub-pc or whatever. You will appreciate that while being adventurous (whiling away the long evenings on board my boat) I 'dd' copies of my distros to a 320GB Western Digital USB passport drive on a weekly basis. In the past, as when playing with distros in virtual machines, all I had to do was 'dd' an older working copy of a distro to its appropriate partition and I could undo any wild and sometimes idiotic snafus or foobars. I keep my important docs and linux howtos, etc. on my LVM partitions. Incidentally, the karmic alpha DVD didn't provide any tools for LVM and I had to import my kubuntu 7.04 settings to get LVM visible.

So... the other day after various automatic updates and a few synaptic downloads, my wireless connection simply refused to function. I had a persistant DISSCONNECT (Reason 4) about 3 times a second being reported in my daemon.log, my kern.log and messages.log amounting to about 1MB per day each! This may have been caused by upgrading my b43 firmware drivers (from 5 to 13), or wpa_supplicant not palying fairly because I wasn't using any encryption, or an upgrade to the 2.6.31-11 kernel - WHO KNOWS?

Anyhoo ... I know I thought, I'll just 'dd' of=/dev/'s'da6 [N.B. due to some strange addiction of Karmic all my ata partitions and harddrive are now named sda(x), which has meant that when Grub2 took over my machine the only working distro was OpenSUSE 10.2] to my passport drive and then copy back an older version that at least allowed my the privilige of a functional wireless connection. Mark my words, DON'T DO THIS.

So some 30 minutes later 'dd' has done its thing and I happily disconnected my usb drive and shutdown OpenSUSE to see the results of my brilliant move NOT.

I restart my machine and all it will tell me is that grub cannot load .......... all I have is a command line and 'ls' shows a list of bracketed (braced) hdX's such as: (hd0) help is no help either since all the commands that I try such as partinfo have no effect whatsoever. Nothing for it, I am beaten, by my own stupidity - I hadn't realized that eachtime I had upgraded the karmic kernel, the new and wonderful GRUB2 had been happily updating the MBR and/or stage1.5 and/or stage2 and/or their more modern equivalents to say nothing of grub.cfg. Of course, I had just overwritten the new FAT CONTROLLER and the new kernel, vmlinuz and initrd weren't where they was supposed to be.

Solution so far: Crank up the old tablet running XP for tablet PC's SP-3 and google - grab a copy of SUPERGRUB burn it to a CD. The one I burned to a CD-RW didn't work. Slot it in select Linux and grub point it at the OpenSUSE partition's menu.lst reboot and hey presto I have my Ferrari 3400 back again graphical boot and all - except Karmic.

So what's my problem - why come to LQ after a couple of years' absence? Well the real reason it that trying to get legacy grub to see an Ext3 Grub2 installation has exhausted even my ardent googling. After reading numerous posts by the honourable saikee on the justlinux board I find that lo and behold he is a multi-thousand poster here on LQ and has probably the best knowledge on legacy grub in the wholewide world. So here I am - I have tried chainloader +1, I have tried uuid's until they came out of my ears, and disk/by-id/, I have tried the symlink approach, and I have varied the full names of the currently active vmlinuz and initrd's versions such as vmlinuz-2.6.31-8-generic to no avail.

Does anyone know anything that I haven't tried? Before I admit defeat and try to reinstall Karmic beta to my hda6 partition.

Thanks for any help.

Last edited by minrich; 10-11-2009 at 06:45 PM.
Old 10-12-2009, 05:54 AM   #2
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,827

Rep: Reputation: Disabled

Welcome to the world of grub2?

Fact grub in mbr as legacy can chainload to grub2 in boot partition

Fact grub2 in mbr can chainload to grub legacy in boot partition.

I do not understand what the problem is, if you suggest supergrub fixed your system. Maybe you are trying to say you think grub2 is still in mbr but its not very clear sorry.

Either install grub legacy in mbr and configure your /boot/grub.lst to boot your other partitions or
install grub2 into mbr and configure your /boot/grub/grub.cfg to boot your other partitions or
if you are a fan of saikee's style...put a grub into mbr and put other grubs into each boot partition and adapt your menu.lst or grub.cfg to use chainloading

grub2 chainloader entry looks like this

# Chainload another bootloader
menuentry "Chainload partition 3" {
set root=(hd0,3)
chainloader +1

grub2 counts from 1 for partitions

Last edited by aus9; 10-12-2009 at 05:56 AM.
Old 10-12-2009, 06:20 AM   #3
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Yes Aus9 is right. Although Grub2 and lagacy Grub are not compatible they can chainload each other.

Some commands are common between the two

Both can fire up an operating system manually even one without a boot loader, let alone a defective one. (see this thread)

One should look upon Grub2 as just another boot loader like Lilo that used by Linux.

Distros are forced to use Grub2 if they promote the Ext4 filing system which Grub2 can read but not lagacy Grub. To chain load an operating system both Grub2 and lagacy Grub do not need to read the filing system and that is hiw all the Xp, Win2k, Vista and Win7 been booted by Grub. Both Grub2 and lagacy Grub can't read a NFFS partition.

Just remember legacy Grub counts everything from zero but Grub2 counts the partition from 1. So the 1st partition of the 1st disk to legacy Grub is (hd0,0) but (hd0,1) to Grub2.

Enjoy Grub2.

Last edited by saikee; 10-12-2009 at 06:22 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub2 (grub-1.96) ERROR: NOT AN ASSIGNMENT ssenuta Linux - General 7 09-02-2009 08:15 AM
Help converting grub-legacy to grub2 ssenuta Linux - General 4 08-29-2009 10:04 AM
Installing GRUB or GRUB2 from scratch williamv2 Linux - Newbie 10 03-31-2009 09:31 PM
grub problem and looking for grub2 docs m-jackson Linux - Newbie 1 10-27-2006 02:18 AM
Grub Legacy or Grub2? RAVC Linux - Software 2 01-21-2006 09:43 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration