Archive

Archive for December, 2012

mfsroot starts sysinstall how?

December 18, 2012 Leave a comment

mfsroot starts sysinstall how?

I’ve been compelled to attempt to ascertain how sysinstall(8) is started from mfsroot[.gz] on multiple occasions. For various reasons, I never actually discovered the answer until I eventually encountered a scenario where my interest was peaked…I broke down and emailed freebsd-questions. I’d like to thank Jeremy for his response below!

It’s spawned by the kernel. Really. You’re probably used to the kernel
spawning /sbin/init, except that doesn’t exist in this environment. And
you probably don’t see the message about it on VGA console because
screen gets cleared immediately by sysinstall(8) right after it’s
printed. On serial console it’s much more evident — look closely at
the output (read slowly) and note the line right after “Trying to mount
root…”:

http://jdc.koitsu.org/freebsd/pxeboot_serial_install_8.html#ATTEMPTING-BOOT

The loader(8) variable called init_path defines a colon-delimited list
of executables for the kernel to attempt to run. The default value for
init_path is hard-coded into /boot/kernel/kernel. You can see it with
strings(1) if you want, but it defaults to this:

/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall

None of those, sans /stand/sysinstall, exist under mfsroot. The rest
you can figure out yourself. 🙂

You can override this by setting something [http_path] in loader.conf or by changing
the default in the kernel yourself.

I added init the boot_crunch file and the image started init(8) as opposed to sysinstall(8).

Disclaimer

This blog is posted for informational purposes only. Extensive testing is recommended prior to implementing changes discussed here.

Advertisements
Categories: FreeBSD

FreeBSD Ports Batch Install

December 10, 2012 2 comments

FreeBSD Ports Batch Install

Many ports interactively prompt for various configuration options when installing. This is both annoying and time consuming. Fortunately, it can also be avoided.

`make config-recursive` interactively prompts users for options prior to `make install` or `make package-recursive`. This, however, is still interactive. Alternatively, one could add ‘-DBATCH’ to the command and install or create packages accepting default configuration options.

The following examples install and create packages including dependencies, respectively. In the second example, packages will be written to /usr/ports/packages if it exists.

# cd /usr/ports/sysutils/puppet
# make -DBATCH install

or

# cd /usr/ports/sysutils/puppet
# make -DBATCH package-recursive

Disclaimer

This blog is posted for informational purposes only. Extensive testing is recommended prior to implementing changes discussed here.

Categories: FreeBSD

FreeBSD Partitions and Filesystems With GPART

December 3, 2012 3 comments

FreeBSD Partitions and Filesystems With GPART

The Problem

Installing FreeBSD 8.x on a machine with two disk volumes of 100GB and slightly more than 3TB. The quantity of cylinders on the 3TB volume is greater than the 65,535 cylinders supported by bsdlabel. Therefore, the filesystem does not consume the total available disk space.

This is resolved by installing and implementing gpart. I won’t go into the procedure here as Warren Block blogs on this topic very well at http://www.wonkity.com/~wblock/docs/html/disksetup.html

Installing gpart

GPART is easily installed from FreeBSD.org package repos using pkg_add(1) as follows:

# pkg_add -r gpte

It may also be installed from ports by executing the following:

# cd /usr/ports/sysutils/gpte
# make install clean

Disclaimer

This blog is posted for informational purposes only. Extensive testing is recommended prior to implementing changes discussed here.

Categories: FreeBSD