HOWTO: Switch from LILO to Grub

Post Reply
bobo
Douche bag
Posts: 78
Joined: 17. Feb 2015, 16:37
Location: Panama

HOWTO: Switch from LILO to Grub

Post by bobo » 5. Apr 2015, 19:42

If for whatever reason you want/need to move to Grub:

Code: Select all

1.# slapt-get --remove lilo
2.# slapt-get -i grub
3.# grub-install /dev/sda    -(will install Grub to the MBR)
4.# update-grub
5.# reboot
For the following OSes, omit the boot installation (lilo or grub) reboot to the first OS and do:

Code: Select all

#update-grub
#reboot
Desktop: Celeron - 2 GB RAM - HD 160 GB - Slackel/Salix - icewm/jwm - Grub
KISS: Keep It Simple, Stupid

User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: HOWTO: Switch from LILO to Grub

Post by knome » 6. Apr 2015, 00:01

Can you confirm you have tested this and were able to reboot without problems. During my recent experiments with UEFI booting I noticed update-grub would write a grub.cfg.new file instead of the required grub.cfg. I assumed this was a current bug for grub but it may have just been me and my pet gremlin.
Image

bobo
Douche bag
Posts: 78
Joined: 17. Feb 2015, 16:37
Location: Panama

Re: HOWTO: Switch from LILO to Grub

Post by bobo » 6. Apr 2015, 04:06

Hi knome: sorry for the delay. I wasn't home.

I can see your concern. This is a fresh install i did this morning after wiping my hd clean with 'shred', i left LILO in place, till i read your post. In the past, i've done this several times and no problem with Salix and Slackel. Salix grub is not pretty as Slackel's. But worked perfectly. I'm about to reboot now, i will let you know when i come back from the reboot.

Code: Select all

bobo[~]$ sudo slapt-get --remove lilo
Reading Package Lists...Done
The following packages will be REMOVED:
  lilo 
0 upgraded, 0 reinstalled, 0 newly installed, 1 to remove, 0 not upgraded.
After unpacking 1.5MB disk space will be freed.
Do you want to continue? [y/N] y

Removing package lilo-24.0-x86_64-1gv...
Done
bobo[~]$ spii grub
Reading Package Lists...Done
The following NEW packages will be installed:
  grub 
0 upgraded, 0 reinstalled, 1 newly installed, 0 to remove, 0 not upgraded.
Need to get 9.8MB of archives.
After unpacking 39.3MB of additional disk space will be used.
1/1 Get http://salix.hostingxtreme.com/x86_64/14.1/ grub 2.00-x86_64-6cp [9.8MB]...Done

Preparing to install grub-2.00-x86_64-6cp
Installing package grub-2.00-x86_64-6cp...
| grub (the second GNU GRand Unified Bootloader)
| 
| GRUB 2 has been rewritten from scratch to clean up everything for
| modularity and portability.
| Features are: Scripting support, Graphical interface, Rescue mode,
| cross-platform and many more
| Briefly, boot loader is the first software program that runs when a
| computer starts. It is responsible for loading and transferring
| control to the operating system kernel software (such as the Hurd or
| the Linux). The kernel initializes the rest of the operating system.
| * gettextvar, eval, getdate commands added.
| 
| 
Done
bobo[~]$ sudo grub-install /dev/sda
Installation finished. No error reported.
bobo[~]$ sudo update-grub
Generating grub.cfg ...
Found background: /boot/grub/salix.png
Found linux image: /boot/vmlinuz-huge-3.10.17
  No volume groups found
Found Slackware Linux (Slackware 14.1) on /dev/sda2
done
bobo[~]$ sudo reboot
Hi again knome, just rebooted, no problem, perfect. This is no laptop as you can see from my signature. Lemme check my BIOS about this UEFI thing.

The first time i did it, i knew if it failed i could always reinstall Salix, but every mind is a different world.
If you are worried, DON'T DO IT and be happy with what you got. :)

PD: Just checked my BIOS, it doesn't make any mention of UEFI, it mentions "Legacy devices" it's an ASROCK MB.
Last edited by bobo on 8. Apr 2015, 18:57, edited 1 time in total.
Desktop: Celeron - 2 GB RAM - HD 160 GB - Slackel/Salix - icewm/jwm - Grub
KISS: Keep It Simple, Stupid

User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: HOWTO: Switch from LILO to Grub

Post by knome » 6. Apr 2015, 09:05

Hi bobo. Thanks for the reply. Forget the UEFI thing - that's a separate issue which depends on your hardware. Grub works with UEFI and legacy booting.

It's just i noticed that a fresh install of, for example, Xubuntu would set up grub all fine and dandy but whenever doing update-grub in Salix or Xubuntu it would only write a grub.cfg.new which had to be manually amended to grub.cfg.

You've tested and your code quote confirms the grub.cfg generation so all OK.
Image

elcore
Posts: 40
Joined: 4. Jul 2014, 05:07
Location: EU

Re: HOWTO: Switch from LILO to Grub

Post by elcore » 8. Apr 2015, 13:52

knome wrote:It's just i noticed that a fresh install of, for example, Xubuntu would set up grub all fine and dandy but whenever doing update-grub in Salix or Xubuntu it would only write a grub.cfg.new which had to be manually amended to grub.cfg.
It's not all that fine, most recent LTS removed the option 'not to install grub' so it breaks MBR every time.
Installer automatically overwrites whatever you have in MBR without asking. This happens also on mint and everything else that's ubuntu based.

goossbears
Posts: 3
Joined: 22. Jun 2016, 00:25

Re: HOWTO: Switch from LILO to Grub

Post by goossbears » 23. Jun 2016, 15:02

It's just i noticed that a fresh install of, for example, Xubuntu would set up grub all fine and dandy but whenever doing update-grub in Salix or Xubuntu it would only write a grub.cfg.new which had to be manually amended to grub.cfg.
FWIW, similar thing for 'update-grub' in GRUB2 of a fresh install of Debian testing/"stretch" (https://www.debian.org/releases/stretch/) over Salix.
Even after running a post-"stretch"-installation 'update-grub', have had to manually change just the /boot/grub/grub.cfg entries to properly load Salix :/

Post Reply