Crouton: moving chroot onto usb storage?

Created on 2 Aug 2014  Â·  16Comments  Â·  Source: dnschneid/crouton

sudo edit-chroot -m ~/path/for/usb trusty

results in "failed to preserve ownership" errors for all of the following copy commands. what am i doing wrong?

question

Most helpful comment

The default path to chroots is built-in to the crouton scripts but you can
specify a different one with the '-c' option in your 'start*' scripts.

-c CHROOTS Directory the chroots are in. Default: /usr/local/chroots

Like:

sudo startunity -c /media/removable/usb_stick/chroots

You could make an alias to do it for you similar to:

alias s-unity='sudo startunity -c /media/removable/usb_stick/chroots'

DennisL

On Sat, Aug 2, 2014 at 4:23 PM, shadowkrazee [email protected]
wrote:

how can i modify the default path for my chroots? rather than typing my
path each time i begin an ubuntu session?

—
Reply to this email directly or view it on GitHub
https://github.com/dnschneid/crouton/issues/960#issuecomment-50973315.

_DennyL@GMail_

All 16 comments

What filesystem is your USB stick running?

Fat32 i would think, formatted using chrome file manager

should i be trying /dev/sda1 instead?

i tried /media/removable/UNTITLED before.

Formatted to ext4, fixed problem. Thank you for your help! Consider me an admirer of what you do. :)

how can i modify the default path for my chroots? rather than typing my path each time i begin an ubuntu session?

The default path to chroots is built-in to the crouton scripts but you can
specify a different one with the '-c' option in your 'start*' scripts.

-c CHROOTS Directory the chroots are in. Default: /usr/local/chroots

Like:

sudo startunity -c /media/removable/usb_stick/chroots

You could make an alias to do it for you similar to:

alias s-unity='sudo startunity -c /media/removable/usb_stick/chroots'

DennisL

On Sat, Aug 2, 2014 at 4:23 PM, shadowkrazee [email protected]
wrote:

how can i modify the default path for my chroots? rather than typing my
path each time i begin an ubuntu session?

—
Reply to this email directly or view it on GitHub
https://github.com/dnschneid/crouton/issues/960#issuecomment-50973315.

_DennyL@GMail_

THANKS! the alias command works like a charm. one last question though?
is there any way to make an executable shell script that i can pin to my shelf on chromeos? or a keyboard shortcut? my .sh files open with a text editor, and i cant find any way to assign a terminal as the default. or a real terminal program to begin with. sorry, i'm a chromeos user as of yesterday.

Okay, alias works for only the current shell, when a new shell is opened the alias is missing and must be set again. one more command to make that a permanent fix?

You can add alias definitions to your '.bashrc' script or make a
'.bash_aliases' file that contains all of your custom alias definitions,
that's what I do. That way, they're part of each and every shell you open.

Here's a snippet I have in my .bashrc:

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

[ -f ~/.bash_aliases ] && . ~/.bash_aliases

-DennisL

On Sat, Aug 2, 2014 at 6:13 PM, shadowkrazee [email protected]
wrote:

Okay, alias works for only the current shell, when a new shell is opened
the alias is missing and must be set again. one more command to make that a
permanent fix?

—
Reply to this email directly or view it on GitHub
https://github.com/dnschneid/crouton/issues/960#issuecomment-50976049.

_DennyL@GMail_

is there any way to make an executable shell script that i can pin to my shelf on chromeos? or a keyboard shortcut? my .sh files open with a text editor, and i cant find any way to assign a terminal as the default. or a real terminal program to begin with. sorry, i'm a chromeos user as of yesterday.

Unfortunately no, or at least, not yet. It's been discussed a little here - https://github.com/dnschneid/crouton/issues/847#issuecomment-44410281

impressive stuff.. thank you shadowkrazee and DennisLfromGA. i put a 64GB chip in my c720 and found out i'm down to 1+ gigs of free space and thinking of moving it to a usb 3 external drive to let it grow some more..

lately though i have been using crouton in command line only.

a quick question i have yet to find a definitive yes/no on. using your examples from earlier i can move the crouton off local and onto a drive, am I correct in thinking it will expanded as needed their too? or will i need to format my external drive? (even though i've been using crouton for year i'm still a little fuzzy in a few areas).

i am thinking of doing the following.. move the current crouton to a big usb 3 drive so when i need to use a full gui experience it will be available to me. Next i'll power wash chromebook and create a fresh crouton but more focused on command line only (think i understand the how to do that from the github page).

@c0d3rm0nk3y,

...am I correct in thinking it will expanded as needed their too? or will i need to format my external drive?

If you use -
sudo edit-chroot [chrootname] -m /path/to/external/drive/chroots/chrootname,
it will copy/move the entire chroot to the external drive.

If you use -
sudo sh ~/Downloads/crouton -f [path/to/tarball] -p /path/to/external/drive/
or
sudo edit-chroot -r -f [path/to/tarball] -c /path/to/external/drive/chroots -- [chrootname]
to restore a backed-up chroot, it will untar and uncompress it to the external drive.

_In either case, however, the script checks to ensure the external drive is of an ext2/3/4 format._
There's a note listed under the edit-chroot -m option that says:
"If you are moving a chroot to a SD card/USB drive, make sure the storage is formatted to ext2/3/4."

@DennisLfromGA i want to run 'sudo sh ~/Downloads/crouton -n sana -u'but i've installed sana to '/media/removable/USB/chroots' and i don't know how to change the default chroot path to do that, because crouton looks for chroots in the default folder, but there is nothing. Any help appreciated

@liamhetkoekie - As mentioned a little earlier in this thread, just use crouton's '-p' option to specify the parent folder of where your chroot(s) reside. Something like this should work:

sudo sh ~/Downloads/crouton -n sana -p /media/removable/USB -u

In case anyone else starts reading this thread, commands to run the chroot off of external media have since broken, please read https://github.com/dnschneid/crouton/issues/4026

@radumas,

The method to install and run the crouton script has changed as mentioned in #4026, this doesn't break or affect how you run the chroot off of external media.

That has changed though with previous measures of tightening down security, see the following paragraph for more details about the new methods -

Hope this helps,
-DennisLfromGA

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shichuzhu picture shichuzhu  Â·  5Comments

jimmybungalo picture jimmybungalo  Â·  4Comments

jeremyckahn picture jeremyckahn  Â·  5Comments

BRFNGRNBWS picture BRFNGRNBWS  Â·  3Comments

rossjrw picture rossjrw  Â·  5Comments