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

chroot alternative mechanism for x64 #2499

Closed
perpen opened this issue Mar 26, 2016 · 5 comments
Closed

chroot alternative mechanism for x64 #2499

perpen opened this issue Mar 26, 2016 · 5 comments

Comments

@perpen
Copy link

perpen commented Mar 26, 2016

For some time I have been running containers in various forms on top of Chrome OS, without crouton. My main motivation was to be able to use Arch Linux and systemd in the exact same way as on a standalone install.

My latest implementation uses https://github.com/opencontainers/runc, which is an ongoing effort to run containers following the Open Containers standard. You probably don't care about the standard, but the nice thing here is that it is very easy to create and configure containers with various capabilities.

The main files I used for this on https://github.com/perpen/chromeos-runc
Just look at these 2 files to understand how the containers are created:

Pretty neat!

I have been using this setup without any issues, only taking from crouton the xiwi stuff (to make xiwi work I had to change croutonfindnacl). I didn't bother with audio as I just use xiwi for running IntelliJ or Blender but it would be trivial to add.

I had more ideas about how to improve (mostly simplify) crouton but given the uncertainty around the future of Chrome OS I don't want to invest my time. I am jumping ship for now and I replaced ChromeOS with native Linux. Thank you to all the crouton devs, this is an amazing project.

@DennisLfromGA
Copy link
Collaborator

@perpen -

Sorry to see you give up on Chrome OS so soon, I think it has lots of promise and a great future.

It think it would indeed be very advantageous to get 'crouton' running in LXC containers or a minijail instead of a chroot for lots of reasons. A very prominent 'crouton' developer talked about it here #364 (comment) but I believe the developers have been much too busy to make any more headway on it - hopefully I'm all wrong about that though. ;)

-DennisL

@perpen
Copy link
Author

perpen commented Mar 26, 2016

Hi @DennisLfromGA, sorry I have been unclear: I think something very much like Chrome OS has a great future, but not necessarily the current implementation (betting it will be replaced by some form of Android). And this jeopardizes crouton-type technologies.
Plus none of our devs bothered getting containers to work already (and it would have been easier for them than for me), even though the value is obvious, like drinkcat mentions in your comment. I may be reading too much into this, but it makes me think they know or guess something else is around the corner.

And I think the future is elsewhere: e.g. for a while my main dev box was a Digital Ocean vm. I would do most of my work there via the Chrome ssh app and tmux, and the few times when X11 was required I connected to the box with Chrome Remote Desktop.
It's only when I bought my Pixel LS that I felt I had to use this nice expensive h/w, and so went back to my containers on the chromebook.
But after 2 or 3 years working like this I have forgotten what it was like to run Linux natively, and I want to experience it again, if only for comparison (so far 1 obvious advantage: I can group Chrome windows and shells and editors together into different workspaces according to the type of work, and switch between them in an instant with one keypress, makes it much easier to multitask)

I may come back to Chrome OS, but I doubt I'll be running anything locally in chroots or containers.

@perpen perpen closed this as completed Mar 26, 2016
@DennisLfromGA
Copy link
Collaborator

@perpen - Makes sense and is understandable.

Since you have a Pixel though and probably have more than a 16GB SSD, you might want to check out the 'chrx' project. I know of others that run it on a Pixel and I run it on my Dell Chromebook 13 (i5/8GB/32GB), it works well.

-DennisL

P.S. Thanx for closing the issue.

@dragon788
Copy link

@perpen one way to "virtually" do the same thing is to login with multiple Gmail accounts and enable the "fast user switching" aka multiple logged in profiles in Chrome and then you can just Ctrl+Alt+comma or period to switch between "workspaces".
I'm really interested to play with your work on runc on my various Chromebooks to see how it runs. I too enjoy some of the benefits of Linux without having to do crouton and remember to manage chroots by starting/stopping them to maintain better battery life. I second the recommendation to check out Chrx.org for dual booting, you can even do an install entirely to USB to avoid wearing out the internal flash on your Chromebook.
Myself and a friend are very much the same way as you when it comes to running applications on DigitalOcean/AWS/Azure/GCE for development and deployment, but there are times when it is handy to be offline and able to run applications locally for demonstration or getting packages running on ChromeOS that would otherwise conflict or have missing files in the minimal Gentoo-ish underlying OS. Hope we see you back here again in the future!

@DennisLfromGA
Copy link
Collaborator

New commands have recently been added to CrOS for containers & vm's and I think there's still a lot more to come. Check out this r/chromeos article for some facts and speculation:

-DennisLfromGA

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

3 participants