Legacy Grub and Grub2 wars crash my Ferrari and Kubuntu 9.10
Linux - SoftwareThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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
}
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.