You are Here:
Linux Lite 4.6 Final has been released. See the Release Announcements section for more information.



How to clean uninstall Grub2

Author (Read 4555 times)

0 Members and 1 Guest are viewing this topic.

How to clean uninstall Grub2
« on: November 06, 2014, 06:05:34 PM »
 

Kirkx

  • Occasional Poster
  • **
  • 51
    Posts
  • Reputation: 10
  • Linux Lite Member

  • CPU: Athlon 64 3500+ 2.2 GHz

  • MEMORY: 4Gb

  • VIDEO CARD: GeForce 8500 GT / Nvidia 340.76
I use Grub4Dos to boot my linux distros and want to completely get rid of Grub2. Grub2 is a bloated piece of software that makes the process of each kernel update very long, especially when there are multiple Linux versions installed on the same machine. You just get stuck watching the screen showing the message "updating grub configuration file" when Grub2 slowly scans the hard drive.

1) Option #1 is to turn off os-prober:

Code: [Select]
- gksudo to: /etc/default/grub
- add the following line:

GRUB_DISABLE_OS_PROBER=true



This is not too bad, the message "updating grub configuration file" is gone, but there is another one that cycles twice during kernel updates (on my system 2 minutes is wasted on that):

"generating grub configuration file"

2) To get rid of the message shown above you need to completely uninstall Grub2. However, when I try to uninstall it with the command below:

Code: [Select]
sudo apt-get purge grub-pc grub-common grub2-common grub-pc-bin grub-gfxpayload-lists os-prober

I end up with some orphaned files and directories, indicating that the uninstall was not complete and maybe some more packages should have been included in the purge command. I assume that only the files on the screenshot below are really needed for booting (with a bootloader other than Grub2):



I'm not sure if all the files below can be safely deleted manually:









Or is the kernel itself somehow linked to Grub2 by design, in which case deleting Grub2 would not be a good idea even if another bootloader was always used to chainload "vmlinuz" and "initrd.img".

For the record, booting Linux from Grub4Dos is explained here:

http://reboot.pro/topic/20015-booting-linux-from-grub4dos

I have posted this on Ubuntu forums but couldn't get a clear answer:

http://ubuntuforums.org/showthread.php?t=2248645&p=13144614#post13144614
Last Edit: November 07, 2014, 10:37:02 AM by Valtam
LL 2.4, Xubuntu 14.04.2, Debian 8, Manjaro
 


Re: How to clean uninstall Grub2
« Reply #1 on: November 13, 2014, 03:01:12 AM »
 

Kirkx

  • Occasional Poster
  • **
  • 51
    Posts
  • Reputation: 10
  • Linux Lite Member

  • CPU: Athlon 64 3500+ 2.2 GHz

  • MEMORY: 4Gb

  • VIDEO CARD: GeForce 8500 GT / Nvidia 340.76
Update: I have deleted all left over files and directories mentioned in my previous post and Xubuntu booted and worked just fine without them. However, during the subsequent kernel upgrade all of them were reinstalled, so there is really no point going this route. It seems that either apt-get or the kernel itself is designed with Grub2 in mind. I have tested the following procedure with Xubuntu v14.04.1 but the results will likely be the same with LL.

During the kernel upgrade (to v3.13.0-39) the installer initially insists on re-installing all the packages removed as described in my previous post, but don't worry:

Code: [Select]
sudo apt-get -y install  linux-headers-3.13.0-39  linux-headers-3.13.0-39-generic  linux-image-3.13.0-39-generic  linux-image-extra-3.13.0-39-generic

During the process the following window pops-up:



At this point you need to tab to OK (make sure that you do not hit the spacebar by mistake because this would select the disk or partition for Grub2 installation). At the next window click YES (Continue without installing Grub):



And that's it. The message "update/generate grub configuration file" will not show any more.
LL 2.4, Xubuntu 14.04.2, Debian 8, Manjaro
 


Tags:
 


Linux Lite 4.6 Final has been released. See the Release Announcements section for more information.