In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to build Ubuntu file system Ubuntu-base". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1 decompress Ubuntu-base
We use the command "tar xvf ubuntu-base-16.04.5-base-armhf.tar.gz", as shown in figure 1.1:
After unzipping the root file system, use the command "ls" to view the directory.
2 install the Qemu-User-Static tool
QEMU is a software designed to simulate different machine architectures and is well supported in ubuntu. If you need to mount a ubuntu armhf version of the file, you must install the qemu-user-static tool.
First, use the command "apt-get install qemu-user-static" under Ubuntu to install, and press y to continue during the installation. As shown in figure 2.1:
This step is to install qemu-user-static on pc's ubuntu, and then use the command
"cp / usr/bin/qemu-arm-static. / usr/bin/", copy qemu-arm-static to the directory you just unzipped. As shown in figure 2.2:
3 set up the software source
The Ubuntu installation software is downloaded and installed from the Internet through the name apt-get. We need to specify the software source.
In order to successfully make the root file system networked, you can directly copy the local dns configuration file to the appropriate location of the root file system, using the command "cp / etc/resolv.conf. / etc/resolv.conf", as shown in figure 3.1:
Then modify the root file system software source and enter the file using the command "vim. / etc/apt/sources.list". As shown in figure 3.2:
To add the ubuntu arm source, I chose the source of China University of Science and Technology, and added the following at the end of the article:
Deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
Deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
Deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
Deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
Deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
Deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
Deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
Deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
Deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
Deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
As shown in figure 3.3:
Save and exit.
4 Mount the root file system and Chroot
(1) first, mount the newly downloaded file system on this machine. You need to mount proc, sys, dev, dev/pts and other file systems. Use the command "vi mount.sh" to add a mount script. As shown in figure 4.1:
As shown in figure 4.2:
Save exit:
(2) then use the command "vi umount.sh" to add the uninstall script. As shown in figure 4.3:
As shown in figure 4.4:
Save and exit.
(3) then use the command "chmod 777 mount.sh umount.sh" to modify the script permissions, as shown in figure 4.5:
At this point, we can see that the root directory has been changed to the directory where the ubuntu is currently being made.
(5) since ubuntu base is a minimum root file system, many commands and software are not available, so we need to install some commonly used commands and software first and enter the following commands:
Some screenshots are shown in figure 4.7:
(7) next, use the following command to set the host name and native IP:
As shown in figure 4.9:
(8) next configure the serial port terminal. We use the command "ln-s / lib/systemd/system/getty@.service / etc/systemd/system/getty.target.wants/getty@ttymxc0.service" to specify the serial terminal. As shown in figure 4.10:
Since I am using the i.mx6u platform, I need to add a link called getty@ttymxc0.service to connect to the getty@.service service. The platform for i.mx is ttymxc0.
(9) next, configure DHCP. You can also configure it after downloading to the development board, but it will be slow to start. Use the following command:
As shown in figure 4.11:
(10) after setting up, you can exit the root file system, enter the command "exit" to exit. As shown in figure 4.12:
(11) finally, we will execute the umount.sh script to unmount it after we exit. As shown in figure 4.13:
This is the end of the content of "how to build the Ubuntu file system Ubuntu-base". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.