Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 10 - Debootstrap not working

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Molipate
Posts: 3
Joined: 2019-08-16 12:03

Debian 10 - Debootstrap not working

#1 Post by Molipate »

Hi everyone

I try to create a chroot with a bash script ; but debootstrap is not working, i've already done that many times, without any problems ...
Here is the (very simple) script :

Code: Select all

#!/bin/bash

ARCHITECTURE=$1 #amd64
DISTRIBUTION=$2 #stretch
PATH=$3 #/srv/test_chroot

debootstrap --arch=$ARCHITECTURE $DISTRIBUTION $PATH
It keeps telling me "./installScript.sh: ligne 10: debootstrap: No such file or directory" ; but when I manually run "debootstrap stable test_chroot" it works fine ...
Does any one knows why ?

Thx

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian 10 - Debootstrap not working

#2 Post by Dai_trying »

Your debootstrap command is #line 7 so the error is three lines further down the script. or it could be that you haven't "quoted" your variables?.?.?. causing a confusion with the line numbers

Molipate
Posts: 3
Joined: 2019-08-16 12:03

Re: Debian 10 - Debootstrap not working

#3 Post by Molipate »

Putting quotes around variables does not change the problem ; but this works fine :

Code: Select all

debootstrap --arch='amd64' 'stable' 'test_chroot'

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian 10 - Debootstrap not working

#4 Post by Dai_trying »

Molipate wrote:Putting quotes around variables does not change the problem ; but this works fine :

Code: Select all

debootstrap --arch='amd64' 'stable' 'test_chroot'
Maybe I misunderstood this but are you saying quotes make no difference but what you posted (with single quotes) does work???

EDIT:
and 'test_chroot' is not the same as /srv/test_chroot

Molipate
Posts: 3
Joined: 2019-08-16 12:03

Re: Debian 10 - Debootstrap not working

#5 Post by Molipate »

Yes if i replace variables by their content,it does work ...
What do you mean by 'is not the same' ? I run script as root if that's you mean

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Debian 10 - Debootstrap not working

#6 Post by L_V »

The title is wrong. Deboostrap is working fine.
Your problem is not deboostrap which is not working, but your script which seems useless.
Or try this, although I don't see why you need a script.

Code: Select all

#!/bin/bash

# ARCHITECTURE=$1 #amd64
# DISTRIBUTION=$2 #stretch
# PATH=$3 #/srv/test_chroot

debootstrap --arch $1 $2 $3

Post Reply