Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installerless, Networkless Gentoo 2006.0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
dmartinsca
Guru
Guru


Joined: 09 Dec 2005
Posts: 303
Location: Ontario, Canada

PostPosted: Sun Apr 30, 2006 3:04 pm    Post subject: Installerless, Networkless Gentoo 2006.0 Reply with quote

I've noticed quite a few people asking how to do networkless installs from the Gentoo 2006.0 x86 release without the installer or asking where to find the packages cd for x86. I decided to play around with the livecd a bit and wrote a little script to extract all of the installed packages from the cd and store them as binary packages somewhere on disk. My thinking was that you could create your partitions, mount them starting at /mnt/gentoo, run the script which would store the packages to /mnt/gentoo/usr/portage/pkg. You could then chroot and emerge packages with the -k or -K options.
A couple of problems/questions come to mind:
  • A stage 3 tarball is still needed. There isn't one on the livecd. I considered that a stage3 tarball could be downloaded and burnt to another cd when you were downloading the livecd iso. I'm under the impression that the majority of people only have 1 cd drive, this would require loading the entire livecd to RAM. I tried the docache option on the livecd to allow me to swap cds but it doesn't want to co-operate with 256MB ram. I also tried getting the livecd to use my swap partition which would provide enough space for the contents of the cd with no luck. Obviously the livecd must generate a stage3 from itself, i haven't really looked into that yet :?
  • Is a portage tree needed to emerge binary packages? From what i see in the man page for emerge the -K option may work without a portage tree. How would dependancies be calculated?


These are just some thoughts that have come to mind. I haven't really had much time to experiment with this yet, just wanted to get some input. Maybe this has already been done, in that case, no need to re-invent.

Here's the script to extract the packages:
Code:
#!/bin/bash

cd /var/db/pkg
find -maxdepth 2 -mindepth 2 > /tmp/pkglist
pkg_count=$(wc -l /tmp/pkglist | awk '{ print $1 }')
counter=0
pkg_store="/mnt/gentoo/usr/portage/pkg"
for pkg in $(cat /tmp/pkglist)
do
   
   (( counter++ ))
   if [ -e "${pkg_store}/${pkg}.tbz2" ]
   then
      echo "Skipping package $counter of $pkg_count: Exists"
   else
   pkg=$(basename $pkg)
   echo "Making binary package $counter of $pkg_count: $pkg"
   PKGDIR="$pkg_store" quickpkg =${pkg}
   fi
done

rm /tmp/pkglist


What are your thoughts on this?
Back to top
View user's profile Send private message
carl.anderson
Apprentice
Apprentice


Joined: 05 Sep 2005
Posts: 162
Location: Mountain View

PostPosted: Sun Apr 30, 2006 3:47 pm    Post subject: I've done something like this before. Reply with quote

I've done something like this recently, so maybe you can learn from what I learned.

I started with a 2006.0 minimal install cd. It turns out that when you use the docache kernel option, the kernel caches only the squashfs file into memory. On the minimal CD, this is only 50 MB. So you should be able to swap CDs at that point; just be sure to umount /mnt/cdrom first. I haven't checked, but it sounds like the squashfs file for the install CD you were using must be larger than 128 MB (i seem to remember hearing that docache won't cache more than half of the available ram).

Also, if you start with the minimal install CD, you can easily fit a stage 3 tarball, a portage tree and 500 MB of precompiled binaries onto one CD.

From there, you can simply mount the hard drive, unpack the stage3 and the portage tree, cache the binaries into /usr/portage/packages/All, chroot and emerge -K. You'll still need to set up your rc services and compile a kernel (among other things), but you should be able to set something up pretty easily like this. If I were you, I would install the kernel sources early and build your kernel right away. A lot of packages will look for the kernel you have installed and examine your .config and / or your System.map files.

Hope this helps.
Back to top
View user's profile Send private message
dmartinsca
Guru
Guru


Joined: 09 Dec 2005
Posts: 303
Location: Ontario, Canada

PostPosted: Mon May 01, 2006 5:10 am    Post subject: Reply with quote

Carl, thanks for the reply. My main reason for experimenting with this isn't really for my own use, I pretty much always have a highspeed connection available to me. I was/am trying to determine if there is a way for people to somewhat easily do networkless installs without the installers (which sometimes don't work) from the 2006.0 release. Of course, people can still use the 2005.1 universal and package cds but the downside is these cds use gcc 3.3 and no nptl. I was going to write a howto if i could figure it out, but i didn't really want to get into making a different cd people would have to download.

I played around with this a bit more this afternoon, the results weren't all that great.
I put a stage3 tarball on a usb stick and used that to populate a new root partition once i was booted from the livecd. I then ran the script to make the binary packages which were stored in /mnt/gentoo/usr/portage/packages. I used the portage snapshot that can be found on the livecd. I then tried to install a kernel.. no luck. The three binary packages which were located in sys-kernel/ were genkernel, livecd-kernel and linux-headers, none of which seemed to install any sources. After that i gave up for the day.

School is done and I don't start work for another couple of days, maybe i'll get something worked out yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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