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

[Feature Request] Add existing chroot detection BEFORE formatting /dev/xxx7 and offer to mount chroot for "recovery" instead #113

Open
espoelstra opened this issue Nov 2, 2020 · 0 comments

Comments

@espoelstra
Copy link
Contributor

While debugging how to get EFI booting via the AltFW functionality of a newer Chromebook I would have loved to have this to edit the existing grub.cfg and packages rather than wait 10+ minutes to fully redo the Chrx installation of the Linux OS (I have pretty fast internet and an NVME).

I eventually (if you do something painful more than 3 times, automate it) threw together a script to mount things similar to what chrx-install sets up for chrx-install-chroot but instead of running a script I just drop into the $CHRX_INSTALL_ROOT on /dev/sda7 or /dev/nvme0n1p7 (dual booting and not using external media... yet) and end up with the ability to apt install packages and work with files in /boot and /etc.

https://gist.github.com/espoelstra/79a00f372cf6adb815b2815c2fbee215

I think to implement this "safety net" there would be a new flag called "--force-reinstall" or "--ignore-existing" that would trigger a format of the /dev/sda1 or /dev/sda7 (USB vs internal) similar to the current (scary) auto-nuke behavior, but instead of wiping a user's data if they accidentally run chrx and hit Enter instead of Ctrl+C or closing the Crosh window after they set up their dual boot, it will keep their data intact unless they REALLY want to blow it away.

Since ChromeOS doesn't use /boot I think a quick mount of the $CHRX_TARGET_DISK ROOT-C partition and looking for the /boot folder should be a fairly robust way of detecting something other than ChromeOS is present there. I think this slightly "slower" check that requires a mount makes more sense than assuming that just because we have the ROOT-C label that there was a successful installation.

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

No branches or pull requests

1 participant