Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install Centos 5.7 and FreeBSD 8.2 on KVM with serial console access. This is what I used:

sudo virt-install -n freebsd -r 1024 --vcpus=2
 --os-type unix --accelerate -v
 --disk /var/kvm/installation-disks/freebsd8.2.img,size=10
 --nographics --network user
 --cdrom=/var/kvm/cd-images/FreeBSD-8.2-RELEASE-amd64-disc1.iso
 -x console=ttyS0,115200

In both cases I get stuck once the serial console is loaded, which becomes non-interactive and this is what I get:

Creating domain...                                                 0 B 00:00 
Connected to domain freebsd
Escape character is ^]

Centos fails to provide a serial console because its bootloader loads an image (which serial console cannot display) and freebsd fails for some other reason.

The method specified here failed as well.

So, do these OS's have pure text vm-friendly installers? Or is there any other way to install them with normal installation ISO's?

EDIT 1: I was able to install centos with this -l http://mirrors.ecvps.com/centos/6/os/x86_64/ The mirror directory should have a .treeinfo file and only then a pure text based installation can be done.

Are there such mirrors for freebsd? Googling didn't help me.

P.S. Centos installation was successfull, but post-installation reboot failed to get the serial console back.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

CentOS

For CentOS you will need to re-make the ISO file. I know that is possible, but I do not know the process. However, I do know what you will need to modify the syslinux.cfg file.

When I did this process, it was with a USB stick on to a physical box, so the editing was easier. It might be worth checking to see if you can boot from a folder structure on the host.

The modifications to syslinux.cfg

  • Insert the following text into the first line of the file:

    serial 0 9600

  • On any of the boot options you want, on the kernel lines:

    • Append the text: console=tty0 console=ttyS0,9600n8

Post Install

To get a serial login prompt, you need to edit two files.

  • Add a line to /etc/inittab

    7:23:respawn:/sbin/agetty -h -L ttyS0 9600 vt100

  • Add a line to /etc/securetty

    ttyS0

The first edit is required for CentOS to present a serial login prompt. The second is required if you want to be able to login as root over that prompt.

If you want to use the higher serial baud rate of 115200, replace 9600 in all three locations in the above instructions

share|improve this answer

I think your best bet would be to automate the VM deployment using a local PXE server. If you can't do that, there's always the option of connecting to the host remotely with ssh -X and running virt-manager to install the VM with a GUI. Or just connecting to the VM console remotely using VNC or SPICE

share|improve this answer

FreeBSD

Try connecting with the serial baud rate set to 9600. That is more often the default serial speed.

sudo virt-install -n freebsd -r 1024 --vcpus=2
 --os-type unix --accelerate -v
 --disk /var/kvm/installation-disks/freebsd8.2.img,size=10
 --nographics --network user
 --cdrom=/var/kvm/cd-images/FreeBSD-8.2-RELEASE-amd64-disc1.iso
 -x console=ttyS0,9600
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.