Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installation betreten der neuen Umgebung per Script?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Tinitus
Veteran
Veteran


Joined: 20 Sep 2004
Posts: 1754

PostPosted: Sun Jan 27, 2008 1:41 pm    Post subject: Installation betreten der neuen Umgebung per Script? Reply with quote

Hallo,

wie müßte ein Script aussehen um die Schritte zum "Betreten des neuen Systems" zu automatisiern?

mounten ist klar...aber das mit dem chroot und env-update klappt noch nicht?

G. R.
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 614
Location: Munich, Germany

PostPosted: Sun Jan 27, 2008 1:57 pm    Post subject: Reply with quote

Code:
#!/bin/bash
chroot /mnt/gentoo /bin/bash -c "env-update && bash"

_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Jan 27, 2008 2:22 pm    Post subject: Reply with quote

Und wenn du das mounten auch noch automatisieren möchtest.
Code:
#! /bin/bash

swapon /dev/hda2
mount /dev/hda3 /mnt/gentoo/
mount /dev/hda1 /mnt/gentoo/boot
mount --bind /dev /mnt/gentoo/dev
mount -t proc none /mnt/gentoo/proc

chroot /mnt/gentoo /bin/bash -c "env-update && source /etc/profile && bash"


Achtung ich gehe hier mal von einer standardinstallation aus.
Während dem installieren, falls dein Partitionslayout etwas anders ausschaut, entsprechend abändern.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)


Last edited by Max Steel on Sun Jan 27, 2008 2:36 pm; edited 2 times in total
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 614
Location: Munich, Germany

PostPosted: Sun Jan 27, 2008 2:29 pm    Post subject: Reply with quote

blu3bird wrote:
Code:
#!/bin/bash
chroot /mnt/gentoo /bin/bash -c "env-update && bash"

Ist natürlich falsch :D

sollte sein:
Code:
#!/bin/bash
chroot /mnt/gentoo /bin/bash -c "env-update && source /etc/profile && bash"

_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Jan 27, 2008 2:32 pm    Post subject: Reply with quote

mir fällt da grad was auf, warum baust du in das commandargument noch ein bash ein, das wird ja doch schon durch chroot /mnt/gentoo/ /bin/bash impliziert, oder nicht?
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 614
Location: Munich, Germany

PostPosted: Sun Jan 27, 2008 2:35 pm    Post subject: Reply with quote

weil bash sonst denkt es hätte nix mehr zu tun(außer env-update und source) und sofort wieder rausgeht
_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
Max Steel
Advocate
Advocate


Joined: 12 Feb 2007
Posts: 2272
Location: My own world! I and Gentoo!

PostPosted: Sun Jan 27, 2008 2:36 pm    Post subject: Reply with quote

okay, das ist einleuchtend.
_________________
mfg
Steel
___________________

Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum