On Thu, 20.09.2007 at 09:32:56 +0200, Matthias Fechner wrote:
> It seems that sysinstall will not install per default the new kernel.
> For a non SMP system (like mine) it is I4B.
> So it seems to me that I must change /usr/src/usr.sbin/sysinstall to
> do this. I attached a patch to this email which should do it.
> 
> [...]
> 
> I checked now the the installed system and there is absolutly no kernel
> installed. (no /boot/GENERIC, no /boot/I4B or anything else)
> 
> I'm sure that I must oversaw something in sysinstall to change but I
> cannot find it.
> Can please anyone provide with some help?

Hi,

we need to install multiple kernels per system and instead of relying on
sysinstall (I couldn't figure out, how to install multiple kernels with
it, especially since it wants to install the default kernel to 'kernel')
I hacked up my own kernel installation

I'm using a Makefile to drive our release and package building and for
the releases I'm using an install.cfg, which gets created on the fly,
since the names of the kernels change now and then, here is the release
target

KERNELS=        SERVER GENERIC SMP

release rerelease:
# Write automation script for sysinstall
        rm -f ${TLR}/usr/src/release/.install.cfg
        for k in ${KERNELS}; do printf "%s\n%s\n" "command=/bin/sh -c \"cd 
/dist/${RELEASE}/kernels && ./install.sh $$k\"" "system" \
                >> ${TLR}/usr/src/release/.install.cfg; done
        sed '/^#KERNELS#/r ${TLR}/usr/src/release/.install.cfg' 
files/install.cfg > ${TLR}/usr/src/release/install.cfg
        cp files/src.diff ${TLR}/usr/src/release/src.diff
# Create a src patch for our kernels on the fly, so we can pass it to make 
release
        (for i in ${KERNELS}; do diff -u /dev/null kernels/$$i 2>/dev/null || 
true; done) | sed 's,kernels/,sys/i386/conf/,' \
                > ${TLR}/usr/src/release/kernels.diff
# Copy them over again for rerelease, perhaps something changed
.if make(rerelease)
.for k in ${KERNELS}
        -cp kernels/$k ${TRR}/usr/src/sys/i386/conf/
.endfor
.endif
        cd ${TLR}/usr/src/release && make ${.TARGET} \
                BUILDNAME=${RELEASE} \
                CHROOTDIR=${TRR} \
                WORLD_FLAGS="-j4 \
                MODULES_WITH_WORLD=yes \
                WITHOUT_MODULES='3dfx 3dfx_linux ath ath_hal ath_rate_amrr 
ath_rate_onoe ath_rate_sample aue\
                                bktr cardbus coda coda5 dcons dcons_crom fatm 
firewire firmware harp hatm \
                                if_ndis ip6fw ipw iwi joy kue ndis pccard ral 
splash syscons umodem ural urio\
                                uscanner utopia uvisor wi wlan wlan_acl 
wlan_ccmp wlan_tkip wlan_wep wlan_xauth'" \
                KERNEL_FLAGS="-j4 MODULES_WITH_WORLD=yes" \
                KERNELS_BASE=''\
                NODOC=YES NOPORTS=YES NOSRC=YES NO_FLOPPIES=YES \
                RELEASENOUPDATE=YES \ 
                LOCAL_PATCHES='src.diff kernels.diff' \
                KERNELS='${KERNELS}' \
                CVSROOT=${CVSROOT} \ 
                CVSCMDARGS='${SRCDATE}' \
                RELEASETAG=${SRCBRANCH} 
        cd ${TRR}/R/ftp && find -d . | cpio --quiet -dumpl ${TFR}

And files/install.cfg contains the following

debug=yes
mediaSetCDROM
# Select which distributions we want. We omit the kernels here, we do them by 
hand
dists= base doc manpages games catpages dict info
distSetCustom

# Partition Editor
diskInteractive=YES
bootManager=standard
diskPartitionEditor
diskLabelEditor

installCommit

# Magic marker, don't edit! Is set automatically from the Makefile!
#KERNELS#
# End of magic marker

So basically, sysinstall is intructed to not install any kernel, but
after all distributions are extracted the following commands are run

command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh GENERIC"
system
command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh SMP"
system

It has the nice side effekt of GENERIC and SMP landing in
/boot/{GENERIC,SMP}

We also ship a /boot/loader.conf that sets the correct kernel to boot
and is versioned and centrally controlled, yadda yadda yadda

hth,
Ulrich Spoerlein
-- 
It is better to remain silent and be thought a fool,
than to speak, and remove all doubt.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to