91 lines
2.2 KiB
Plaintext
91 lines
2.2 KiB
Plaintext
|
Prerequisites:
|
||
|
|
||
|
squashfs support in your host kernel
|
||
|
(http://squashfs.sourceforge.net)
|
||
|
enough free space to install a chroot crux and build iso packages
|
||
|
pkgutils installed on the host, if not crux
|
||
|
|
||
|
|
||
|
Process:
|
||
|
|
||
|
# download the current iso (or 2.3 if you want to do lots of updates)
|
||
|
# and mount it via loopback
|
||
|
|
||
|
wget crux-2.3-latest.iso
|
||
|
mount -o loop crux-2.3-latest.iso /mnt/loop
|
||
|
|
||
|
# create an empty crux chroot and package database
|
||
|
|
||
|
mkdir -p /opt/crux-chroot/var/lib/pkg
|
||
|
touch /opt/crux-chroot/var/lib/pkg/db
|
||
|
|
||
|
# install the packages from the iso into the chroot
|
||
|
|
||
|
for i in /mnt/loop/crux/{core,opt,xorg}/*.pkg.tar.gz; do pkgadd -r /opt/crux-chroot $i; done
|
||
|
|
||
|
# prepare the chroot (mount up /dev, /proc, copy kernel sources, etc.)
|
||
|
|
||
|
mount -t proc proc /opt/crux-chroot/proc
|
||
|
mount -o bind /dev /opt/crux-chroot/dev
|
||
|
cp -L /etc/resolv.conf /opt/crux-chroot/etc/
|
||
|
cp -r /mnt/loop/crux/kernel/* /opt/crux-chroot/usr/src/
|
||
|
|
||
|
# checkout your new_iso, core, opt, and xorg git WCs
|
||
|
# (I just copy them from my user's local WC)
|
||
|
|
||
|
git clone git+ssh://crux/home/crux/scm/system/iso.git
|
||
|
(cd iso; git branch new_iso origin/new_iso; git checkout new_iso)
|
||
|
git clone git+ssh://crux/home/crux/scm/ports/core.git
|
||
|
(cd core; git branch 2.3 origin/2.3; git checkout 2.3)
|
||
|
# repeat for opt, xorg
|
||
|
cp -a iso /opt/crux-chroot/usr/src/
|
||
|
cp -a core opt xorg /opt/crux-chroot/usr/src/iso/ports/
|
||
|
|
||
|
# chroot
|
||
|
|
||
|
chroot /opt/crux-chroot /bin/bash
|
||
|
export PS1="(chroot) $PS1"
|
||
|
|
||
|
# update the chrooted system
|
||
|
# (may be necessary to get some ports to build for the iso but may be
|
||
|
# skippable.)
|
||
|
|
||
|
mv /etc/ports/contrib.rsync{.inactive,}
|
||
|
ports -u
|
||
|
prt-get sysup
|
||
|
|
||
|
# install squashfs-tools (iso squashfs) and elinks (handbook/release notes)
|
||
|
# (do the elinks part from your host system instead of the chroot
|
||
|
# if you prefer.)
|
||
|
|
||
|
cd /usr/ports/contrib/squashfs-tools
|
||
|
pkgmk -d -i
|
||
|
cd /usr/ports/opt/elinks
|
||
|
pkgmk -d -i
|
||
|
|
||
|
# download the handbook and release notes
|
||
|
|
||
|
cd /usr/src/iso/doc/handbook
|
||
|
./get_wiki_handbook
|
||
|
./get_wiki_release_notes
|
||
|
cd ../..
|
||
|
|
||
|
# bootstrap the iso
|
||
|
|
||
|
make bootstrap
|
||
|
|
||
|
# build it
|
||
|
|
||
|
make iso
|
||
|
|
||
|
-------------------
|
||
|
|
||
|
Preparing a netinst mirror: (after building the iso)
|
||
|
|
||
|
cd ports
|
||
|
./checkdups # remove duplicates
|
||
|
./gen-mirror <distdir>
|
||
|
|
||
|
Upload <distdir> to your mirror location.
|
||
|
|