How to copy/paste list of commands with chroot

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I want to create a script that executes the following commands, one after the other. The problem is the chroot command: everything after that command is not copied into the chroot environment as I want it. It is just copied into the normal terminal and executes after I exit from the chroot. Any ideas how to achieve this?
mkdir $HOME/live_boot
sudo debootstrap
--arch=amd64
--variant=minbase
stretch $HOME/live_boot/chroot
http://ftp.ch.debian.org/debian/
sudo chroot $HOME/live_boot/chroot
echo "TESTDEBIAN" > /etc/hostname
apt-get update &&
apt-get install -y --no-install-recommends
xserver-xorg-input-all xserver-xorg-video-fbdev xorg
linux-image-amd64 live-boot nano vim network-manager
debian terminal chroot
add a comment |Â
up vote
0
down vote
favorite
I want to create a script that executes the following commands, one after the other. The problem is the chroot command: everything after that command is not copied into the chroot environment as I want it. It is just copied into the normal terminal and executes after I exit from the chroot. Any ideas how to achieve this?
mkdir $HOME/live_boot
sudo debootstrap
--arch=amd64
--variant=minbase
stretch $HOME/live_boot/chroot
http://ftp.ch.debian.org/debian/
sudo chroot $HOME/live_boot/chroot
echo "TESTDEBIAN" > /etc/hostname
apt-get update &&
apt-get install -y --no-install-recommends
xserver-xorg-input-all xserver-xorg-video-fbdev xorg
linux-image-amd64 live-boot nano vim network-manager
debian terminal chroot
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to create a script that executes the following commands, one after the other. The problem is the chroot command: everything after that command is not copied into the chroot environment as I want it. It is just copied into the normal terminal and executes after I exit from the chroot. Any ideas how to achieve this?
mkdir $HOME/live_boot
sudo debootstrap
--arch=amd64
--variant=minbase
stretch $HOME/live_boot/chroot
http://ftp.ch.debian.org/debian/
sudo chroot $HOME/live_boot/chroot
echo "TESTDEBIAN" > /etc/hostname
apt-get update &&
apt-get install -y --no-install-recommends
xserver-xorg-input-all xserver-xorg-video-fbdev xorg
linux-image-amd64 live-boot nano vim network-manager
debian terminal chroot
I want to create a script that executes the following commands, one after the other. The problem is the chroot command: everything after that command is not copied into the chroot environment as I want it. It is just copied into the normal terminal and executes after I exit from the chroot. Any ideas how to achieve this?
mkdir $HOME/live_boot
sudo debootstrap
--arch=amd64
--variant=minbase
stretch $HOME/live_boot/chroot
http://ftp.ch.debian.org/debian/
sudo chroot $HOME/live_boot/chroot
echo "TESTDEBIAN" > /etc/hostname
apt-get update &&
apt-get install -y --no-install-recommends
xserver-xorg-input-all xserver-xorg-video-fbdev xorg
linux-image-amd64 live-boot nano vim network-manager
debian terminal chroot
edited May 9 at 14:58
Kusalananda
102k13199315
102k13199315
asked May 9 at 14:53
Alice Delia
12
12
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
chroot accepts passing a command, so I would put the relevant commands into a script an run this script as a chroot argument.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
chroot accepts passing a command, so I would put the relevant commands into a script an run this script as a chroot argument.
add a comment |Â
up vote
1
down vote
chroot accepts passing a command, so I would put the relevant commands into a script an run this script as a chroot argument.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
chroot accepts passing a command, so I would put the relevant commands into a script an run this script as a chroot argument.
chroot accepts passing a command, so I would put the relevant commands into a script an run this script as a chroot argument.
answered May 9 at 15:17
tonioc
1,11457
1,11457
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442797%2fhow-to-copy-paste-list-of-commands-with-chroot%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password