Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Quick Install Gentoo Using 2-CD LiveCD Set in 5 minutes!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
happy_angel
n00b
n00b


Joined: 07 Feb 2004
Posts: 6

PostPosted: Sat Feb 07, 2004 11:33 pm    Post subject: Quick Install Gentoo Using 2-CD LiveCD Set in 5 minutes! Reply with quote

Install Gentoo Using 2-CD LiveCD Set in 5 minutes (!!worked for 1.4 & 2004.0!!)
(updated: 1. copy kernel, initrd, modules before chroot so that no need to mount /mnt/cloop in the chroot environment. 2. export PKGDIR instead of making a symbolic link. 3. install binary packages from the 2nd CD)

(updated for 2004.0 LiveCD: add guide for quick installation for 2004.0 LiveCD)

(updated 3/15/2004: some fixes from namuh)

(updated 3/19/2004: fixed an error in copying modules files)

(updated 3/19/2004: I just found that for 1.4 LiveCD, you still need put the first CD in the CDROM during bootup each time since the initrd from LiveCD still need mount some files on CD. But you can eject CD after bootup. So if you use 1.4 LiveCD, you'd better build a custom kernel by follow installation handbook or use the new LiveCD 2004.0)

Gentoo is great! It runs fast after it is installed, but the installation is painful and time-consume. I don't want to compile everything. With Gentoo 2-CD LiveCD set, we can choose install Gentoo from pre-build binary packages, but we still need compile some package, e.g. kernel which may last hours. The pre-build kernel in LiveCD seems work great, it can detect almost all hardwares, so I just want to use!

After several hours trying, I found out my solution. Two things speed up the whole installation:
    Copy kernel, initrd and module files from LiveCD instead of compiling them (save time)

    Directly access binary packages in LiveCD instead of copying them into hard disk (save space)

I decribled my procedure here. I almost follow "Gentoo Handbook Installation Instructions". Since there is almost no compilation (for 2004.0, you have to compile some packages since 1st LiveCD doesn't provide any binary packages), I installed a Gentoo 1.4 & 2004.0 Basic environment in VMWare using a script file in 5 minutes!

1. Download Gentoo 2-CD LiveCD(x86) from here:

2. Booting LiveCD:
Code:
   // doscsi  -- active support for SCSI device for vmware
   boot: gentoo doscsi

3. Preparing the Disks
Code:
   fdisk /dev/sda
   ...
   mke2fs /dev/sda1
   mkreiserfs /dev/sda3
   mkswap /dev/sda2
   swapon /dev/sda2
   
   mount /dev/sda3 /mnt/gentoo
   mkdir /mnt/gentoo/boot
   mount /dev/sda1 /mnt/gentoo/boot
   mkdir /mnt/gentoo/proc
   mount -t proc none /mnt/gentoo/proc

4. Installing the Gentoo Installation Files (For 2004.0 LiveCD, choose suitable stage3 file)
Code:
   cd /mnt/gentoo
   tar -xvjpf /mnt/cdrom/stages/stage3-*.tar.bz2
   tar -xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 -C /mnt/gentoo/usr

5. Copying the Kernel from LiveCD
for 1.4,
Code:
   // copy kernel,initrd from 1.4 LiveCD
   cp /mnt/cdrom/isolinux/gentoo /mnt/gentoo/boot/kernel-2.4.21-gss
   cp /mnt/cdrom/isolinux/initrd.1024 /mnt/gentoo/boot/initrd-2.4.21-gss
   // copy modules from LiveCD
   cp -a /mnt/cloop/lib/modules /mnt/gentoo/lib

for 2004.0, (Thanks Hauser!)
Code:
   // copy kernel,initrd from 2004.0 LiveCD
   cp -a /boot/* /mnt/gentoo/boot/
   // copy modules from LiveCD
   cp -a /lib/modules /mnt/gentoo/lib

If this doesn't work for you, you can try the following: (thanks namuh!)
Code:
   // copy kernel,initrd from LiveCD
   cp /mnt/cdrom/isolinux/gentoo /mnt/gentoo/boot/kernel-2.4.24-xfs-r3
   cp /mnt/cdrom/isolinux/gentoo.igz /mnt/gentoo/boot/initrd-2.4.24-xfs-r3
   // copy modules from LiveCD
   cp -a /mnt/cdrom/zisofs/lib/modules /mnt/gentoo/lib

6. Chroot the Gentoo Base System
Code:
   // re-mount CD so that we can access in chroot environment
   mkdir /mnt/gentoo/mnt
   mkdir /mnt/gentoo/mnt/cdrom
   mount --bind /mnt/cdrom /mnt/gentoo/mnt/cdrom

   cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

   chroot /mnt/gentoo /bin/bash
   env-update
   source /etc/profile
   
   // tell "emerge" where to find the binary packages, you need
   // do this whenever you want to install binary packages from LiveCD.
   // (no need for 2004.0 LiveCD since there is no any binary packages on the 1st CD)
   export PKGDIR=/mnt/cdrom/packages
   
   // tell "emerge" where to find the source packages, you need
   // do this if you want to use source packages on LiveCD
   // instead of downloading from the internet
   export DISTDIR=/mnt/cdrom/distfiles

7. Configuring your System
Code:
   nano -w /etc/fstab (REPLACE BOOT, ROOT, SWAP by your real partition)
   ...
   echo thinkpad > /etc/hostname
   echo homenet > /etc/dnsdomainname
   echo nis.homenet > /etc/nisdomainname
   rc-update add domainname default

   nano -w /etc/conf.d/net (config your eth0)
   ...
   rc-update add net.eth0 default

   nano -w /etc/hosts
   ...

   ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime
   nano -w /etc/rc.conf (CLOCK="local")
   ...

8. Configuring the BootLoader (you can drop "-k" for 2004.0 LiveCD)
Code:
   emerge -k grub (sys-apps/grub)
   grub
   grub> root (hd0,0)
   grub> setup (hd0)
   grub> quit
   nano -w /boot/grub/grub.conf

sample grub.conf for 1.4 LiveCD:
Code:
   default 0
   timeout 30
   splashimage=(hd0,0)/grub/splash.xpm.gz

   title=Gentoo Linux 2.4.21
   root (hd0,0)
   kernel (hd0,0)/kernel-2.4.21-gss root=/dev/(PUT YOUR ROOT PARTITION HERE) doscsi vga=791 splash=silent
   initrd (hd0,0)/initrd-2.4.21-gss

(note: if you use kernel, initrd from 1.4 LiveCD as above, you need put 1st CD inside CDROM each bootup. That's why some people said that they cannot boot up by following this instruction. You can built your own customized kernel after you installed the base system)

sample grub.conf for 2004.0 LiveCD:
Code:
   default 0
   timeout 30
   splashimage=(hd0,0)/grub/splash.xpm.gz

   title=Gentoo Linux 2.4.24-xfs-r3
   root (hd0,0)
   kernel (hd0,0)/kernel-2.4.24-xfs-r3 root=/dev/ram0 init=/linuxrc real_root=/dev/(PUT YOUR ROOT PARTITION HERE) doscsi vga=791 splash=silent
   initrd (hd0,0)/initrd-2.4.24-xfs-r3


9. Installing Necessary System Tools (you can drop "-k" for 2004.0 LiveCD)
Code:
   emerge -k hotplug (sys-apps/pciutils, sys-apps/usbutils, sys-apps/hotplug)
   rc-update add hotplug default
   emerge -k syslog-ng (dev-libs/libol, app-admin/syslog-ng)
   rc-update add syslog-ng default
   emerge -k reiserfsprogs (sys-apps/reiserfsprogs)

10. Finalizing your Gentoo Installation
Code:
   passwd
   useradd john -m -G users,wheel,audio -s /bin/bash
   passwd john

   etc-update
   exit
   cd /
   mount --move /mnt/gentoo/mnt/cdrom /mnt/cdrom
   umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
   reboot


Next STEP
Once you reboot the system, you can install other packages, say XFree, gnome, kde from 2nd Live CD!
for 1.4 LiveCD,
Code:
   // put the second CD into CDROM
   mount /mnt/cdrom
   export PKGDIR=/mnt/cdrom/packages
   emerge -k your_package_name

for 2004.0 LiveCD,
Code:
   // put the second CD into CDROM
   mount /mnt/cdrom
   export PKGDIR=/mnt/cdrom
   emerge -k your_package_name


Last edited by happy_angel on Fri Mar 19, 2004 7:48 pm; edited 6 times in total
Back to top
View user's profile Send private message
Bodhammer
n00b
n00b


Joined: 24 Feb 2004
Posts: 11

PostPosted: Thu Mar 04, 2004 1:55 am    Post subject: Reply with quote

Will this work with the new Universal CD and install methods?

Thanks,
Bod
Back to top
View user's profile Send private message
druggo
Apprentice
Apprentice


Joined: 24 Sep 2003
Posts: 289
Location: Hangzhou, China

PostPosted: Thu Mar 04, 2004 2:37 am    Post subject: Reply with quote

maybe ¡­¡­
Back to top
View user's profile Send private message
saxophobe
n00b
n00b


Joined: 04 Mar 2004
Posts: 21
Location: Dallas, TX

PostPosted: Thu Mar 04, 2004 11:03 pm    Post subject: Reply with quote

This is a very attractive option for someone like myself who is just getting to know Gentoo. My only question is this: if you follow these instructions, do you have to always boot from the CD? If this is the case, how is this better that just using Knoppix?

Thanks!

sax
Back to top
View user's profile Send private message
faceplate27
n00b
n00b


Joined: 09 May 2003
Posts: 3

PostPosted: Thu Mar 04, 2004 11:16 pm    Post subject: not a good idea. Reply with quote

The beauty of Gentoo is that it builds every package for your specific architecture. To hack a build together like this completely defeats the purpose of using this wonderful distribution. I think this is very sloppy and, on top of that, does not give newer people an opportunity to learn linux. I am a veteran UNIX admin and, when I switched to Gentoo, it taught me WAY more than I thought it could about general unix stuff, as well as Linux specific things. If you are a newbie reading this, please don't even try this. It's an awful idea.
Back to top
View user's profile Send private message
saxophobe
n00b
n00b


Joined: 04 Mar 2004
Posts: 21
Location: Dallas, TX

PostPosted: Fri Mar 05, 2004 1:03 am    Post subject: This doesn't work!!! Reply with quote

Hi all!!!

Sorry to rain on your parade, but this procedure breaks down in Step 6:

"// copy kernel,initrd from LiveCD
cp /mnt/cdrom/isolinux/gentoo /boot/kernel-2.4.21-gss
cp /mnt/cdrom/isolinux/initrd.1024 /boot/initrd-2.4.21-gss"

I downloaded the 1.4 isos from linuxiso.org and have found that there is NO isolinux directory in the /mnt/cdrom directory, thus this procedure will leave you stuck at step 6.

The reason I know is that I tried it to see if it would work, as the normal Stage 3 install bombs out on me when I try an emerge, as my Internet connection is via USB and the LiveCD is not connecting via CDCEther; not sure why.

As much as I would like to spend a year trying to get Gentoo to install and build it from the ground up, my wife is already complaining that I spend too much time at the computer as it is, and I just want the stupid thing to work for a change.

BTW - Weren't computers originally built to make our lives easier? Well, I think the corporate types just view computers as a was to cram more stuff into your day.

Just my .02....

Thanks!

sax
Back to top
View user's profile Send private message
someguy
Guru
Guru


Joined: 10 Jul 2003
Posts: 433
Location: (-_-) .::OH_WELL::. (-_-)

PostPosted: Fri Mar 05, 2004 6:13 am    Post subject: Reply with quote

i think its a good idea better than doing a 2 hour stage 3 grp ( even tho i prefer stage 2 base builds) but there are times when things like this are needed kuz i mean even when i do a stage 3 i always go back and emerge -eU | wc -l the system after its up (usually do grps when i need a quick server)
so it woule at least save 2 hours
_________________
print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`
while [ 1 ] ; do echo "*" | telnet ip.of.print.er 9100 ; done
Back to top
View user's profile Send private message
saxophobe
n00b
n00b


Joined: 04 Mar 2004
Posts: 21
Location: Dallas, TX

PostPosted: Fri Mar 05, 2004 4:21 pm    Post subject: Reply with quote

It WOULD be great...if it worked! But it doesn't for the reasons stated above.
Back to top
View user's profile Send private message
happy_angel
n00b
n00b


Joined: 07 Feb 2004
Posts: 6

PostPosted: Tue Mar 09, 2004 5:40 am    Post subject: Reply with quote

can you sure that you download the right 1.4 iso file? and did you do this step before you chroot?

Code:
mount --bind /mnt/cdrom /mnt/gentoo/mnt/cdrom


I have done this many times.
Back to top
View user's profile Send private message
Slyde
Guru
Guru


Joined: 14 Jul 2003
Posts: 314

PostPosted: Tue Mar 09, 2004 8:03 am    Post subject: Reply with quote

GRP is good when you are in a bind. Other than that, Gentoo is a source based distro...so way use binaries?
Back to top
View user's profile Send private message
happy_angel
n00b
n00b


Joined: 07 Feb 2004
Posts: 6

PostPosted: Tue Mar 09, 2004 8:44 pm    Post subject: Reply with quote

Yeah, I agree that Gentoo is a source-based distribution, but all building almost automatically in Gentoo. most of time, you just do "emerge ..." and wait compilation for a long time. If we really want to study, we can choose "Linux from scratch".

The reasons that I choose Gentoo, it was optimized for my computer and automatically update. But at first time, I don't want to wait for a long time to set it up on my computer. So my post just want to help some guys who want to setup Gentoo quicky.
Back to top
View user's profile Send private message
namuh
n00b
n00b


Joined: 06 Jan 2004
Posts: 32
Location: Vermont

PostPosted: Tue Mar 09, 2004 9:01 pm    Post subject: Reply with quote

Hi All,
I tried the above on the new Universal CD 2004.0 and got it to work, but not without some fiddling. The kernel booted but I had to hand configure some of the devices (specifically the network card) so I must have missed some of the scripts/programs on the CD that do that. Also I don't think the initrd worked properly because I had to secondary boot to /dev/hda1 (boot partition) even though grub.conf was configured correctly. If anyone could list those additional files it would help (I followed the above so you know what I did copy).

As to the argument over source vs binary, may I say that I'm using Gentoo for my production machines now and it is MUCH better to put a machine into production in a half hour and then rebuild from source in the background over a couple of days than having to delay a vital machine waiting for all the optimization. I consider Gentoo to be converging on the best of both worlds. Fast install (getting there) and Highly flexible and optimized via a system that even newbies can use and pros can really twist to their needs.

An interesting aside is that after the install and copy I used genkernel to build a second kernel which of course booted fine, but apparently genkernel also put in the scripts I was missing because the CD kernel now also boots and self configures flawlessly.
Back to top
View user's profile Send private message
Dreamsmith
n00b
n00b


Joined: 09 Mar 2004
Posts: 33

PostPosted: Tue Mar 09, 2004 11:19 pm    Post subject: Re: not a good idea. Reply with quote

faceplate27 wrote:
The beauty of Gentoo is that it builds every package for your specific architecture. To hack a build together like this completely defeats the purpose of using this wonderful distribution.


You mean it complete defeats the purpose you use it for. In that case, don't do as the author suggested. For those of us who use Gentoo for other reasons, this is not such a bad way to get a system up quickly.

If there was some other, non-source based distro that offered architecture-optimized binaries and was as consistently up to date as Gentoo, I'd switch in a heartbeat. Having to compile from source all the time is an annoyance, not a feature, but it's worth it when it gets you the latest stuff, and not having to suffer through library dependency hell all the time...

If you like Gentoo because it's source based, that's great. But if you think that's the only reason anyone would be using it, think again. Gentoo has a lot more going for it than that...
Back to top
View user's profile Send private message
happy_angel
n00b
n00b


Joined: 07 Feb 2004
Posts: 6

PostPosted: Wed Mar 10, 2004 7:14 am    Post subject: Reply with quote

namuh wrote:
Hi All,
I tried the above on the new Universal CD 2004.0 and got it to work, but not without some fiddling. The kernel booted but I had to hand configure some of the devices (specifically the network card) so I must have missed some of the scripts/programs on the CD that do that. Also I don't think the initrd worked properly because I had to secondary boot to /dev/hda1 (boot partition) even though grub.conf was configured correctly. If anyone could list those additional files it would help (I followed the above so you know what I did copy).

As to the argument over source vs binary, may I say that I'm using Gentoo for my production machines now and it is MUCH better to put a machine into production in a half hour and then rebuild from source in the background over a couple of days than having to delay a vital machine waiting for all the optimization. I consider Gentoo to be converging on the best of both worlds. Fast install (getting there) and Highly flexible and optimized via a system that even newbies can use and pros can really twist to their needs.

An interesting aside is that after the install and copy I used genkernel to build a second kernel which of course booted fine, but apparently genkernel also put in the scripts I was missing because the CD kernel now also boots and self configures flawlessly.


To use kernel files in new Universal CD 2004.0, you need do as follows:
Code:
   // copy kernel,initrd from LiveCD
   cp /mnt/cdrom/isolinux/gentoo /boot/kernel-2.4.24-xfs-r3
   cp /mnt/cdrom/isolinux/gentoo.igz /boot/initrd-2.4.24-xfs-r3
   // copy modules from LiveCD
   cp -R /mnt/cdrom/zisofs/lib/modules /lib

then configure your grub.conf as follows:
Code:
   default 0
   timeout 30
   splashimage=(hd0,0)/grub/splash.xpm.gz

   title=Gentoo Linux 2.4.24-xfs-r3
   root (hd0,0)
   kernel (hd0,0)/kernel-2.4.24-xfs-r3 root=/dev/ram0 init=/linuxrc real_root=/dev/sda3 doscsi vga=791 splash=silent
   initrd (hd0,0)/initrd-2.4.24-xfs-r3

(In fact, it is just the example of "grub.conf for non-GRP genkernel users" in "Gentoo Handbook" since the new LiveCD use new genkernel to generate kernel files)

I will put a complete guide for new Universal 2004.0 LiveCD if someone is interested.[/b]
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Wed Mar 10, 2004 12:35 pm    Post subject: Reply with quote

Why don't you do:

#cp -a /boot/* /mnt/gentoo/boot
#cp -a /lib/modules/* /mnt/gentoo/lib

Then you'll have both 2.4.25 and 2.6.1(if I remember the version numbers correctly), either of which you can choose to boot. :wink: I did an experiment on my test partition, both of them boot on my machine though not without issues.
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
namuh
n00b
n00b


Joined: 06 Jan 2004
Posts: 32
Location: Vermont

PostPosted: Wed Mar 10, 2004 3:37 pm    Post subject: Reply with quote

Happy Angel, I don't disagree. I, however did do it the way Hauser suggests in the next post. The problem I ran into with either method (I've tried both now) is that upon rebooting some things don't configure correctly, implying that there are missing config scripts elsewhere in the system that are missed. It is those scripts/programs that I'm after. I also suspect that Hauser's "issues" are similar to mine. They can all be corrected manually but it would be cleaner if we caught everything and the CD kernel autoconfigured as it should.
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Wed Mar 10, 2004 4:50 pm    Post subject: Reply with quote

I think ultimately you need to compile your own kernel. I did this experiment for fun (I've got lots of diskspace).:lol: With this method I was able to install all the GRPs and many apps seem to work fine. However, from the booting messages, something seem to have gone wrong, I don't know what they are and can't be bothered to find out (I've wiped out the install already). I'm sure they can be fixed but still I would say if you want to know more about gentoo, do it the 'gentoo way' ! Of course, some people prefer to have a (seemingly) working system set up quickly before they feel comfortable to start compiling things (in the background), I'm not against that, that's why I'd like to share some of my experience. :)
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
namuh
n00b
n00b


Joined: 06 Jan 2004
Posts: 32
Location: Vermont

PostPosted: Wed Mar 10, 2004 5:06 pm    Post subject: Reply with quote

I wasn't planning on leaving the CD kernel active. I just wanted a fast way to bring up an operational system. I saw a side benefit in that the running CD kernel would make it easy to list off the drivers and modules that need to be built into the final kernel. This would avoid having to build a genkernel system when you are unsure of the exact config and go right to a manual (and thus most efficient) kernel. Sometimes a short cut may seem like the long way around, but in this case... not!
Back to top
View user's profile Send private message
namuh
n00b
n00b


Joined: 06 Jan 2004
Posts: 32
Location: Vermont

PostPosted: Wed Mar 10, 2004 6:11 pm    Post subject: Reply with quote

Hey Happy Angel, I'm curious as to how you knew which kernel was in isolinux??
Back to top
View user's profile Send private message
happy_angel
n00b
n00b


Joined: 07 Feb 2004
Posts: 6

PostPosted: Wed Mar 10, 2004 6:28 pm    Post subject: Reply with quote

namuh wrote:
Hey Happy Angel, I'm curious as to how you knew which kernel was in isolinux??


you can read the isolinux.cfg under isolinux, it shows how kernel on LiveCD bootup.
Back to top
View user's profile Send private message
namuh
n00b
n00b


Joined: 06 Jan 2004
Posts: 32
Location: Vermont

PostPosted: Wed Mar 10, 2004 6:58 pm    Post subject: Reply with quote

Thanks!!! will do.
Back to top
View user's profile Send private message
happy_angel
n00b
n00b


Joined: 07 Feb 2004
Posts: 6

PostPosted: Thu Mar 11, 2004 4:23 am    Post subject: update! Reply with quote

I have update the guide, now this method worked for 2004.0 except that you have to compile some packages from sources, but the compilation is much shorter than compiling everything.
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Thu Mar 11, 2004 5:17 am    Post subject: Reply with quote

As to installing the binaries, you need to use the portage snapshot on the LiveCD during installation:

# ls /mnt/cdrom/snapshots
# tar -xvjf /mnt/cdrom/snapshots/portage-20040223.tar.bz2 -C /mnt/gentoo/usr

If you still have the iso on your harddisk for the GRP CD, you can also do this as I've posted in some other threads:

# mkdir -p /usr/portage/packages
# mount -o loop /the/path/to/packages-xxxxx-2004.0.iso /usr/portage/packages

Then you should be able to use emerge -k to install the binaries without even reboot. BTW, don't do 'emerge sync' anytime before you finish installing the GRPs.:)
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
namuh
n00b
n00b


Joined: 06 Jan 2004
Posts: 32
Location: Vermont

PostPosted: Thu Mar 11, 2004 3:59 pm    Post subject: Reply with quote

Here are 3 scripts I wrote yesterday that build a Gentoo system in 30 minutes with minimal intervention. After reboot, I just emerge the kernel of my choice, manually configure it after doing an lspci to get the right devices and compile. Then I have a usable machine while I 'emerge -Ue world' in the background whereupon I'm back in the world of source Gentoo!!

To use the scripts you must first create proper fstab, grub.conf and net files on an available rsync server. Boot the Gentoo Universal CD. Fdisk, filesystems and mount everything per the Gentoo Handbook. Mkdir /mnt/gentoo/gen_config. Rsync the scripts and config files to this directory. Make the scripts executable and run gensys1. Gensys1 will chroot when required and call gensys2. The last script is an automated config run after rebooting to make this particular machine a fax server (it's one of my production machines that I'm replacing with Gentoo). It will finish with a Gnome environment and binary packages used where available. Don't forget after gensys2 finishes to umount the /mnt/gentoo..etc filesystem before rebooting. Also don't forget to load the 'package CD' after the reboot or genelmo won't work.

gensys1:

#!/bin/sh
echo "Make and mount proc\n"
mkdir /mnt/gentoo/proc
mount -t proc none /mnt/gentoo/proc
cd /mnt/gentoo
echo "Un-tar stage3\n"
tar -xvjpf /mnt/cdrom/stages/stage3-i686*.bz2
echo "Un-tar snapshot\n"
tar -xvjf /mnt/cdrom/snapshots/portage*bz2 -C /mnt/gentoo/usr
mkdir /mnt/gentoo/usr/portage/distfiles
echo "Copy sources\n"
cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/
echo "Copy /etc/resolv.conf\n"
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
echo "Copy the CD kernel and initrd\n"
cp /mnt/cdrom/isolinux/gentoo /mnt/gentoo/boot/kernel-2.4.24-xfs-r3
cp /mnt/cdrom/isolinux/gentoo.igz /mnt/gentoo/boot/initrd-2.4.24-xfs-r3
echo "Copy the Modules\n"
cp -R /mnt/cdrom/zisofs/lib/modules /mnt/gentoo/lib
echo "Better hope we remembered to rsync in fstab, conf.d/net and grub.conf\n"
cp /mnt/gentoo/gen_config/fstab /mnt/gentoo/etc/fstab
cp /mnt/gentoo/gen_config/net /mnt/gentoo/etc/conf.d/net
echo "chroot now... Run /gen_config/gensys2\n"
chroot /mnt/gentoo /gen_config/gensys2


gensys2:

#!/bin/sh
env-update
source /etc/profile
echo "emerge hotplug and install"
emerge hotplug
rc-update add hotplug default
echo "link in Eastern Time"
ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime
rc-update add net.eth0 default
echo "emerge grub and run it to configure"
emerge grub
grub
echo "move the grub.conf to /boot/grub"
mv /gen_config/grub.conf /boot/grub/grub.conf
echo "emerge syslog-ng and then vixie-cron and install"
emerge syslog-ng
rc-update add syslog-ng default
emerge vixie-cron
rc-update add vixie-cron default
passwd
echo "root password should now be set so taking you back to the CD system"
echo "etc-update"
etc-update
exit


genelmo: (my fax system)


#!/bin/sh
echo elmo1 > /etc/hostname
echo mydomain.com > /etc/dnsdomainname
emerge sync
mount /mnt/cdrom
export PKGDIR="/mnt/cdrom"
echo "emerge gentoolkit vim gnome samba apache webmin hylafax\n"
USE="gtk qt gnome" emerge --usepkg gentoolkit
USE="gtk qt gnome" emerge --usepkg vim
USE="bindist gtk qt gnome" emerge --usepkgonly gnome
USE="gtk qt gnome" emerge --usepkg samba
USE="gtk qt gnome" emerge --usepkg apache
USE="gtk qt gnome" emerge --usepkg webmin
USE="gtk qt gnome" emerge --usepkg hylafax
echo "add startups for each to runlevel/default\n"
rc-update add xfs default
rc-update add xdm default
rc-update add sshd default
rc-update add apache2 default
rc-update add webmin default
echo "don't forget to edit rc.conf for gdm and others before restarting\n"

8O
Back to top
View user's profile Send private message
Sven Vermeulen
Retired Dev
Retired Dev


Joined: 29 Aug 2002
Posts: 1345
Location: Mechelen, Belgium

PostPosted: Fri Mar 12, 2004 11:20 am    Post subject: Reply with quote

A similar script is, besides GLIS, being developed by the server project. It's called GSDS.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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