[64-bit 2.0 official version system] Raspberry Pi uses virtual machine to run FreeBsd system

1. What is FreeBSD?

FreeBSD is a Unix-like operating system, FreeBSD is the world's first open source system, it is derived from the source code based on BSD Unix. BSD Unix is ​​an operating system developed by the University of California, Berkeley from 1975 to 1993. FreeBSD is an enterprise-level system that supports many hardware and architectures. Like other operating systems in the BSD family, FreeBSD's core, drivers, and all Userland applications (such as the Unix shell and commands such as cat and ps) are stored in the source code library.

2. Why is FreeBSD?

The BSD protocol gives FreeBSD unlimited tolerance. Its network stack is excellent.

3. Download the system image

Register an account at the Huawei Cloud Open Source Mirror Site and log in

https://mirrors.huaweicloud.com/

We visit the URL directly in the browser

https://repo.huaweicloud.com/freebsd/releases/VM-IMAGES/12.1-RELEASE/amd64/Latest/

Insert picture description here
Then select qcow2 mirror

4. Import the virtual machine file into the system

Unzip the FreeBSD-12.1-RELEASE-amd64.qcow2.xz file and place it on the computer desktop. Upload to the Raspberry Pi via winSCP (either FTP software).
Insert picture description here
File protocol SCP, the user name is pi by default, the password is raspberry by default, and the host name is IP address. Generally speaking, the router is visible.
After accepting the host key, drag the file directly into it. The initialization directory should be /home/pi. The specific time depends on the network connection method and the SD card reading rate.
Insert picture description here

5. Configure the virtual machine

Open the VNC connection (if your Raspberry Pi is equipped with a display, you don't need to open the vnc, just operate it directly on the display)
Insert picture description here
Click on the apple in the upper left corner, find the system, and click "Virtual System Manager".
Insert picture description here
Enter the password of the pi user raspberry and click "Authorize".
Insert picture description here
Click the icon to create a new virtual machine.
Insert picture description here
Choose how to install the operating system: "Import Existing Disk Options"
Architecture: "X86_64"
Insert picture description here
Click "Browse" and
Insert picture description here
click "Local Browse" to find the FreeBSD-11.2-RELEASE-amd64.qcow2 file that you just imported.
Insert picture description here
Insert picture description here
General configuration
Insert picture description here
Resource configuration Generally speaking, 1G memory and 1 core is enough. You
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
need to wait a little longer.
If you are stuck in the sendmail service for a long time,
it is recommended to directly ctrl C to terminate this service. This service can be completely shut down after booting.
Insert picture description here
After the installation is complete, enter root to log in.
Insert picture description here
Insert picture description here
Just press Enter without password. This completes the system installation.

First we have to set a root password

passwd

Then enter the password twice, it is recommended to use raspberry to facilitate login.

6. Configure ssh login

ee /etc/ssh/sshd_config 

(Note: ee is an editor under FreeBSD, press ESC to save and exit according to the options)

In the file, delete the # in the picture line below, and change "no" to "yes";
Insert picture description here
Insert picture description here
press ESC to save.
Similarly, write a new line in the /etc/rc.conf file

ee /etc/rc.conf

Write sshd_enable="YES" to
Insert picture description here
generate an SSH key:
ssh-keygen A
Insert picture description here
and restart the sshd service:

service sshd restart 

View system ip address:

ifconfig

Insert picture description here
After checking the IP, you can remotely link to the FreeBSD system in the qemu virtual machine through ssh.

Enter the following command in the local system terminal:

ssh [email protected](你的ip)

Enter yes, then press Enter, then enter the previously set password raspberry, you can successfully log in
Insert picture description here

Easter eggs

Terminal input:

grdc

Get a retro clock:
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41676577/article/details/112974403