⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buildmin-10.html

📁 怎样建立一个最小的linux系统
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>How To Build a Minimal Linux System from Source Code: Util-linux (getty and login)</TITLE> <LINK HREF="buildMin-11.html" REL=next> <LINK HREF="buildMin-9.html" REL=previous> <LINK HREF="buildMin.html#toc10" REL=contents></HEAD><BODY><A HREF="buildMin-11.html">Next</A><A HREF="buildMin-9.html">Previous</A><A HREF="buildMin.html#toc10">Contents</A><HR><H2><A NAME="s10">10. Util-linux (getty and login)</A></H2><P>The util-linux package contains <CODE>agetty</CODE> and <CODE>login</CODE>. We needboth of these to be able to log in and get a bash prompt. After it is instlalled, make a symlink from <CODE>agetty</CODE> to <CODE>getty</CODE> in thetarget <CODE>/sbin</CODE> directory. <CODE>getty</CODE> is one of the programsthat is supposed to be there on all Unix-like systems, so the linkis a better idea than hacking <CODE>inittab</CODE> to run <CODE>agetty</CODE>.<P><P>I have one remaining problem with the compilation of util-linux. The package also contains the program <CODE>more</CODE>, and I have not been able to persuade the <CODE>make</CODE> process to have <CODE>more</CODE>link against the ncurses 5 library on the target system rather thanthe ncurses 4 on the source system. I'll be having a closer look atthat.<P><P>You will also need a <CODE>/etc/passwd</CODE> file on the target system.This is where the <CODE>login</CODE> program will check to find out ifyou are allowed in. Since this is only a toy system at this stage,we can do outrageous things like setting up only the root user, and not requiring any password!! Just put this in the target<CODE>/etc/passwd</CODE><P><P><P><PRE>root::0:0:root:/root:/bin/bash</PRE><P><P>The fields are separated by colons, and from left to right they areuser id, password (encrypted), user number, group number, user's name,home directory and default shell.<P><HR><A HREF="buildMin-11.html">Next</A><A HREF="buildMin-9.html">Previous</A><A HREF="buildMin.html#toc10">Contents</A></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -