View previous topic :: View next topic |
Author |
Message |
flickerfly l33t
Joined: 08 Nov 2002 Posts: 677 Location: Lanham, MD
|
Posted: Thu Mar 27, 2003 4:03 pm Post subject: Gentoo Testing within Gentoo Stable |
|
|
This will step you through the process of setting up a system within your system. It's really very simple and will give you a digital playground for messing with things and helping people withot borking your own system. You could also setup one to run ACCEPT_KEYWORDS="~arch".
Thanks to Magnet for already doing this and dropping the idea on me. I'm just sharing.
REQUIREMENTS:
1) You will need to perform almost all these commands as root. Go ahead and su in now.
2) Also get the stage3 tarball. Just copy it out to /tmp. Here's the x86 one: stage3-x86-1.4_rc3.tar.bz2
NOTE: You may already have it on cd or an iso that you can mount.
mount -t iso9660 -o ro,loop /home/jritchie/Downloads/gentoo-3stages-x86-1.4_rc3.iso /mnt/iso
will mount the iso (assuming other things). You can find the tarballs in the /mnt/iso/gentoo directory.
DIRECTIONS:
1) type mkdir /opt/testsys
(You can put this elsewhere if you desire. Just change it throughout the directions)
2) tar jxvf /tmp/stage3-x86-1.4_rc3.tar.bz2 /opt/testsys
3) Modify this script and make it executable, then run it.
(I suggest using the /root/bin directory. You will need to su in to get to it each time anyway. As long as ~/bin is in your path you could su -c "testin".)
Code: | #!/bin/bash
#A Little Script(tm) to get into my test system
#This script should be named "testin"
#It should be real easy to customize
# Set Variables (This should be all you really need to edit to start.)
NROOT=/opt/testsys #Test System Directory
NAME=TestSys #Test System's Name (whatever you want)
GREET=1 #1 indicates greeting, 0 indicates no greeting
#Move proper config files - Add/Remove as you desire
#
#You may be able to link instead of copy each time, but be
#aware of the possibility of overwriting your real config files
cp /etc/resolv.conf $NROOT/etc/resolv.conf
cp /etc/fstab $NROOT/etc/fstab
cp /etc/mtab $NROOT/etc/mtab
cp /etc/hosts $NROOT/etc/hosts
#Mount proper filesystems
#You could mount CDs, NFS dirs or other things automatically if you care to.
mount -t proc /proc $NROOT/proc 2&>1 > /dev/null
#Login
cd $NROOT
if [ $GREET -eq 1 ]
then
echo "$USER, Welcome to $NAME in $NROOT"
fi
chroot $NROOT /bin/bash |
4) You should now be in your test system. All that's left if an update.
Type: emerge sync ; emerge -vup world
5) Type: emerge -u world
6) To get out of this sytem type exit or C^d (equivalents)
7) Anytime you want to get in run the script above
If you see error above, pm me and I'll gladly adjust as needed.
I'd greatly enjoy hearing others suggestions for improvement. I imagine those with more time could easily setup several different versions of this on one computer (assuming hd space) and modify it easily to go to certain installs. Maybe add a command line argument to my script so that you can type in the name and it will change the directory or something like that. That's beyond my need, but it is easily doable and I'm sure someone already does.
Still a Mystery (or) Enhancements Yet to Be
For you fluxbox/aterm users, this is something I'm trying to figure this out:
I have this in my ~/.fluxbox/menu
Code: | [exec] (Test System) {aterm -tr -trsb -fg blue -bw 0 -title "Test System" -e 'su -c "/root/bin/testin"'}
|
and (switch the " and the ')
Code: | [exec] (Test System) {aterm -tr -trsb -fg blue -bw 0 -title "Test System" -e "su -c '/root/bin/testin'"}
|
Each time I try to run it it flashes a terminal and then it disappears (real fast). How can I make the menu or manybe aterm keep the window up to type my root password in and get into my system?
Concerning Portage Sharing
Could I somehow mount the portage directories between systems so I don't have to emerge sync 2 seperate times? Maybe some ln -s commands?
Good old open source, no fine print needed
EDIT: Added url tags to link for word wrapping. -- pjp _________________ An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A |
|
Back to top |
|
|
magnet Guru
Joined: 16 Mar 2003 Posts: 582 Location: france
|
Posted: Thu Mar 27, 2003 5:04 pm Post subject: |
|
|
hehe thanks undernet's #gentoo for the help. _________________ every step aim at glory. |
|
Back to top |
|
|
|
|
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
|
|