Explore information related to freebsd

Redirect FreeBSD Console To A Serial Port for KVM Virsh - How to do it

This article covers how to redirect FreeBSD in KVM to the serial port.

FreeBSD does support a dumb terminal on a serial port as a console.


This is useful for quick login or debug guest system problem without using ssh. 

1. First, login as root using ssh to your guest operating systems:

$ ssh ibmimedia@freebsd.ibmimedia.com

su -

2. Edit /boot/loader.conf, enter:

# vi /boot/loader.conf

3. Append the following entry:

console="comconsole"

4. Save and close the file. Edit /etc/ttys, enter:

# vi /etc/ttys

5. Find the line that read as follows:

ttyd0  "/usr/libexec/getty std.9600"   dialup  off secure

6. Update it as follows:

ttyd0   "/usr/libexec/getty std.9600"   vt100   on secure

7. Save and close the file. Reboot the guest, enter:

# reboot

8. After reboot, you can connect to FreeBSD guest as follows from host (first guest the list of running guest operating systems):

# virsh list

Sample outputs:


 Id Name                 State

----------------------------------

  3 ographics            running

  4 freebsd              running

9. Now, connect to Freebsd guest, enter:

virsh console 4

OR

virsh console freebsd

Read More



FreeBSD Apache Jail Connection refused connect to listener failed

This article covers how to fix 'FreeBSD Apache Jail: Connection refused' issue for our customers. 

While running Apache 2 server under FreeBSD jail, you may see a warning error messages in /var/log/httpd-error.log as follows:

[warn] (61)Connection refused: connect to listener on 0.0.0.0:80


To resolve this FreeBSD Apache Jail error:

1. You need to always set your actual, real IP. Open httpd.conf

# vi /usr/local/etc/apache22/httpd.conf

2. Find out Listen directive:

#Listen 12.34.56.78:80

Listen directive allows you to bind Apache to specific IP addresses and/or ports, instead of the default. 

Change this to Listen on specific IP addresses as shown below to prevent Apache from glomming onto all bound IP addresses i.e. 0.0.0.0 which is not available in jail

3. Save and close the file. Restart apache:

# /usr/local/etc/rc.d/apache22 restart

Read More



Using FreeBSD Single-User Mode to recover from File System Corruption

This article will guide you on how to recover from #File #System #Corruption Using FreeBSD's Single-User Mode.

While #filesystem corruption is never a good thing, it doesn't necessarily mean that all of your important data was lost. The success of your #recovery #operations comes down to a number of factors, such as how quickly the filesystem noticed the corruption, how widespread the issue was, and what files were affected.

Corrupted files are computer files that suddenly become inoperable or unusable. There are several reasons why a file may become corrupted. In some cases, it is possible to recover and fix the corrupted file, while at other times it may be necessary to delete the file and replace it with an earlier saved version.

To fix corrupted files in #Windows 10:

1. Use the #SFC tool.

2. Use #DISM tool.

3. Run SFC scan from Safe Mode.

4. Perform SFC scan before Windows 10 starts.

5. Replace the files manually.

6. Use System #Restore.

7. Reset your Windows 10.

Read More



Configuring Static IP and Hostname in FreeBSD 12 Steps to take

This article will guide you on how to configure network settings in FreeBSD by setting static IP addresses and DHCP addresses.

Read More