Thanks
ShelLuser, my serial ports are apparently well supported in FreeBSD 10!
I am happy to report I managed to do a fresh install of FreeBSD 10.x through serial.
Just in case anybody has to do this one day, here is the way I did it, nothing very difficult but the chance of losing the server puts some sort of pressure...
Prerequisite:
In my case, I have another HDD that I could free up on my server to put the CDROM installation contents on and boot from it.
I have
/dev/idad0 for the current system FreeBSD 8.1-STABLE and
/dev/idad1 for data which is going to be used as remote installation device.
Preparation:
I actually tried first on Virtualbox and spent most of my time getting the console working on Virtualbox as I had no real experience with it. I actually referred to the guidance given here:
https://gist.github.com/snb/284940. I did not use
socat as you can just
telnet
to the socket created in
/tmp. Once it was enabled, I did two attempts to make sure I would not miss anything and prepare myself.
HOWTO:
The following can be done through SSH or Serial.
My system is super old and has 512MB of RAM only, so I just went with
FreeBSD-10.0-RELEASE-i386-disc1.iso that I downloaded to the current system.
Once the download was complete, I copied the ISO to the HDD that I would use to boot the FreeBSD 10.xinstaller, just do this:
dd if=/path/to/the/ISO/FreeBSD-10.0-RELEASE-i386-disc1.iso of=/dev/idad1
On my super old system copy took ages, 5500 seconds to copy the 550MBytes to the /dev/idad1.
Make sure you have a backup of everything you need as the system is about to be wiped.
At this stage, go to the remote serial.
- Reboot the server
- Go in boot mode, it varies depending on the version you run, in my case I go from FreeBSD 8.1 where you select '6' to go into boot mode
- Once in boot mode, you will have an 'OK' prompt
- Verify your disks by running
lsdev
It should look like the following:
Code:
OK lsdev
cd devices:
disk devices:
disk0: BIOS drive A:
disk1: BIOS drive C:
disk1s1: Unknown fs: 0x12
disk1s2a: FFS
disk1s2b: swap
disk1s2d: FFS
disk1s2e: FFS
disk1s2f: FFS
disk2: BIOS drive D:
pxe devices:
Yes, disk0 is a floppy disk ;-), disk1 is the current FreeBSD 8.1-STABLE, so the one I am interested in is disk2 where my installer should be thanks to the dd
done earlier.
Let's see how it goes by changing the boot to disk2 using: set currdev=disk2
I then unload the current kernel then load the one from the installer:
Code:
OK unload
OK load kernel
/boot/kernel/kernel text=0xea8530 data=0xcf5f0+0xda970 syms=[0x4+0xd0bc0+0x4+0x1530e3]
The latter shows that the kernel was read and loaded which is a good sign
Now let's: OK boot
Code:
Installation has started for FreeBSD 10.x
[code]Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014
root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
CPU: Intel Pentium III (930.41-MHz 686-class CPU)
Origin = "GenuineIntel" Id = 0x686 Family = 0x6 Model = 0x8 Stepping = 6
Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory = 536870912 (512 MB)
avail memory = 502689792 (479 MB)
I told you the system was old
After that point, the installation will happen the same way as any other installation with the exception that due to the hardware I have, I did not try the installation with ZFS and went with the Guided one.
Make sure to drop into a shell at the end and do the following crucial steps to keep access via console:
echo 'console="comconsole"' >>/boot/loader.conf
echo '-D' >>/boot.config
Edit /etc/ttys for the line you use, in my case:
Code:
ttyu0 "/usr/libexec/getty std.9600" dialup off secure
became
Code:
ttyu0 "/usr/libexec/getty std.9600" vt100 on secure
Verify/modify/tune your /etc/rc.conf as per your needs, try to keep it as basic as possible to avoid any issue.
- REBOOT
If all goes well, you will boot in FreeBSD 10.x which I then upgraded without any problem using
freebsd-update
Code:
root@glouglou:~ # uname -a
FreeBSD glouglou.xxxxxx.xxx 10.0-RELEASE-p10 FreeBSD 10.0-RELEASE-p10 #0: Mon Oct 20 12:38:37 UTC 2014 [EMAIL]root@amd64-builder.daemonology.net[/EMAIL]:/usr/obj/usr/src/sys/GENERIC i386
Glad to have done it as I am 5000 KMs away from this server which had a nice 1525-day uptime before the fresh install but I like the new pkg system so much I wanted to get a more recent installation and stick to a -RELEASE instead of going -STABLE!
Thanks to the FreeBSD team for making this kind of install possible, this is very convenient!