You are not logged in.

#1 2018-11-28 14:24

Ceel
Member
Registered: 2018-11-28
Posts: 4

Why GRUB 2 is automatically re-installed after updating the kernel?

Hi there,

I've discovered Q4OS a few months ago and installed it from an installation Live (release 2.4). I'd like to install it on other computers, but......

  1. If the installer didn't ask me for installing a bootloader, when installation was completed, after reboot my bootloader were overwritten with GRUB2. Not cool sad How can I avoid that GRUB 2 is installed at installation?

  2. It seems (this happened at least 5 times) that each time the kernel is updated, GRUB2 is re-installed. I've

    chmod -x /usr/sbin/grub-install

    but don't find it is a smart solution.
    Is there another way to block the re-installation of GRUB 2 and why the Update Manager needs to re-install it ? bug ?

I need to use another bootloader and don't want GRUB 2.

Many thanks.

Offline

#2 2018-11-28 15:51

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,393
Website

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

I always use the Live-Cd for my installations and one of the options available is to not install grub, I think this will allow you to use another bootloader and as grub should not be installed it should not be able to automatically update.

I have not specifically tested this but I am sure it should work. smile

Offline

#3 2018-11-28 16:20

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 1,993
Website

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

You can use Live media to avoid Grub installation at install time, as quoted above by Dai_trying.

Ceel wrote:

It seems (this happened at least 5 times) that each time the kernel is updated, GRUB2 is re-installed. ... and why the Update Manager needs to re-install it ?

Grub bootloader is reinstalled by Debian subsystem, each time Linux kernel is upgraded, it isn't update manager nor Q4OS specific task.

Ceel wrote:

Is there another way to block the re-installation of GRUB 2 ...

You only need to remove "grub-install", so run in terminal:
$ sudo apt autoremove grub2-common

Offline

#4 2018-11-29 20:25

Ceel
Member
Registered: 2018-11-28
Posts: 4

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

Thanks @ Dai_trying and Q4OS Team for your answers.

Don't you think it would be good to indicate in the documentation that the installation Live does install automatically GRUB 2?
No intention to modify the installation script? Anyway, now I know it, I'll use the Live ISO. I used an installation Live because I tested Q4OS on an old computer with only 256 MB RAM. That wasnt enough to boot a LiveCD. But I'll never install Q4OS on so "poor" computers.


Q4OS Team wrote:

Grub bootloader is reinstalled by Debian subsystem, each time Linux kernel is upgraded, it isn't update manager nor Q4OS specific task.

What a strange idea! I installed Debian only once, in dual boot; I guess the owner of the computer still uses his Windows 8 or doesn't do any updates... or he would have called me...
Well this is annoying. But Ok I will remove the GRUB 2 package and will use another distro when I need to install GRUB 2 on a media.

Thanks again!

Ooops, I forgot: good distro! Just have to learn it now.

Last edited by Ceel (2018-12-03 20:53)

Offline

#5 2018-11-30 08:41

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 1,993
Website

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

We haven't written it correctly, sorry. Debian doesn't reinstall Grub, but does "update-grub" only, what actually means it doesn't reinstall, but only updates grub configuration in the process of kernel upgrade. It's definitely needed to boot the new kernel.

If your system really performs Grub re-installation on every upgrade, something goes quite wrong. Q4OS itself should never instigate the Grub re-installation on upgrade.

Do you use EFI system or legacy BIOS ? Would you provide the "apt" log to check it ? Please run in terminal:
$ tar cvzf /tmp/apt.log.tgz /var/log/apt
and attach the "/tmp/apt.log.tgz" file here.

We could definitely mention the Grub2 installation in our documentation, anyway thanks for the suggestion and reporting.

Offline

#6 2018-12-03 20:42

Ceel
Member
Registered: 2018-11-28
Posts: 4

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

Hi Q4OS Team,

Q4OS is installed on an old Pentium IV (32bit) with legacy BIOS. GRUB 2 came back always after an update ended with the message "System has received security fixes and important updates. Please Reboot your computer as soon as possible to complete the upgrade." But I can't say if it is each time the message is displayed. What I'm sure each time GRUB 2 came back, each time the kernel was upgraded.

Here attached the apt.log.tgz file. Thanks for your interest to my problem.

Last edited by Ceel (2018-12-03 20:54)


Attachments:
tgz apt.log.tgz, Size: 109.75 KiB, Downloads: 6

Offline

#7 2018-12-05 09:05

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 1,993
Website

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

We cannot find any sign of Grub reinstall in the apt logs. What bootloader do you use ?
As we are not able to reproduce the issue, we would need to do some testing on your side. Please install back your bootloader manually, post the steps proceeded here, reboot to Q4OS and run in terminal:
$ sudo update-grub
Is your bootloader rewritten now ?

Offline

#8 2018-12-05 19:53

Ceel
Member
Registered: 2018-11-28
Posts: 4

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

What bootloader do you use ?

GRUB4DOS release 0.4.4

Please install back your bootloader manually, post the steps proceeded here

From my main distro:

# grub-install --root-directory=/home /dev/sda
Installation finished. No error reported.
This is the contents of the device map /home/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)	/dev/fd0
(hd0)	/dev/sda
#

My configuration is (only 1 HD):
sda1= linux-swap
sda2= linux distro (main, EXT3)
sda3= separate /home (for main only, EXT2)
sda4= extended partition
    sda5= Q4OS (EXT3)
    sda6= linux distro (experimental, EXT3)

Main and experimental linux distros haven't the GRUB 2 package installed; only GRUB4DOS.

reboot to Q4OS and run in terminal:
$ sudo update-grub
Is your bootloader rewritten now ?

  • Made the grub-install file executable again,

  • modified /etc/grub.d/40_custom,

  • ran update-grub,

  • checked /boot/grub/grub.cfg has been updated

  • and reboot -> GRUB4DOS still here smile.

I'm going to keep grub-install executable and will note what packages are going to be upgraded before each next updates.
I'll let you know when GRUB 2 will be back and the list of the upgraded packages.
Do you want the apt logs just after GRUB 2 is back?

Offline

#9 2018-12-07 08:37

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 1,993
Website

Re: Why GRUB 2 is automatically re-installed after updating the kernel?

Yes, please post apt logs after GRUB gets back again. We will perform some more testing based on the information you have provided and post here. Thanks for detailed reporting.

Offline

Board footer

Powered by FluxBB