View previous topic :: View next topic |
Author |
Message |
Tinitus Veteran
Joined: 20 Sep 2004 Posts: 1754
|
Posted: Sun Jan 27, 2008 1:41 pm Post subject: Installation betreten der neuen Umgebung per Script? |
|
|
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 |
|
|
blu3bird Retired Dev
Joined: 04 Oct 2003 Posts: 614 Location: Munich, Germany
|
Posted: Sun Jan 27, 2008 1:57 pm Post subject: |
|
|
Code: | #!/bin/bash
chroot /mnt/gentoo /bin/bash -c "env-update && bash" |
_________________ Black Holes are created when God divides by zero! |
|
Back to top |
|
|
Max Steel Advocate
Joined: 12 Feb 2007 Posts: 2272 Location: My own world! I and Gentoo!
|
Posted: Sun Jan 27, 2008 2:22 pm Post subject: |
|
|
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 |
|
|
blu3bird Retired Dev
Joined: 04 Oct 2003 Posts: 614 Location: Munich, Germany
|
Posted: Sun Jan 27, 2008 2:29 pm Post subject: |
|
|
blu3bird wrote: | Code: | #!/bin/bash
chroot /mnt/gentoo /bin/bash -c "env-update && bash" |
|
Ist natürlich falsch
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 |
|
|
Max Steel Advocate
Joined: 12 Feb 2007 Posts: 2272 Location: My own world! I and Gentoo!
|
Posted: Sun Jan 27, 2008 2:32 pm Post subject: |
|
|
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 |
|
|
blu3bird Retired Dev
Joined: 04 Oct 2003 Posts: 614 Location: Munich, Germany
|
Posted: Sun Jan 27, 2008 2:35 pm Post subject: |
|
|
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 |
|
|
Max Steel Advocate
Joined: 12 Feb 2007 Posts: 2272 Location: My own world! I and Gentoo!
|
Posted: Sun Jan 27, 2008 2:36 pm Post subject: |
|
|
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 |
|
|
|