Re: Custom Kernel for FreeBSD Installation
I built this thing called the "Druid" to handle this (and other) problems.
Here's the idea=85
(a) need a custom kernel to install
(b) you need to install said custom kernel to the new distribution else fir=
st-boot fails
Enter Druid.
Here's how it works:
=3D=3D=3D
Step 1. Download the source code to the FreeBSD Druid so you can build a cu=
stom ISO with your custom kernel/kernel-distribution
$ cvs -d:pserver:anonymous@druidbsd.cvs.sourceforge.net:/cvsroot/druidbsd l=
ogin
# Simply press ENTER at the "CVS password:" prompt
If you want the FreeBSD-9 based sources:
$ cvs -z3 -d:pserver:anonymous@druidbsd.cvs.sourceforge.net:/cvsroot/druidb=
sd co -P druidbsd/druid
or, if you want the FreeBSD-8 based sources:
$ cvs -z3 -d:pserver:anonymous@druidbsd.cvs.sourceforge.net:/cvsroot/druidb=
sd co -P druidbsd/druid83
# Either of these will take approximately 15 minutes to download (so please=
be patient)
# Simply try again if you get the following error:
# cvs [checkout aborted]: read lock failed - giving up
=3D=3D=3D
Step 2: Add your custom kernel
$ cd druidbsd/druid/
# or: cd druidbsd/druid83/
$ cp ~/YOURKERNEL mdroot/kernels/YOURKERNEL
$ vi mdroot/boot/menu.rc
# Find the below lines
\ Set kernel paths (see menu_caption[2] below)
set kernel_prefix=3D"kernels/"
set kernel[0]=3D"GENERIC-i386-9.0"
set kernel_suffix=3D""
# Change to (making YOURKERNEL the first kernel and GENERIC the second)
\ Set kernel paths (see menu_caption[2] below)
set kernel_prefix=3D"kernels/"
set kernel[0]=3D"YOURKERNEL"
set kernel[1]=3D"GENERIC-i386-9.0"
set kernel_suffix=3D""
# Save the file and exit
# NOTE: At this point, you *could* say "gmake freebsd" and you have FreeBSD=
-9 installation media that will use your custom kernel (YOURKERNEL) to boot=
and perform the installation. However, you may have to on to step 3 if tha=
t kernel is required to boot your newly installed OS
# NOTE: For the 8.x based media, you'll notice that the "kernel_suffix" is =
".kgz" (you will have to kgzip your kernel and make sure it has this suffix=
else you can modify the suffix; all kernels must have the same suffix, wha=
tever it is).
=3D=3D=3D
Step 3: Have the custom kernel installed as part of the OS
$ cd src/freebsd/repos/9.0-RELEASE/kernels/
# rest performed as root
$ mkdir distroot
$ cat generic.?? | tar zxf - -C distroot
$ cd distroot
$ cp YOURKERNEL GENERIC/kernel
# Optional: copy in any "*.symbols" files for debug or extra "*.ko" kernel =
modules into GENERIC/
$ ../../../../tools/distmtree > ../generic.mtree
$ tar czfo ../generic.tgz .
$ cd ..
$ rm -f generic.??
$ split -b 1425408 generic.tgz generic.
$ rm -Rf generic.tgz distroot
# rest performed as you (non-root)
$ ../../../tools/distsum
# This regenerates CHECKSUM.* and *.inf
=3D=3D=3D
Last, make the custom ISO=85
# in the druidbsd/druid or druidbsd/druid83 directory=85
../configure && gmake freebsd
# NOTE: GNU make is required. mkisofs is required. And, if you want the ISO=
to work as-intended and support both burning to CD/DVD _and_ writing to US=
B thumb drive, you'll need Perl (which usually comes with the required Byte=
s.pm module -- otherwise, you can do ./configure --disable-isohybrid).
# NOTE: Don't forget that the DRUID installer has both i386 _and_ amd64 arc=
hitectures (so if you have a custom kernel for both, you'll need to do both=
repositories in the above-described manner).
-- =
Devin
On Dec 11, 2012, at 6:26 AM, xenophon+freebsd wrote:
> How do I go about replacing the kernel on the FreeBSD installation CDs?
> I assume it's as simple as replacing the relevant files in the ISO
> image, and that if I look at "make release", I can figure out how the CD
> image gets generated. =
> =
> I'm trying to install FreeBSD onto a HP ProLiant DL380 G3 with a Smart
> Array 5i controller, for use as a file server. Rather than use Smart
> Array's RAID features, I want to use ZFS's RAID-Z1/Z2, so I have
> configured 18 RAID-0 volumes, each consisting of a single drive attached
> to the Smart Array controller. This totals 18 drives, so at boot time,
> the ciss(4) driver logs the following error:
> =
> ciss0: <Compaq Smart Array 5i> port 0x3000-0x30ff mem
> 0xf05c0000-0xf05fffff,0xf04f0000-0xf04f3fff irq 10 at device 3.0 on pci1
> ciss0: PERFORMANT Transport
> ciss0: adapter claims to report absurd number of logical drives
> (18 > 15)
> device_attach: ciss0 attach returned 6 =
> =
> According to Paul Saab
> (http://lserinol.blogspot.com/2012/03/freebsd-ciss-driver-logical-drive-
> limit.html), the constant CISS_MAX_LOGICAL limits the amount of memory
> used by the driver for DMA by default.
> =
> Best wishes,
> Matthew
> =
> -- =
> I FIGHT FOR THE USERS
> =
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
_____________
The information contained in this message is proprietary and/or confidentia=
l. If you are not the intended recipient, please: (i) delete the message an=
d all copies; (ii) do not disclose, distribute or use the message in any ma=
nner; and (iii) notify the sender immediately. In addition, please be aware=
that any message addressed to our domain is subject to archiving and revie=
w by persons other than the intended recipient. Thank you.
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):