How can I change the hostname in a chroot environment permanently?
up vote
0
down vote
favorite
I can not change the hostname
in the chroot environment (Ubuntu) I tried hostnamectl set-hostname
but it says:
Failed to create bus connection: Could not find file or folder
Then I tried changing it with hostname
and edited the /etc/hostname
file and put my name in it. Thought it worked but when I burned the finished remastered “.iso on a stick” and booted from it, it didn't work.
chroot hostname
New contributor
|
show 3 more comments
up vote
0
down vote
favorite
I can not change the hostname
in the chroot environment (Ubuntu) I tried hostnamectl set-hostname
but it says:
Failed to create bus connection: Could not find file or folder
Then I tried changing it with hostname
and edited the /etc/hostname
file and put my name in it. Thought it worked but when I burned the finished remastered “.iso on a stick” and booted from it, it didn't work.
chroot hostname
New contributor
It is hard to know what you are asking. It seems that you are using chroot, to create a file-system for copying to an ISO. It also seems that you have changes the file/etc/hostname
, but this change was lost. (this is the right thing to do,hostnamectl
will not be the right thing: you don't want to change the hostname of the machine that you are working on.
– ctrl-alt-delor
yesterday
Hmm.. what am I doing wrong than or is it not even possible to change the hostname and have it final on the remastered iso? I used this instruction gtkdb.de/index_34_1259.html
– kcdk
yesterday
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
– ctrl-alt-delor
yesterday
I am wondering did you change the host-name of the installer or of the installed. Did the file change in ether of these?
– ctrl-alt-delor
yesterday
I changed it in the chroot environment. But it did not effected the root enviroment of my main system
– kcdk
23 hours ago
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I can not change the hostname
in the chroot environment (Ubuntu) I tried hostnamectl set-hostname
but it says:
Failed to create bus connection: Could not find file or folder
Then I tried changing it with hostname
and edited the /etc/hostname
file and put my name in it. Thought it worked but when I burned the finished remastered “.iso on a stick” and booted from it, it didn't work.
chroot hostname
New contributor
I can not change the hostname
in the chroot environment (Ubuntu) I tried hostnamectl set-hostname
but it says:
Failed to create bus connection: Could not find file or folder
Then I tried changing it with hostname
and edited the /etc/hostname
file and put my name in it. Thought it worked but when I burned the finished remastered “.iso on a stick” and booted from it, it didn't work.
chroot hostname
chroot hostname
New contributor
New contributor
edited 5 hours ago
ctrl-alt-delor
9,87031954
9,87031954
New contributor
asked yesterday
kcdk
31
31
New contributor
New contributor
It is hard to know what you are asking. It seems that you are using chroot, to create a file-system for copying to an ISO. It also seems that you have changes the file/etc/hostname
, but this change was lost. (this is the right thing to do,hostnamectl
will not be the right thing: you don't want to change the hostname of the machine that you are working on.
– ctrl-alt-delor
yesterday
Hmm.. what am I doing wrong than or is it not even possible to change the hostname and have it final on the remastered iso? I used this instruction gtkdb.de/index_34_1259.html
– kcdk
yesterday
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
– ctrl-alt-delor
yesterday
I am wondering did you change the host-name of the installer or of the installed. Did the file change in ether of these?
– ctrl-alt-delor
yesterday
I changed it in the chroot environment. But it did not effected the root enviroment of my main system
– kcdk
23 hours ago
|
show 3 more comments
It is hard to know what you are asking. It seems that you are using chroot, to create a file-system for copying to an ISO. It also seems that you have changes the file/etc/hostname
, but this change was lost. (this is the right thing to do,hostnamectl
will not be the right thing: you don't want to change the hostname of the machine that you are working on.
– ctrl-alt-delor
yesterday
Hmm.. what am I doing wrong than or is it not even possible to change the hostname and have it final on the remastered iso? I used this instruction gtkdb.de/index_34_1259.html
– kcdk
yesterday
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
– ctrl-alt-delor
yesterday
I am wondering did you change the host-name of the installer or of the installed. Did the file change in ether of these?
– ctrl-alt-delor
yesterday
I changed it in the chroot environment. But it did not effected the root enviroment of my main system
– kcdk
23 hours ago
It is hard to know what you are asking. It seems that you are using chroot, to create a file-system for copying to an ISO. It also seems that you have changes the file
/etc/hostname
, but this change was lost. (this is the right thing to do, hostnamectl
will not be the right thing: you don't want to change the hostname of the machine that you are working on.– ctrl-alt-delor
yesterday
It is hard to know what you are asking. It seems that you are using chroot, to create a file-system for copying to an ISO. It also seems that you have changes the file
/etc/hostname
, but this change was lost. (this is the right thing to do, hostnamectl
will not be the right thing: you don't want to change the hostname of the machine that you are working on.– ctrl-alt-delor
yesterday
Hmm.. what am I doing wrong than or is it not even possible to change the hostname and have it final on the remastered iso? I used this instruction gtkdb.de/index_34_1259.html
– kcdk
yesterday
Hmm.. what am I doing wrong than or is it not even possible to change the hostname and have it final on the remastered iso? I used this instruction gtkdb.de/index_34_1259.html
– kcdk
yesterday
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
– ctrl-alt-delor
yesterday
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
– ctrl-alt-delor
yesterday
I am wondering did you change the host-name of the installer or of the installed. Did the file change in ether of these?
– ctrl-alt-delor
yesterday
I am wondering did you change the host-name of the installer or of the installed. Did the file change in ether of these?
– ctrl-alt-delor
yesterday
I changed it in the chroot environment. But it did not effected the root enviroment of my main system
– kcdk
23 hours ago
I changed it in the chroot environment. But it did not effected the root enviroment of my main system
– kcdk
23 hours ago
|
show 3 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
1
Both of them are directories: You need an editor, notcd
.
– ctrl-alt-delor
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
1
Both of them are directories: You need an editor, notcd
.
– ctrl-alt-delor
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
add a comment |
up vote
0
down vote
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
1
Both of them are directories: You need an editor, notcd
.
– ctrl-alt-delor
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
add a comment |
up vote
0
down vote
up vote
0
down vote
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
answered yesterday
ctrl-alt-delor
9,87031954
9,87031954
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
1
Both of them are directories: You need an editor, notcd
.
– ctrl-alt-delor
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
add a comment |
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
1
Both of them are directories: You need an editor, notcd
.
– ctrl-alt-delor
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
What I exactly did in the chroot environment is: cd /etc/hosts -> filled in my name and saved cd /etc/hostname -> filled in my name saved When I do hostname it actually shows what I want. Seems right or not?
– kcdk
yesterday
1
1
Both of them are directories: You need an editor, not
cd
.– ctrl-alt-delor
yesterday
Both of them are directories: You need an editor, not
cd
.– ctrl-alt-delor
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
Yes I edited them with nano and saved them. With cd I just went into the folders
– kcdk
yesterday
add a comment |
kcdk is a new contributor. Be nice, and check out our Code of Conduct.
kcdk is a new contributor. Be nice, and check out our Code of Conduct.
kcdk is a new contributor. Be nice, and check out our Code of Conduct.
kcdk is a new contributor. Be nice, and check out our Code of Conduct.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481912%2fhow-can-i-change-the-hostname-in-a-chroot-environment-permanently%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It is hard to know what you are asking. It seems that you are using chroot, to create a file-system for copying to an ISO. It also seems that you have changes the file
/etc/hostname
, but this change was lost. (this is the right thing to do,hostnamectl
will not be the right thing: you don't want to change the hostname of the machine that you are working on.– ctrl-alt-delor
yesterday
Hmm.. what am I doing wrong than or is it not even possible to change the hostname and have it final on the remastered iso? I used this instruction gtkdb.de/index_34_1259.html
– kcdk
yesterday
Editing one file is like editing another. So if the change did not stick, then ether you made a mistake, or have a file editing problem.
– ctrl-alt-delor
yesterday
I am wondering did you change the host-name of the installer or of the installed. Did the file change in ether of these?
– ctrl-alt-delor
yesterday
I changed it in the chroot environment. But it did not effected the root enviroment of my main system
– kcdk
23 hours ago