Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2002 15:02:05 +0200
From:      kurt@pinboard.com
To:        doc@freebsd.org
Subject:   installation docu update
Message-ID:  <20020825150205.A88846@pinboard.com>

next in thread | raw e-mail | index | archive | help
Hi there!

I'd have a suggestion for an additional item in the FreeBSD installation
docs. Some of the installations I do are via serial ports on machines
which are on the other side of the world, connecting from one machine at
that site via null-modem cable to the machine to be installed.

2.12.1 Installing FreeBSD on a System without a Monitor or Keyboard
(http://www.freeBSD.org/doc/en_US.ISO8859-1/books/handbook/install-advanced.html)
does a good job of explaining how such an installation can be done. It
does, however, require some personnel to insert boot floppies. I was
looking for a way to avoid this if the target system already had an old
version of FreeBSD running. It was not a big problem getting pretty
close, but for a long time I failed due to minor steps. Here are the
instructions of how to do it.

 1) make sure you can access the target machine via serial cables
 2) from the installation CDROM or by ftp from an FreeBSD mirror
    get the boot floppy boot.flp onto the target machine
    (cp /cdrom/floppies/boot.flp /tmp/)
 3) configure a vnode disk to access the contents of boot.flp
    (vnconfig -e vn0c /tmp/boot.flp)
 4) mount the vnode disk
    (mount -o ro /dev/vn0c /mnt)
 5) move the whole /boot/ directory of the old installation
    (mv /boot /ori.boot)
 6) move the file-system-table of the old installation
    (mv /etc/fstab /etc/ori.fstab)
 7) move the kernel of the old installation
    (mv /kernel /ori.kernel)
 8) copy the contents of the boot image to the root partition of
    the target machine
    (
     cd /mnt
     tar cf - * | (cd /; tar xvf -)
    )
 9) optionally the temporary mount and the vnode disk can be
    unconfigured again
    (
     cd /tmp
     umount /mnt
     vnconfig -u /dev/vn0c
    )
10) go to the newly created /boot/ directory and set the option to
    use the first serial port as console
    (
     cd /boot
     echo "set console=comconsole" >loader.rc.new
     cat loader.rc >>loader.rc.new
     mv loader.rc.new loader.rc
    )
11) you're now ready to boot into the installation routine
    (shutdown -r now)
12) do the installation as usual, via the serial console
13) at the end of the installation you _must_ add an user account which
    is a member of the group wheel, otherwise you won't have a user to
    login on the serial port and su to root
14) before getting out of the installation routines completely and
    rebooting  the system go to Configure -> TTY's and adjust the line
    starting with ttyd0 (1st serial port) so you can login via the
    serial port in case something with the network is not yet fine:
    old:  ttyd0  "/usr/libexec/getty std.9600"  dialup  off  secure
    new:  ttyd0  "/usr/libexec/getty std.9600"  vt100   on   secure

    Good luck!

--
----------------------------------------------------------------------
: Kurt@pinboard.com          http://www.pinboard.com/       business :
:                            http://kurt.www.pinboard.com/  private  :
----------------------------------------------------------------------
:                    Unix and Internet Specialist                    :
: PGP fingerprint C34E BCD4 BA8B 1337 14FE  116C 2657 FFAC 08B9 BFC7 :
----------------------------------------------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020825150205.A88846>