From mboxrd@z Thu Jan 1 00:00:00 1970 From: michal at ellpspace.math.ualberta.ca (Michal Jaegermann) Date: Tue, 5 Oct 2004 11:39:04 -0600 Subject: Other distros (was RE: Waxing Philosophical) In-Reply-To: <20041005102917.629ec629.listmail@allenz.net>; from listmail@allenz.net on Tue, Oct 05, 2004 at 10:29:17AM -0400 References: <20041004223109.2e988ac8.listmail@allenz.net> <20041004223802.A9046@ellpspace.math.ualberta.ca> <20041005102917.629ec629.listmail@allenz.net> Message-ID: <20041005113904.B17844@ellpspace.math.ualberta.ca> On Tue, Oct 05, 2004 at 10:29:17AM -0400, Allen Ziegenfus wrote: > On the fine day of Mon, 4 Oct 2004 22:38:02 -0600 > Michal Jaegermann said very > eloquently: > > > On Mon, Oct 04, 2004 at 10:31:09PM -0400, Allen Ziegenfus wrote: > > > > > > Is it possible to do a chroot install of Fedora? > > > > You mean installing on file system(s) different from ones where you > > are starting to operate? > > I guess I really meant was can you install Fedora from another existing > Linux distribution. Sure. This is always possible. As Mike will likely tell you this is a preferred method of installing "Alpha Core" for now unless you are brave and/or want to run into troubles and solve them. :-) In current versions of rpm you can find /usr/lib/rpm/rpm2cpio.sh Oh, well, here it is in a full glory. :-) It writes cpio data on stdout. #!/bin/sh pkg=$1 if [ "$pkg" = "" -o ! -e "$pkg" ]; then echo "no package supplied" 1>&2 exit 1 fi leadsize=96 o=`expr $leadsize + 8` set `od -j $o -N 8 -t u1 $pkg` il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` # echo "sig il: $il dl: $dl" sigsize=`expr 8 + 16 \* $il + $dl` o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8` set `od -j $o -N 8 -t u1 $pkg` il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` # echo "hdr il: $il dl: $dl" hdrsize=`expr 8 + 16 \* $il + $dl` o=`expr $o + $hdrsize` dd if=$pkg ibs=$o skip=1 2>/dev/null | gunzip You may actually need another variant for rpm packages using bzip2 compression or you may want to make the above a bit smarter and make it to check which decompressor to use. Armed with anything which will run the above and cpio you can unpack any rpm package on any file system you desire. Fixing up your rpm database can be done later with a help of '--justdb' option. Of course if you are able to run rpm then you can simply call it with '--root=...' and save yourself an extra work. Michal