Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1513808 - grub2 is removed using "dnf autoremove" after update
Summary: grub2 is removed using "dnf autoremove" after update
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 27
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 01:57 UTC by itrombley
Modified: 2018-11-30 22:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 22:55:22 UTC


Attachments (Terms of Use)

Description itrombley 2017-11-16 01:57:31 UTC
Description of problem:
Executing "sudo dnf autoremove" after updating to Fedora 27 from Fedora 26 will remove grub2 and PC will be unbootable.

Version-Release number of selected component (if applicable):


How reproducible:
2 of 2

Steps to Reproduce:
1. Update Fedora 26 to Fedora 27.
2. Execute "sudo dnf autoremove".
3.

Actual results:
grub2 is removed.

Expected results:
grub2 should not be removed.

Additional info:

Comment 1 Michiel Toneman 2018-01-18 11:45:09 UTC
Unfortunately I was bitten by this bug. Being so used to autoremove with apt-get being safe, I overlooked that it was discarding grub2. 

Now looking for a way to recover the system. Any help would be greatly appreciated as I have no idea where to start.

Comment 2 Michiel Toneman 2018-01-18 21:58:16 UTC
(In reply to Michiel Toneman from comment #1)
> Unfortunately I was bitten by this bug. Being so used to autoremove with
> apt-get being safe, I overlooked that it was discarding grub2. 
> 
> Now looking for a way to recover the system. Any help would be greatly
> appreciated as I have no idea where to start.

To answer my own question, I recovered using the following recipe:

1) Create and boot up a live Fedora CD ISO (on USB)
2) Open a terminal and become root with "sudo su -"
3) Mount your EFI VFAT partition (usually /dev/sda1, but YMMV) under /mnt
   
  mount /dev/sda1 /mnt

4) Copy the grub EFI files from the live CD to the EFI partition. e.g.
 
  cp /boot/efi/EFI/fedora/grub*.efi /mnt/EFI/fedora/

5) unmount EFI partition

  umount /mnt

6) reboot

7) if it worked, reinstall grub2 and its dependencies

  sudo dnf install grub2-efi-x64 grub2-pc grub2-tools-efi

Hopefully this works for you if you get stuck.

Comment 3 tgvita 2018-03-09 07:04:55 UTC
can confirm this, what a disaster, even worse than the bumblebee rm -rf incident

Comment 4 tgvita 2018-03-09 07:20:57 UTC
(In reply to Michiel Toneman from comment #2)
> (In reply to Michiel Toneman from comment #1)
> > Unfortunately I was bitten by this bug. Being so used to autoremove with
> > apt-get being safe, I overlooked that it was discarding grub2. 
> > 
> > Now looking for a way to recover the system. Any help would be greatly
> > appreciated as I have no idea where to start.
> 
> To answer my own question, I recovered using the following recipe:
> 
> 1) Create and boot up a live Fedora CD ISO (on USB)
> 2) Open a terminal and become root with "sudo su -"
> 3) Mount your EFI VFAT partition (usually /dev/sda1, but YMMV) under /mnt
>    
>   mount /dev/sda1 /mnt
> 
> 4) Copy the grub EFI files from the live CD to the EFI partition. e.g.
>  
>   cp /boot/efi/EFI/fedora/grub*.efi /mnt/EFI/fedora/
> 
> 5) unmount EFI partition
> 
>   umount /mnt
> 
> 6) reboot
> 
> 7) if it worked, reinstall grub2 and its dependencies
> 
>   sudo dnf install grub2-efi-x64 grub2-pc grub2-tools-efi
> 
> Hopefully this works for you if you get stuck.

step 7, you mean boot into my old-stock-system,and install the grub components?

Comment 5 Michiel Toneman 2018-03-09 08:02:28 UTC
(In reply to tgvita from comment #4)
> (In reply to Michiel Toneman from comment #2)
> > (In reply to Michiel Toneman from comment #1)
> > > Unfortunately I was bitten by this bug. Being so used to autoremove with
> > > apt-get being safe, I overlooked that it was discarding grub2. 
> > > 
> > > Now looking for a way to recover the system. Any help would be greatly
> > > appreciated as I have no idea where to start.
> > 
> > To answer my own question, I recovered using the following recipe:
> > 
> > 1) Create and boot up a live Fedora CD ISO (on USB)
> > 2) Open a terminal and become root with "sudo su -"
> > 3) Mount your EFI VFAT partition (usually /dev/sda1, but YMMV) under /mnt
> >    
> >   mount /dev/sda1 /mnt
> > 
> > 4) Copy the grub EFI files from the live CD to the EFI partition. e.g.
> >  
> >   cp /boot/efi/EFI/fedora/grub*.efi /mnt/EFI/fedora/
> > 
> > 5) unmount EFI partition
> > 
> >   umount /mnt
> > 
> > 6) reboot
> > 
> > 7) if it worked, reinstall grub2 and its dependencies
> > 
> >   sudo dnf install grub2-efi-x64 grub2-pc grub2-tools-efi
> > 
> > Hopefully this works for you if you get stuck.
> 
> step 7, you mean boot into my old-stock-system,and install the grub
> components?

Yes, I was able to boot back into my old-stock-system, but of course I this recipe only restores the minimal EFI files required to boot. Therefore once you are back in, the first thing to do is reinstall the grub2 packages which have been autoremoved. Good luck!

Comment 6 tgvita 2018-03-09 08:15:11 UTC
(In reply to Michiel Toneman from comment #5)
> (In reply to tgvita from comment #4)
> > (In reply to Michiel Toneman from comment #2)
> > > (In reply to Michiel Toneman from comment #1)
> > > > Unfortunately I was bitten by this bug. Being so used to autoremove with
> > > > apt-get being safe, I overlooked that it was discarding grub2. 
> > > > 
> > > > Now looking for a way to recover the system. Any help would be greatly
> > > > appreciated as I have no idea where to start.
> > > 
> > > To answer my own question, I recovered using the following recipe:
> > > 
> > > 1) Create and boot up a live Fedora CD ISO (on USB)
> > > 2) Open a terminal and become root with "sudo su -"
> > > 3) Mount your EFI VFAT partition (usually /dev/sda1, but YMMV) under /mnt
> > >    
> > >   mount /dev/sda1 /mnt
> > > 
> > > 4) Copy the grub EFI files from the live CD to the EFI partition. e.g.
> > >  
> > >   cp /boot/efi/EFI/fedora/grub*.efi /mnt/EFI/fedora/
> > > 
> > > 5) unmount EFI partition
> > > 
> > >   umount /mnt
> > > 
> > > 6) reboot
> > > 
> > > 7) if it worked, reinstall grub2 and its dependencies
> > > 
> > >   sudo dnf install grub2-efi-x64 grub2-pc grub2-tools-efi
> > > 
> > > Hopefully this works for you if you get stuck.
> > 
> > step 7, you mean boot into my old-stock-system,and install the grub
> > components?
> 
> Yes, I was able to boot back into my old-stock-system, but of course I this
> recipe only restores the minimal EFI files required to boot. Therefore once
> you are back in, the first thing to do is reinstall the grub2 packages which
> have been autoremoved. Good luck!
the reason I don't want any clean install is that, nouveau will cause serious crush on my laptop with gtx1060,since it hasn't implemnt the support and I have to disable it manually

Comment 7 br.an02 2018-07-14 12:10:14 UTC
I can confirm that this bug still exists on Fedora 28. I normally use GNOME, but I tested KDE a long time ago. I uninstalled KDE because I never used it, but this caused weird dependency issues. Like an idiot, I ran 'sudo dnf autoremove' and didn't notice the GRUB entry. I am currently backing up my data and will do a clean install.

Comment 8 Robert Hawkins 2018-09-27 10:47:30 UTC
After upgrading to Fedora 28, I ran "dnf upgrade" followed by "dnf autoremove". Among other packages, the following grub packages were selected to be removed:-

 grub2-efi-x64                x86_64 1:2.02-38.fc28              @updates 1.0 M
 grub2-pc                     x86_64 1:2.02-38.fc28              @updates   0  
 grub2-pc-modules             noarch 1:2.02-38.fc28              @updates 2.3 M
 grub2-tools-efi              x86_64 1:2.02-38.fc28              @updates 1.9 M
 grub2-tools-extra            x86_64 1:2.02-38.fc28              @updates 5.9 M

This didn't look good so I didn't continue with the autoremove.

Comment 9 Ben Cotton 2018-11-27 14:20:22 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2018-11-30 22:55:22 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.