Chinaunix首页 | 论坛 | 博客
  • 博客访问: 469705
  • 博文数量: 144
  • 博客积分: 5675
  • 博客等级: 大校
  • 技术积分: 1512
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-20 10:46
文章分类

全部博文(144)

文章存档

2014年(1)

2013年(1)

2012年(12)

2011年(39)

2010年(48)

2009年(29)

2008年(14)

我的朋友

分类: LINUX

2011-07-31 10:06:49

1) install freebsd from CDROM
setup filesystem
root 5G
swap 1G
var  >5G
usr  >20G

home dirs will be in /usr/home

Select Kern-Develper, all src

2)update ports

portsnap fetch extract update

portsnap.hshh.org(电信)
portsnap2.hshh.org(电信)
portsnap3.hshh.org(网通)

3)install cvsup-without-gui-16.1h_2

#cd  /usr/ports/net/cvsup-without-gui/
#make install clean

4) install cdrtools

cd /usr/ports/sysutils/cdrtools
make install clean

5)cp network driver
copy  if_re.c and if_rereg.h to  /usr/src/sys/dev/re
copy  Makefile  to /usr/src/sys/modules/re


6)Recompile and rebuild the entire system to make sure it's clean:

#cd /usr/src
#make buildworld
#make buildkernel
#make installkernel

7)boot into single-user

mount -a
cd /usr/src/usr.sbin/mergemaster
./mergemaster.sh -p  (say no to delete temproot)
cd /usr/src
make installworld
mergemaster (delete all temproot,at last setup select no delete temproot)
reboot


8)setup a cvsupfile for the rest of the system:

(1) IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at

ee /root/release-supfile
  Content:

*default host=cvsup10.us.FreeBSD.org (default host=cvsup.tw.FreeBSD.org  or ftp.freebsdchina.org)*default base=/var/db
*default prefix=/usr/home/ncvs
*default release=cvs  (make sure to remove the tag here)
*default delete use-rel-suffix

# If you seem to be limited by CPU rather than network or disk bandwidth,try
# commenting out the following line.  (Normally, today's CPUs are fast enough
# that you want to run compression.)
*default compress

# ports-all
src-all
doc-all
cvsroot-all
#

(2) init the cvs database:
cvs -d /usr/home/ncvs init
then
populate our local cvs database with the command: cvsup -g /root/release-supfile

9)
Now we make a unmodded  release itself (takes about 3 hours):
cd /usr/src/release
make release RELEASETAG=RELENG_7_2 PORTSRELEASETAG=HEAD
BUILDNAME=7.2-RELEASE CHROOTDIR=/usr/home/releng NODOC=yes NOPORTS=yes CVSRO
OT=/usr/home/ncvs

#notes:
This will put the files to stage for the bootable ISO into /home/releng/R
The kernel will go into /home/releng/R/cdrom/disc1/boot/kernel
This will also put the files for FTP installation in /home/releng/R/ftp
which must be used with the ISO image for
an FTP installation if the CD drive becomes inaccessible during
installation.

10)
cd /usr/home
(makes it with no floppy emulation)
sh /usr/src/release/i386/mkisoimages.sh -b FreeBSD6
/usr/home/6.1-RELEASE-disc1.iso /usr/home/releng/R/cdrom/disc1





Now an Article

OK you asked for it.  Note this is -very rough- notes.  It is notes that you
use if you
understand the procedure, not what you use as an educational explanation.
You will
probably need to change directory locations for the various invocations.


 I did a boot from bootable CDROM then network install

setup filesystem :

root 2G
swap 1G
var  2G
usr  30G

home dirs will be in /usr/home

Select Kern-Developer, no Xwindows, no ports


After reboots, sysinstall and install cvsup-without-gui-16.1h_2 from the FTP
site

Also install a complete set of sources from the distribution media


8) Upgrade ports directories

cd /root

  c) cp /usr/share/examples/cvsup/ports-supfile .
  d) vi ports-supfile   change mirror name
     cvsup10.us.FreeBSD.org
  e) rehash
  f) cvsup -g -L 2 /root/ports-supfile
  g) Create the index with the command make index or
  g) Fetch the index with the command "make fetchindex"

now install cdrtools

  cd /usr/ports/sysutils/cdrtools
  make install


Recompile and rebuild the entire system to make sure it's clean:

cd /usr/src
make buildworld
make buildkernel
make installkernel

boot into single-user
boot -s
mount /
mount /tmp
mount all the rest of the system
cd /usr/src/usr.sbin/mergemaster
./mergemaster.sh -p  (say no to delete temproot)
cd /usr/src
make installworld
mergemaster
reboot

this results in a system that is a duplicate of the -release system if done
right

Now we start our updated builds:

NOTE:  These notes helped:
http://romana.now.ie/writing/customfreebsdiso.html

) setup a cvsupfile for the rest of the system:

e) cd /root cp ports-supfile release-supfile
vi release-supfile and change the bottom half to:

 IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at
*default host=cvsup10.us.FreeBSD.org
*default base=/var/db
*default prefix=/usr/home/ncvs
*default release=cvs  (make sure to remove the tag here)
*default delete use-rel-suffix

# If you seem to be limited by CPU rather than network or disk bandwidth,
try
# commenting out the following line.  (Normally, today's CPUs are fast
enough
# that you want to run compression.)
*default compress

# ports-all
src-all
doc-all
cvsroot-all
#

) init the cvs database:

cvs -d /usr/home/ncvs init

 populate our local cvs database with the command: cvsup -g
/root/release-supfile

Now we got a local CVS synced to the master repository.

Now, before we start tearing into the new stuff, let's create our old src
and /usr/obj into
a RELEASE by doing this:

Now we make a unmodded  release itself (takes about 3 hours):
cd /usr/src/release
make release RELEASETAG=RELENG_6_1 PORTSRELEASETAG=HEAD
BUILDNAME=6.1-RELEASE CHROOTDIR=/usr/home/releng NODOC=yes NOPORTS=yes CVSRO
OT=/usr/home/ncvs

This will put the files to stage for the bootable ISO into /home/releng/R
The kernel will go into /home/releng/R/cdrom/disc1/boot/kernel
This will also put the files for FTP installation in /home/releng/R/ftp
which must be used with the ISO image for
an FTP installation if the CD drive becomes inaccessible during
installation.

cd /usr/home
(makes it with no floppy emulation)
sh /usr/src/release/i386/mkisoimages.sh -b FreeBSD6
/usr/home/6.1-RELEASE-disc1.iso /usr/home/releng/R/cdrom/disc1

burn this CD and test it as a scratch install CD!

Now to make a release off the current source for the tree:

  Since a whole lot of stuff
has dependencies, we want to start by saving the existing RELEASE source
tree (we might need it to regenerate a kernel)
cd /usr
mv src src.original

Blow away old releases and such
To delete the release then chflags -R noschg /usr/home/releng rm -r
/usr/home/releng rm -r /usr/obj rm -r /usr/src

cvsup -g /root/release-supfile (resync the src)

Replace this with the current source we are working on:

cd /usr
cvs -d /usr/home/ncvs checkout src

Now, before building a release, must buildworld (don't have to install it
though)
cd /usr/src
make -j4 buildworld  (approx 1.6 hours on 1.8Ghz Athlon with Promise
FastTrack RAID chip with -j4 option)
(only do this to check the kernel builds, not needed for a make release)
make buildkernel KERNCONF=GENERIC
NOTE: this puts the CURRENT into /usr/obj

Now we make a unmodded current  release itself (takes about 3 hours):
add audit:*:77: to /etc/group
cd /usr/src/release
make release RELEASETAG=RELENG_6_1 PORTSRELEASETAG=HEAD
BUILDNAME=6.1-RELEASE CHROOTDIR=/usr/home/releng NODOC=yes NOPORTS=yes CVSRO
OT=/usr/home/ncvs

This will put the files to stage for the bootable ISO into /home/releng/R
The kernel will go into /home/releng/R/cdrom/disc1/boot/kernel
This will also put the files for FTP installation in /home/releng/R/ftp
which must be used with the ISO image for
an FTP installation if the CD drive becomes inaccessible during
installation.

To make our own modded release in addition to GENERIC, do this instead:

(go build the modded kernel)

If you want to put your modded kernel on an ISO then do this:

cd /home/releng/R/cdrom/disc1/boot
 mv kernel kernel.old
md kernel
cp where-i-built-modded-kernel/* kernel


then make the modded ISO:

cd /home
sh /usr/src/release/i386/mkisoimages.sh -b FreeBSD6
/home/6.0-CURRENTMODDED-disc1.iso /home/releng/R/cdrom/disc1



now make the bootable iso

cd /home
(makes it with no floppy emulation)
sh /usr/src/release/i386/mkisoimages.sh -b FreeBSD6
/home/6.1-PRERELEASE-disc1.iso /home/releng/R/cdrom/disc1


Note - burn this to CD rom media, not CDRW, it seems not to like the CDRW
media
阅读(917) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~