`cros_sdk` chroot creation should not require explicit --nouse-image when features are unavailable |
||
Issue descriptionIt seems that when this PSA[0] was sent out, using `cros_sdk` to create a new chroot now uses the "chroot snapshot" feature by default. The previous default did not do this. You can find out how your chroot was created if you look for a "chroot.img" in your checkout. The old behaviour can be used by adding the `--nouse-image` option to `cros_sdk`. Since my internal laptop storage is limited, I have my checkouts on an external USB drive. With this setup, I'm not able to enter my chroot if it was created using the "chroot snapshot" feature. I think that we should revert the default to not use chroot snapshots when invoking `cros_sdk` by itself. [0] - https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/yVEWDR7wDfA
,
May 16 2018
Instead of putting the default back, I'd rather fix whatever is preventing it from working on your setup. I don't know of any specific reason why chroot.img couldn't be located on an external drive. Can you provide any additional details about how you have your drive set up?
,
May 16 2018
in this particular case, i don't think it's possible [1] imo, in the scenarios where support is impossible (missing tools, drivers, fs support, etc...), we should only warn (perhaps verbosely), but continue on anyways. we shouldn't be forcing people to opt out of this manually. [1] https://groups.google.com/a/google.com/d/topic/chromeos-chatty-eng/x43kfXy0GZM/discussion
,
May 21 2018
It's just an external SSD which I formatted and created one ext4 partition. I mount and unmount it manually.
,
May 21 2018
I don't know of any reason that wouldn't work. I have chroots all over my system. In general, from inside your chromiumos checkout, you should be able to do cros_sdk --chroot /path/to/chroot to create /path/to/chroot.img, mount it on /path/to/chroot, and enter it. --no-ns-pid and other flags should work normally too. If you make a symlink from chromiumos/chroot to /path/to/chroot, entering without the --chroot flag should also work once /path/to/chroot is mounted (you'll have to redo that part by passing --chroot once after each reboot). The initial thread looks like there was a problem with the loopback device. I've seen some problems where lvmetad caches stale data about loopbacks and then subsequent commands throw out really strange errors. This might be another manifestation of that. If it is, this should be fixed after crrev.com/c/1058071 goes in.
,
Jul 13
|
||
►
Sign in to add a comment |
||
Comment 1 by vapier@chromium.org
, May 16 2018Summary: `cros_sdk` chroot creation should not require explicit --nouse-image when features are unavailable (was: Please restore the default `cros_sdk` chroot creation to not use snapshots.)