Pfsense 2.0 nanobsd custom image wont boot *SOLVED*
-
hello all :)
i tried to make a pfsense 2.0 (2.0 and 2.0-RC1) nanobsd image but it wont boot after i put it on a bootable device of the target machine i just get an blinking cursor in the upperleft corner of the screen.
i got also some error message latly at the compiling session so after 80percent of the build_nano.sh script.
i show the errors later down in this threadi am using 8.1-RELEASE-p6 to build the image … the build_iso.sh works perfectly and i can boot from the iso and i can install from the iso, but if i do the same way as i build the iso for the nano image it fails !
here the steps what i do to build the dev iso / nano image
copy and paste from my "notefile"
2.) update the kernel source with csup
2a.) copy the supfile to the /etc
# cp /usr/share/examples/cvsup/standard-supfile /etc/supfile
2b.) edit the supfile
# vi /etc/supfile
2c.) add the csup server
host=CHANGE_THIS.FreeBSD.org
Change to:
host=cvsup.de.freebsd.org
2d.) run csup
#> csup -4 -L 2 /etc/supfile3.) build the kernel
# cd /usr/src
# make -j4 buildworld
# make -j4 buildkernel
# make installkernel
# shutdown -r now4.) boot into single user mode
# boot -s from the boot loader prompt
# adjkerntz -i
# mount -a -t ufs
# mergemaster -p
# cd /usr/src
# make -j4 installworld
# mergemaster
#(on mergemaster if prompted hit enter, enter)
# reboot5.) update the ports directory using csup
# rm -fr /usr/ports/*
# csup -L 2 /etc/supfile6.) configure make (step 1 from devwiki.pfsense/org/DevelopersBootStrapAndevIso)
# echo "WITHOUT_X11=yo" >> /etc/make.conf
# echo "BATCH=yo" >> /etc/make.conf
# mkdir -p /home/pfsense/pfSenseGITREPO /usr/pfSensesrc7.) grab ports and build GIT
# portsnap fetch extract
# cd /usr/ports/textproc/expat2 && make depends install
# cd /usr/ports/devel/git && make depends install
(take the standard default settings from the menu's)# cd /usr/ports/sysutils/fastest_cvsup/ && make depends install
(take the standard default settings from the menu's)
cd /usr/ports/sysutils/cdrtools && make install clean
cd /usr/ports/sysutils/screen && make install clean
# rehash8.) continue on with the GIT repo checkouts
# cd /home/pfsense && git clone http://gitweb.pfsense.org/pfsense-tools/mainline.git tools
# cd /home/pfsense && git clone http://gitweb.pfsense.org/freesbie2/mainline.git freesbie2
# cd /home/pfsense/tools/builder_scripts && chmod a+rx *.sh
# csup -hfastest_cvsup -c tld -q
/usr/share/examples/cvsup/standard-supfile
9.)
# portsnap fetch && portsnap extract
# cd /home/pfsense/tools/builder_scripts
# ./update_git_repos.sh
# ./clean_build.sh (Not really necessary most of the time, but shouldn't hurt, just adds time)
# ./set_version.sh RELENG_8_1 cvsup.de.freebsd.org
# ./apply_kernel_patches.sh
# ./build_pfPorts.sh (Actually build_iso.sh will run this, no need to do it on its own unless you are testing)
# ./build_iso.shso far the iso works …. but if i go to /home/pfsense/tools/builder_scripts/
and running build_nano.sh instead of build_iso.sh the image it wont boot and i got also some error messages while buildingCleaning build directories: pfsense-fs pfsense-clone Done!
Using GIT to checkout RELENG_2_0
Checking out tag RELENG_2_0...Done!
Making sure we are in the right branch... [OK] (RELENG_2_0)
Creating tarball of checked out contents…Done!
Building world and kernels for Embedded... 8 RELENG_8_1 ...
+++ NO_BUILDWORLD set, skipping build
Ensuring that the btxld problem does not happen on subsequent runs...
Installing world for i386 architecture...
Making hierarchy
Installing everything
Building embedded kernel...
Not adding D-Trace to Kernel...
KERNCONFDIR: /usr/pfSensesrc/src/sys/i386/conf
ARCH: i386
SRC_CONF: src.conf.embedded.8
Kernel build for pfSense_wrap.8.i386 started on Tue Nov 15 23:20:36 CET 2011
stage 1: configuring the kernel
stage 2.2: rebuilding the object tree
stage 2.3: build tools
stage 3.1: making dependencies
stage 3.2: building everything
Kernel build for pfSense_wrap.8.i386 completed on Tue Nov 15 23:20:41 CET 2011
Installing embedded kernel...
Installing kernel
Installing kernels to LiveCD area....done.
Phase populate_extra...
Making devd... Done.
Mounting devfs /usr/local/pfsense-fs/dev ...
Merging extra items...
Running plugins: customroot customscripts pkginstall buildmodules Done!
Using /usr/home/pfsense/tools/builder_scripts/../builder_scripts/copy.list.RELENG_8_0...
Populating newer binaries found on host jail/os (usr/local)...
Installing collected library information (usr/local), please wait...
Fixing up NanoBSD Specific items...
sed: -e: No such file or directory
sed: /ttyd0/s/off/on/: No such file or directory$FreeBSD: src/etc/etc.i386/ttys,v 1.10 2003/10/24 15:44:08 simokawa Exp $
@(#)ttys 5.1 (Berkeley) 4/17/89
This file specifies various information about terminals on the system.
It is used by several different programs. Common entries for the
various columns include:
name The name of the terminal device.
getty The program to start running on the terminal. Typically a
getty program, as the name implies. Other common entries
include none, when no getty is needed, and xdm, to start the
X Window System.
type The initial terminal type for this port. For hardwired
terminal lines, this will contain the type of terminal used.
For virtual consoles, the correct type is typically cons25, but
vt220 will work better if you need interoperability with other
systems like Solaris or GNU/Linux.
Other common values include network for network connections on
pseudo-terminals, dialup for incoming modem ports, and unknown
when the terminal type cannot be predetermined.
status Must be on or off. If on, init will run the getty program on
the specified port. If the word "secure" appears, this tty
allows root login.
name getty type status comments
If console is marked "insecure", then init will ask for the root password
when going to single-user mode.
console "/usr/libexec/getty Pc" cons25 on secure
#ttyv0 "/usr/libexec/getty Pc" cons25 on secure
sed: -e: No such file or directory
sed: /^ttyv[0-8]/s/ on/ off/: No such file or directory$FreeBSD: src/etc/etc.i386/ttys,v 1.10 2003/10/24 15:44:08 simokawa Exp $
@(#)ttys 5.1 (Berkeley) 4/17/89
This file specifies various information about terminals on the system.
It is used by several different programs. Common entries for the
various columns include:
name The name of the terminal device.
getty The program to start running on the terminal. Typically a
getty program, as the name implies. Other common entries
include none, when no getty is needed, and xdm, to start the
X Window System.
type The initial terminal type for this port. For hardwired
terminal lines, this will contain the type of terminal used.
For virtual consoles, the correct type is typically cons25, but
vt220 will work better if you need interoperability with other
systems like Solaris or GNU/Linux.
Other common values include network for network connections on
pseudo-terminals, dialup for incoming modem ports, and unknown
when the terminal type cannot be predetermined.
status Must be on or off. If on, init will run the getty program on
the specified port. If the word "secure" appears, this tty
allows root login.
name getty type status comments
If console is marked "insecure", then init will ask for the root password
when going to single-user mode.
console "/usr/libexec/getty Pc" cons25 on secure
#ttyv0 "/usr/libexec/getty Pc" cons25 on secure
Creating md5 summary of files present…Done.
Copying config.xml from conf.default/ to cf/conf/
Testing PHP installation in /usr/local/pfsense-fs: FCGI-PASSED PASSED [OK]
Installing packages listed in /tmp/pfspackages
Finding origins… 2 found
Finding dependencies... 2 found
Sorting 4 packages by dependencies... done.
Copying 4 packages
[0….]
Cloning /usr/local/pfsense-fs to /usr/local/pfsense-clone…Done!
Using TAR to clone...
Deleting files listed in /usr/home/pfsense/tools/builder_scripts/remove.list.iso.8
[nanoo] sandisk 1g
[nanoo] NANO_MEDIASIZE: 1947518
[nanoo] NANO_HEADS: 16
[nanoo] NANO_SECTS: 63
[nanoo] NANO_BOOT0CFG: -o packet -s 1 -m 3
Configuring NanoBSD /etc
Configuring NanoBSD setup
Using TAR to clone setup_nanobsd()…
Pruning NanoBSD usr directory...
building NanoBSD disk image (i386)...
30912+0 records in
30912+0 records out
997097472 bytes transferred in 14.155794 secs (70437411 bytes/sec)
******* Working on device /dev/md0 *******
fdisk: invalid fdisk partition table found
fdisk: Class not found
******* Working on device /dev/md0 *******
parameters extracted from in-core disklabel are:
cylinders=1932 heads=16 sectors/track=63 (1008 blks/cyl)Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1932 heads=16 sectors/track=63 (1008 blks/cyl)Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 922257 (450 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 914/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 922383, size 922257 (450 Meg), flag 0
beg: cyl 915/ head 1/ sector 1;
end: cyl 805/ head 15/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 1844640, size 102816 (50 Meg), flag 0
beg: cyl 806/ head 0/ sector 1;
end: cyl 907/ head 15/ sector 63
The data for partition 4 is:
<unused># /dev/md0s1:
8 partitions:size offset fstype [fsize bsize bps/cpg]
a: 922241 16 unused 0 0
c: 922257 0 unused 0 0 # "raw" part, don't edit
/dev/md0s1a: 450.3MB (922241 sectors) block size 4096, fragment size 512
using 36 cylinder groups of 12.66MB, 3240 blks, 1632 inodes.
super-block backups (for fsck -b #) at:
32, 25952, 51872, 77792, 103712, 129632, 155552, 181472, 207392, 233312, 259232, 285152, 311072, 336992, 362912, 388832, 414752, 440672, 466592, 492512,
518432, 544352, 570272, 596192, 622112, 648032, 673952, 699872, 725792, 751712, 777632, 803552, 829472, 855392, 881312, 907232
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0s1a 453327 1 417060 0% /tmp/builder/.mnt
283052 blocks
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0s1a 453327 145417 271644 35% /tmp/builder/.mntMounting and duplicating NanoBSD pfsense1 /dev/md0s2a /tmp/builder//.mnt
7205+1 records in
7205+1 records out
472195584 bytes transferred in 31.226573 secs (15121595 bytes/sec)
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0s2a 453327 145417 271644 35% /tmp/builder/.mnt
sed: s/pfsense0/pfsense1/g: No such file or directory
/dev/ufs/pfsense0 / ufs ro,sync,noatime 1 1
/dev/ufs/cf /cf ufs ro,sync,noatime 1 1
sed: s/pfsense0/pfsense1/g: No such file or directory
/dev/ufs/pfsense0 / ufs ro,sync,noatime 1 1
/dev/ufs/cf /cf ufs ro,sync,noatime 1 1
Creating /cf area to hold config.xml
/dev/md0s3: 50.2MB (102816 sectors) block size 4096, fragment size 512
using 4 cylinder groups of 12.55MB, 3214 blks, 1632 inodes.
super-block backups (for fsck -b #) at:
32, 25744, 51456, 77168
34 blocks
[nanoo] Creating NanoBSD upgrade file from first slice…
7205+1 records in
7205+1 records out
472195584 bytes transferred in 33.903465 secs (13927650 bytes/sec)
Image completed.
/tmp/builder//
-rw-r--r-- 1 root wheel 951M Nov 15 23:22 /tmp/builder//nanobsd.full.img
-rw-r--r-- 1 root wheel 450M Nov 15 23:22 /tmp/builder//nanobsd.upgrade.img
Operation ./build_nano.sh has ended at Tue Nov 15 23:22:53 CET 2011i really have no more ideas left why the script fails on sed .. i readed some thing from a wrong shell (or more then a shell syntax difference) but i really dunno at the moment after nights to resolve that error(s)
best thanks
ren22PS: typo on the builder pager
http://devwiki.pfsense.org/DevelopersBootStrapAndDevIso#hn_5.2a_Ensure_BSDInstaller_is_sound
/cvsup_bsdinstaller ; ./rebuild_bsdinstaller.sh
to
./cvsup_bsdinstaller ; ./rebuild_bsdinstaller.sh</unused> -
hhm ok after some testing around i will come to the result that i need to change some sed command's inside the builder_common.sh
after changing all sed "" (all sed's with double quotes) to sed (without double quotes) it works and the errors are gone :)
sed ""
change to
sedexample:
sed "" -e /ttyd0/s/off/on/ ${PFSENSEBASEDIR}/etc/ttys
change to
sed -e /ttyd0/s/off/on/ ${PFSENSEBASEDIR}/etc/ttysnow the pfSense 2.0.1-RELEASE-nanobsd (i386) with vga is booting yoohooo :)
hope someone else can need this info
best regards
ren22portsnap fetch && portsnap extract
cd /home/pfsense/tools/builder_scripts
./clean_build.sh
./set_version.sh RELENG_8_1 cvsup.de.freebsd.org
./update_git_repos.sh
./apply_kernel_patches.sh
./build_iso.sh
./build_nano.shUsing /usr/home/pfsense/tools/builder_scripts/remove.list.iso.8 …
Operation ./build_nano.sh has started at Sat Nov 19 21:10:51 CET 2011Remove list: /usr/home/pfsense/tools/builder_scripts/remove.list.iso.8
Copy list: /usr/home/pfsense/tools/builder_scripts/../builder_scripts/copy.list.RELENG_8_0
MAKEOBJDIRPREFIX: /usr/obj.pfSense
pfSense build dir: /usr/pfSensesrc/src
pfSense version: 2.0-RELEASE
CVS User: sullrich
Verbosity:
BASE_DIR: /usr/home/pfsense/tools/builder_scripts/../..
BASEDIR: /usr/local/pfsense-fs
Checkout dir: /usr/home/pfsense/tools/builder_scripts/../../pfSense
Custom root: /usr/home/pfsense/tools/builder_scripts/../../pfSense
CVS IP address: cvs.pfsense.org
Updates dir: /tmp/builder//updates
pfS Base dir: /usr/local/pfsense-fs
FreeSBIE path: /usr/home/pfsense/tools/builder_scripts/../../freesbie2
FreeSBIE conf: /dev/null
Source DIR: /usr/pfSensesrc/src
Clone DIR: /usr/local/pfsense-clone
Custom overlay:
pfSense version: 8
FreeBSD branch: RELENG_8_1
pfSense Tag: RELENG_2_0
EXTRAPLUGINS: customroot
EXTRAPLUGINS: customscripts
EXTRAPLUGINS: pkginstall
EXTRAPLUGINS: buildmodules
MODULES_OVERRIDE: i2c
MODULES_OVERRIDE: ipmi
MODULES_OVERRIDE: acpi
MODULES_OVERRIDE: ndis
MODULES_OVERRIDE: ipfw
MODULES_OVERRIDE: ipdivert
MODULES_OVERRIDE: dummynet
MODULES_OVERRIDE: fdescfs
MODULES_OVERRIDE: cpufreq
MODULES_OVERRIDE: opensolaris
MODULES_OVERRIDE: zfs
MODULES_OVERRIDE: glxsb
MODULES_OVERRIDE: runfw
MODULES_OVERRIDE: if_stf
Git Repository: https://github.com/bsdperimeter/pfsense.git
Git Branch:
Custom Config:
ISOPATH: /tmp/builder//pfSense.iso
IMGPATH: /tmp/builder//pfSense.img
MEMSTICKPATH: /tmp/builder//pfSense-memstick.img
KERNELCONF:
TARGET_ARCH_CONF_DIR: /usr/pfSensesrc/src/sys/i386/conf/
FREESBIE_COMPLETED_MAIL:
FREESBIE_ERROR_MAIL:
OVFPATH: /tmp/builder/
OVFFILE: pfSense.ovf
OVAFILE: pfSense.ova
OVFVMDK: pfSense.vmdk
OVFSTRINGS:
OVFMF:
OVFCERT:
SRC_CONF: /usr/home/pfsense/tools/builder_scripts/conf/src.conf.embedded.8
CROSS_COMPILE_PORTS_BINARIES:
SPLIT_ARCH_BUILD:
UPDATES_TARBALL_FILENAME: /tmp/builder//updates/pfSense-Full-Update-2.0-RELEASE-i386-20111119-2110.tgz
PKG_INSTALL_PORTSPFS:
CUSTOM_CALL_SHELL_FUNCTION:Cleaning build directories: pfsense-fs pfsense-clone Done!
Using GIT to checkout RELENG_2_0
Checking out tag RELENG_2_0...Done!
Making sure we are in the right branch... [OK] (RELENG_2_0)
Creating tarball of checked out contents…Done!
Building world and kernels for Embedded... 8 RELENG_8_1 ...
+++ NO_BUILDWORLD set, skipping build
Ensuring that the btxld problem does not happen on subsequent runs...
Installing world for i386 architecture...
Making hierarchy
Installing everything
Building embedded VGA kernel...
Not adding D-Trace to Kernel...
KERNCONFDIR: /usr/pfSensesrc/src/sys/i386/conf
ARCH: i386
SRC_CONF: src.conf.embedded.8
Kernel build for pfSense_wrap_vga.8.i386 started on Sat Nov 19 21:11:25 CET 2011
stage 1: configuring the kernel
stage 2.2: rebuilding the object tree
stage 2.3: build tools
stage 3.1: making dependencies
stage 3.2: building everything
Kernel build for pfSense_wrap_vga.8.i386 completed on Sat Nov 19 21:11:55 CET 2011
Installing embedded VGA kernel...
Installing kernel
Installing kernels to LiveCD area....done.
Phase populate_extra...
Making devd... Done.
Mounting devfs /usr/local/pfsense-fs/dev ...
Merging extra items...
Running plugins: customroot customscripts pkginstall buildmodules Done!
Using /usr/home/pfsense/tools/builder_scripts/../builder_scripts/copy.list.RELENG_8_0...
Populating newer binaries found on host jail/os (usr/local)...
Installing collected library information (usr/local), please wait...
Fixing up NanoBSD Specific items...
Creating md5 summary of files present...Done.
Copying config.xml from conf.default/ to cf/conf/
Testing PHP installation in /usr/local/pfsense-fs: FCGI-PASSED PASSED [OK]
Installing packages listed in /tmp/pfspackages
Finding origins… 2 found
Finding dependencies... 2 found
Sorting 4 packages by dependencies... done.
Copying 4 packages
[0….]
Cloning /usr/local/pfsense-fs to /usr/local/pfsense-clone…Done!
Using TAR to clone...
Deleting files listed in /usr/home/pfsense/tools/builder_scripts/remove.list.iso.8
[nanoo] sandisk 1g
[nanoo] NANO_MEDIASIZE: 1947518
[nanoo] NANO_HEADS: 16
[nanoo] NANO_SECTS: 63
[nanoo] NANO_BOOT0CFG: -o packet -s 1 -m 3
Configuring NanoBSD /etc
Configuring NanoBSD setup
Using TAR to clone setup_nanobsd()…
Pruning NanoBSD usr directory...
building NanoBSD disk image (i386)...
30912+0 records in
30912+0 records out
997097472 bytes transferred in 15.441514 secs (64572520 bytes/sec)
******* Working on device /dev/md0 *******
fdisk: invalid fdisk partition table found
fdisk: Class not found
******* Working on device /dev/md0 *******
parameters extracted from in-core disklabel are:
cylinders=1932 heads=16 sectors/track=63 (1008 blks/cyl)Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1932 heads=16 sectors/track=63 (1008 blks/cyl)Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 922257 (450 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 914/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 922383, size 922257 (450 Meg), flag 0
beg: cyl 915/ head 1/ sector 1;
end: cyl 805/ head 15/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 1844640, size 102816 (50 Meg), flag 0
beg: cyl 806/ head 0/ sector 1;
end: cyl 907/ head 15/ sector 63
The data for partition 4 is:
<unused># /dev/md0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 922241 16 unused 0 0
c: 922257 0 unused 0 0 # "raw" part, don't edit
/dev/md0s1a: 450.3MB (922241 sectors) block size 4096, fragment size 512
using 36 cylinder groups of 12.66MB, 3240 blks, 1632 inodes.
super-block backups (for fsck -b #) at:
32, 25952, 51872, 77792, 103712, 129632, 155552, 181472, 207392, 233312, 259232, 285152, 311072, 336992, 362912, 388832, 414752, 440672, 466592, 492512,
518432, 544352, 570272, 596192, 622112, 648032, 673952, 699872, 725792, 751712, 777632, 803552, 829472, 855392, 881312, 907232
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0s1a 453327 1 417060 0% /tmp/builder/.mnt
283395 blocks
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0s1a 453327 145586 271475 35% /tmp/builder/.mntMounting and duplicating NanoBSD pfsense1 /dev/md0s2a /tmp/builder//.mnt
7205+1 records in
7205+1 records out
472195584 bytes transferred in 33.322620 secs (14170422 bytes/sec)
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0s2a 453327 145586 271475 35% /tmp/builder/.mnt
/dev/ufs/pfsense1 / ufs ro,sync,noatime 1 1
/dev/ufs/cf /cf ufs ro,sync,noatime 1 1
/dev/ufs/pfsense1 / ufs ro,sync,noatime 1 1
/dev/ufs/cf /cf ufs ro,sync,noatime 1 1
Creating /cf area to hold config.xml
/dev/md0s3: 50.2MB (102816 sectors) block size 4096, fragment size 512
using 4 cylinder groups of 12.55MB, 3214 blks, 1632 inodes.
super-block backups (for fsck -b #) at:
32, 25744, 51456, 77168
34 blocks
[nanoo] Creating NanoBSD upgrade file from first slice…
7205+1 records in
7205+1 records out
472195584 bytes transferred in 31.662914 secs (14913207 bytes/sec)
Image completed.
/tmp/builder//
-rw-r--r-- 1 root wheel 951M Nov 19 21:13 /tmp/builder//nanobsd_vga.full.img
-rw-r--r-- 1 root wheel 450M Nov 19 21:14 /tmp/builder//nanobsd_vga.upgrade.img
Operation ./build_nano.sh has ended at Sat Nov 19 21:14:10 CET 2011</unused>