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

auto-detect, prompt for potential root devices in case the root= device is misconfigured or missing #2589

Open
adrelanos opened this issue Dec 15, 2023 · 2 comments · May be fixed by dracut-ng/dracut-ng#694
Labels
enhancement Issue adding new functionality

Comments

@adrelanos
Copy link

It might not be possible to auto-detect the root device in very complex cases (custom dual boot setups, network boot) but how about auto detection for the most common cases such as common environments set up by the Fedora or Debian installers?

Maybe dracut developers think root device auto detection bad idea? Maybe it's considered insecure as it risks booting the wrong device? If so, they probably have a valid point. Then how about auto detection of potential root devices but prompt the user before booting from an auto detected root device? Or otherwise provide more guidance than a dracut rescue shell?

That seems better to me than dropping to a dracut rescue shell. A situation most users will be stuck with.

@user7z
Copy link

user7z commented Jul 1, 2024

iam stuck with it at the moment see https://github.com/dracutdevs/dracut/issues/2659
i cant boot my system with dracut , mkinitcpio do it well

@ArrayBolt3
Copy link

There is some risk in blindly autodetecting the root drive in the event it is not specified or cannot be found, since it's possible that an attached device could be malicious and use a filesystem bug to compromise the machine's kernel. This is probably a very rare kind of attack to have to defend against, but for security-centric distros it could be a dealbreaker. This is part of why GRUB no longer runs os-prober by default (it has to mount things to scan them). This is a risk even if automatic boot is not done.

What might be very useful is to make an autodetect script that the user can voluntarily run from the rescue shell. The shell could then advertise this script to the user with a message such as Run 'find-root' to attempt to automatically find the root device and continue bootup. The script could potentially be set to automatically run if configured by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue adding new functionality
Projects
None yet
3 participants