chrx
chrx copied to clipboard
ChromeOS recovered on next reboot
I had an unfortunate first experience with chrx I would like to share. I hope this won't happen to anyone else. I followed the instruction on https://wiki.galliumos.org/Installing and ran
curl -O https://chrx.org/go && sh go
It displayed a prompt, asking for the number of GB for the Linux partition size. I didn't enter any number. Instead, I pressed ctrl-c to cancel the process and get a backup of my files before installing GalliumOS.
The next day I booted my chromebook and all my files were deleted, I was left with a recovered vanilla factory ChromeOS. All my files (including those in directories other than ~/Download created via crouton) are gone. Everything is fresh. The script did something too early and didn't proper inform me about it.
Please make the script explicit about what it is doing and changing on each step that it is doing it, and explain what the side-effects of choosing each option is, and ask user before making important or irreversible changes. Thanks.
When you switch to Developer Mode, ChromeOS erases all user data. This is a security feature of ChromeOS and has nothing to do with GalliumOS or chrx.
Switching to Developer Mode is the first required step when installing an alternate operating system. ChromeOS warns you that it will clear user data, and gives you the option of aborting.
Could this be the problem you ran into?
Thanks for your reply . I was in Developer Mode because I was a crouton user.
After reading this comment, I thought it might also be worth noting that before my last ChromeOS+crouton boot (the one that caused the recovering) the battery of my chromebook (C720) was drained. Could this be related?
I am not too concerned about this anymore, but to make sure this won't happen again, I was wondering if I could know all the possible reasons that a chromebook could recover and delete the files. I want to use it as my main machine, so I want to make sure it won't recover by mistake. Thanks!
@siadat I haven't been able to test your description yet, but I am still planning to do so. The code does not repartition the drive unless it gets a valid size input.
I can't claim to know all the possible reasons ChromeOS would repair itself. In my development and testing, I've only seen it happen when the disk has been repartitioned. ("Recovery" is an entirely different process from the repair that happens after repartitioning -- Recovery requires a ChromeOS Recovery Image on USB/SD, and is never required as part of a chrx install).
The battery drain will clear your crossystem flags, which will prevent legacy boot. The necessary flag is set in the chrx install, so you might not have noticed that. The workaround is to set GBB flags, which requires removing the WP screw. See https://wiki.galliumos.org/Firmware and https://mrchromebox.tech/ for more info there.