Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fallback mechanism in GRUB to automatically recover unbootable system #26332

Open
bachp opened this issue Jun 2, 2017 · 9 comments
Open

Comments

@bachp
Copy link
Member

bachp commented Jun 2, 2017

Issue description

It would be nice if a machine broken configuration would automatically recover into an older generation.
I found that GRUB is supporting fallback which could be used to achieve this.

The machine would try to boot and if the boot fails for some reason it grub would start the previous generation. Other boot loaders probably have similar functionality.

This is especially useful on machines where you don't have access during the boot. For example on AWS I was unable to rollback after a miss configuration because the system couldn't mount the rootfs. A fallback mechanism like would have saved me 😉

@mmahut
Copy link
Member

mmahut commented Aug 25, 2019

Are there any updates on this issue, please?

@bachp
Copy link
Member Author

bachp commented Aug 25, 2019

I havent' been working on this. But still think it would be nice to be able to use NixOS in a way similar to (Fedora) CoreOS.

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@bachp
Copy link
Member Author

bachp commented Jun 2, 2020

This is still relevant

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@theduke
Copy link
Contributor

theduke commented Oct 16, 2020

I just ran into a situation where a wrong configuration broke the boot process.

A fallback mechanism would be amazing!

@stale
Copy link

stale bot commented Apr 18, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 18, 2021
@ccie18643
Copy link

This is still relevant.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 23, 2022
@n8henrie
Copy link
Contributor

n8henrie commented Sep 19, 2023

Somehow I end up with a non-bootable system semi-frequently (often messing with hardware or kernel options on my several nixos Raspberry Pis). This would be really nice (my Pi4 uses grub, so if grub is required it may still be possible).

EDIT: Currently dealing with this with a remote headless Pi and nixos-rebuild switched without trouble but seems lost after I attempted to reboot. Going to be a few weeks before I can travel to the device and manually revert the boot option.

@dscottboggs
Copy link

Just want to leave a note here, this is from K900 in the Matrix chat:

The way this will likely happen is via systemd-boot and automatic boot assessment
We don't support it yet
But we will eventually probably

So for anyone else interested in this, Grub is the wrong place to look.

It also appears that some progress has been made already on this in #84204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants