How to revert to grub legacy

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

How to revert to grub legacy

Postby viking777 on Mon Mar 15, 2010 6:10 am

A lot of people, myself included, are having difficulty in understanding the 'logic' of grub2, personally I think that for the present grub legacy is a better bet. I am sure that will eventually change but it hasn't yet. The way I have been dealing with the situation is simply to install a distro that still uses grub legacy (Debian Stable in my case) to control the boot process (ie it is installed on the disk mbr) and to use that to chainload to all the newer grub2 distros (installed onto the partition boot record not the disk mbr). The grub2 distros can make as much of a mess as they like of my newer distro boot menus (and believe me they do!) because I don't have to read them, I have already chosen what I want to boot into from the comparatively sane and superior debian boot menu. That works for me, but I have always wanted to know how easy it is to get rid of grub2 from a distro that already has it and that is what I tried out today. Luckily the answer is that it is very easy. Most of the procedure is taken from the Ubuntu community Docs (https://help.ubuntu.com/community/Grub2 ... B%20Legacy) although they gloss over one very important step at the end which basically means that you cant boot. That is why I am repeating the tutorial here.

So this is how it goes. In a terminal:



Code: Select all
sudo cp /etc/default/grub /etc/default/grub.old


sudo cp -R /etc/grub.d /etc/grub.d.old


sudo cp -R /boot/grub /boot/grub.old


In case you regret what you have done later!

Code: Select all
sudo apt-get purge grub-pc


Once you have done this your computer is no longer bootable so don't switch it off (although you can always use a live cd to edit stuff if you need to)

Code: Select all
 sudo apt-get install grub


Code: Select all
sudo update-grub


Code: Select all
sudo grub-install /dev/sdX


Usually this will be /dev/sda but if you have more than one drive it may not be. If, like me you want to install to a partition not the mbr then change it to /dev/sdxx
(eg /dev/sda6) that will install grub to partition sda6.

Up till now this has been exactly the same as the Ubuntu docs, but they now tell you to reboot DON'T!

The reason is that your new menu.lst file although created is not properly written (I think the reason is that it gets confused with grub2 notation, not sure but it certainly won't boot yet anyway), so,

Code: Select all
sudo gedit /boot/grub/menu.lst


If yours is like mine it will contain two entries one for the distro you are installing grub on and another to chainload grub2 again, both are wrong.

The newly created file looks a bit like this (I have altered mine a bit so it won't be identical):

title Linux Mint 8 Helena - Fluxbox CE, kernel 2.6.31-20-generic
uuid xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
kernel /boot/vmlinuz-2.6.31-20-generic root=LABEL=spare3 ro nosplash
initrd /boot/initrd.img-2.6.31-20-generic


title Chainload into GRUB 2
uuid xxxxxxxxxxxxxxxxxxxxxxxxx
kernel /boot/grub/core.img

The lines in red are the errors so change 'uuid' to 'root' and the actual uuid number to the format (hdx,y) so it looks like this (of course it helps if you know the correct partition number for your machine!)

title Linux Mint 8 Helena - Fluxbox CE, kernel 2.6.31-20-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.31-20-generic root=LABEL=spare3 ro nosplash
initrd /boot/initrd.img-2.6.31-20-generic


title Chainload into GRUB 2
root (hd0,5)
kernel /boot/grub/core.img

Then you can boot, and you will actually have a choice of booting with grub legacy or grub2 although grub legacy will be in control of the boot process.
Last edited by viking777 on Mon Mar 15, 2010 11:44 am, edited 1 time in total.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Linux Mint is funded by ads and donations.
 

Re: How to revert to grub legacy

Postby linuxviolin on Mon Mar 15, 2010 9:10 am

Well, Grub 2 works well sometimes :wink: but it is still under development and so far is not stable...

e.g.:

I've always wondered why many distros found it necessary to move to GRUB 2 as the primary bootloader supported. Despite of the fact that GRUB 2 does not have the security features of GRUB Legacy. Here's a quote I retieved from the GRUB 2 development mailing list:

There has been no issue with grub legacy for ages (probably due to
lack of any development whatsoever) but there were at least two
different bugs in Debian grub2 packages which would render a box
unbootable by just upgrading grub2.

The fact is that grub2 is usable for may things but is still under
development and so far is not stable, at least not at the level of
stability users expect from stable or even testing Debian packages.

I would gladly recommend grub2 rescue disk as a backup solution or
feature preview but grub2 as the primary bootloader is a pain in the
backside.


Why move to a new, but unstable system when the old system works quite well? Why not wait until the new system is at or near the same level – features-wise, with the system it is supposed to replace.

(quote from here, 1:39 pm February 11, 2010)
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
User avatar
linuxviolin
Level 8
Level 8
 
Posts: 2055
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: How to revert to grub legacy

Postby DataMan on Tue Mar 16, 2010 4:33 am

Another alternative (a bit more detailed than the above described) is to install a copy of Mint FluxBox. It uses GRUB 1x as the boot loader. Use that as your default boot and you're back to the earlier version.

From there, if you have the real estate, you could use the /boot to build a dedicated GRUB boot partition using 1x GRUB.

This is what I'm doing for dual booting to Mint 6 & 7 64 bit, Mint 6 FluxBox and Window 7 64 bit pro.

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1208
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: How to revert to grub legacy

Postby viking777 on Tue Mar 16, 2010 5:06 am

DataMan wrote:Another alternative (a bit more detailed than the above described) is to install a copy of Mint FluxBox. It uses GRUB 1x as the boot loader. Use that as your default boot and you're back to the earlier version.

From there, if you have the real estate, you could use the /boot to build a dedicated GRUB boot partition using 1x GRUB.

This is what I'm doing for dual booting to Mint 6 & 7 64 bit, Mint 6 FluxBox and Window 7 64 bit pro.

-DataMan


I think your information must be a little out of date, I have two recently installed copies of Mint Fluxbox (about a week old) and they both use grub2. This is one of the reasons I wanted to learn how to revert, and also why I made the post, because nowadays everything is going with grub2 despite the fact that it is still not good enough for anything mainstream. If you look closely at my post you will see the title in my grub menu is:

title Linux Mint 8 Helena - Fluxbox CE, kernel 2.6.31-20-generic


It was Fluxbox CE that I used to practice on!
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: How to revert to grub legacy

Postby DataMan on Tue Mar 16, 2010 12:28 pm

I'll have to check my versions when I get home from work. The version of Fluxbox that I'm using definitely is using GRUB1x but I may be one or more versions behind the current release level.

Thanks,

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1208
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: How to revert to grub legacy

Postby DataMan on Wed Mar 17, 2010 4:53 am

I checked and it is version 6 of FluxBox that I'm running, thus the GRUB1x.

-DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1208
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: How to revert to grub legacy

Postby breaker on Thu Mar 18, 2010 2:54 am

Good edit on the wiki guide.

Alternately, you could probably install GRUB Legacy from a Live CD that has it and build a menu.lst that points directly to your newer (LM 8, Karmic) kernels, etc.

Don't forget GRUB Legacy partitions start with 0 and GRUB2 start with 1 (as far as GRUB devices are concerned).

I'm happy with grub2, but that's another story...
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/
breaker
Level 5
Level 5
 
Posts: 613
Joined: Sun Mar 16, 2008 5:28 am

Re: How to revert to grub legacy

Postby satcowboy on Wed Apr 28, 2010 8:36 pm

Thanks! I set up a grub password on my one machine that uses Grub 2, from a fresh Mint 8 install. It was several weeks before I noticed that an empty password would also work. From the Debian mailing list it looks like passwords may still be in work (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477092). And I find the new Grub confusing. I hosed up the Mint 8 machine trying to reinstall Grub Legacy (the Grub 2 menu pops up but doesn't boot anything). Hopefully this reversion procedure will work out.
satcowboy
Level 1
Level 1
 
Posts: 11
Joined: Sat Oct 17, 2009 11:12 pm

Re: How to revert to grub legacy

Postby Biker on Wed Apr 28, 2010 9:53 pm

I hated Grub (1) with a passion and always used LILO for my boot menus. However, since working with Grub2, I've grown to really like it. It provides more options than Grub, and it's much easier to append commands on an as needed basis. I still despise Grub (1), but Grub2 is pretty good. :)
Linux User #384279
Biker
Level 4
Level 4
 
Posts: 498
Joined: Sat Apr 17, 2010 1:58 am
Location: Where my hat is

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: Bing [Bot] and 10 guests