tiny6410nfs挂载问题
一、制作根文件系统
1.下载最新版的 busybox 地址:http://www.busybox.net/downloads/
2、编译busybox。先make menuconfig ,修改以下:
Busybox Settings --->
Build Options --->
Build BusyBox as a static binary
//我们使用动态链接的方式生成需要的命令,所以不选
(arm-linux-) Cross Compiler prefix
//这里和Makefile里保持一致,应该写一处就行了
Busybox Settings --->
Installation Options--->
(./_install)Busybox Installation Prefix
//安装路径前缀,可以保留默认路径(./_install)
Busybox Settings --->
Installation Options--->
Fancy shell prompts
//选中可以使我们在profile这个中设置的命令行提示符PS1中的转义字符生效。
Tab completion也选上
Init Utilities--->
Support reading an inittab file
//选中可以使我们放在/etc下的inittab这个文件被busybox的init进程解析
保存退出,直接make,make install。
3、用shell脚本创建根文件系统的目录结构,并在想要建立根文件系统的地方运行此脚本。我是用root用户登陆的,直接创建了设备节点。
root@li-ace:/# vim makedir.sh
#!/bin/sh
echo "makeing rootdir"
cd /home/li
mkdir rootfs
cd rootfs
echo "makeing dir: bin dev etc lib proc sbin sys usr mnt tmp var home root ..."
mkdir bin dev etc lib proc sbin sys usr mnt tmp var home root #13 dirs
mkdir usr/bin usr/lib usr/sbin usr/share lib/modules
#Don't use mknod, unless you run this Script as
mknod -m 777 dev/console c 5 1
mknod -m 777 dev/null c 1 3
echo "done"
执行这个sh:
root@li-ace:/# sh makedir.sh
创建出一个主文件夹rootfs,里面有一批文件:
root@li-ace:/home/li/rootfs:/# ls
bin dev etc home lib mnt proc root sbin sys tmp usr var
PS:
mknod -m 777 dev/console c 5 1
mknod -m 777 dev/null c 1 3
//这两个节点文件一定要全部解开,不然挂载时就会出现下面的错误
Freeing init memory: 1428K
mount: RPC: Remote system error - No route to host
/init: line 103: can't open /r/dev/console: no such file
Kernel panic - not syncing: Attempted to kill init!
4、 把busybox源码目录下的etc的内容拷贝到这里的etc下
root@li-ace:/# cd etc/
root@ etc:/# cp -a /home/li/busybox-1.17.2/examples/bootfloppy/etc
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
dm9000 dm9000: eth0: link down
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.230, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.230, domain=, nis-domain=(none)
dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
,
bootserver=255.255.255.255, rootserver=192.168.1.101, rootpath=
Freeing init memory: 1428K
Please press Enter to activate this console.
[root@Enjoylinux /]#
OK,这样就启动完成了,ls查看下可以看到文件系统里的目录
Please press Enter to activate this console.
[root@Enjoylinux /]# ls
bin etc lib mnt root sys usr
dev home linuxrc proc sbin tmp var
[root@Enjoylinux /]#
tiny6410nfs挂载问题的更多相关文章
- linux系统维护时的一些小技巧,包括系统挂载新磁盘的方法!可收藏!
这里发布一些平时所用到的小技巧,不多,不过会持续更新.... 1.需要将history创建硬链接ln 全盘需要备份硬链接 ln /etc/xxx /home/xxx 2.root用户不可以远程 /et ...
- U盘安装Kali 出现cd-rom无法挂载 已解决
用U盘安装Kali Linux的过程中,出现cd-rom无法挂载的现象,百度坑比啊,醉了.下面亲测成功 出现无法挂载后,选择执行shell 第一步:df -m此时会看到挂载信息,最下面的是/dev/* ...
- linux mount/umount挂载命令解析。
如果想在运行的Linux下访问其它文件系统中的资源的话,就要用mount命令来实现. 2. mount的基本用法是?格式:mount [-参数] [设备名称] [挂载点] 其中常用的参数有: ...
- 《连载 | 物联网框架ServerSuperIO教程》- 14.配制工具介绍,以及设备驱动、视图驱动、服务实例的挂载
注:ServerSuperIO二次开发套件授权码申请---截止到:2016-12-09 1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架Server ...
- 开源物联网框架ServerSuperIO 3.0正式发布(C#),跨平台:Win&Win10 Iot&Ubuntu&Ubuntu Mate,一套设备驱动跨平台挂载,附:开发套件和教程。
3.0版本主要更新内容: 1.增加跨平台能力:Win&Win10 Iot&Ubuntu&Ubuntu Mate 2.统一设备驱动接口:可以一套设备驱动,跨平台挂载运行,降低人力 ...
- nfs挂载配置
nfs挂载步骤 服务器端 1.安装nfs-utils rpcbind $sudo yum –y install nfs-utils rpcbind 2.文件开放出去配置/etc/exports 例子: ...
- mount常用挂载命令
挂接命令(mount) 首先,介绍一下挂接(mount)命令的使用方法,mount命令参数非常多,这里主要讲一下今天我们要用到的. 命令格式: mount [-t vfstype] [-o optio ...
- Linux系统下面挂载u盘
1.先插好u盘到Linux服务器,然后查看u盘挂载到哪个目录下面. [root@localhost ~]# /sbin/fdisk -l 2.挂载到u目录下面 [root@localhost ~]# ...
- autofs自动挂载
autofs是根据需要自动挂载,默认5分钟不使用自动卸载挂载点!nfs,smb,iso,sd*的挂载 环境:RHEL6.5/Centos6.5 172.24.0.25 01.安装autofs y ...
随机推荐
- iOS自定义组与组之间的距离以及视图
iOS自定义组与组之间的距离以及视图 //头视图高度 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(N ...
- MySQL PLSQL Demo - 002.变量定义、赋值
drop procedure if exists p_hello_world; create procedure p_hello_world() begin declare v_number int; ...
- Oracle PLSQL Demo - 17.游标查询个别字段(非整表)
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno% ...
- 将ip地址转换成C段地址的UDF
将ip地址转换成C段地址的UDF,最重要的是判断IP地址的正则表达式. package cn.cnnic.ops.Study; import java.util.regex.Pattern; impo ...
- SharePoint自动化系列——通过PowerShell创建SharePoint List Items
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 代码如下(保存到本地ps1文件中,右键run with PowerShell即可): Add-PS ...
- Clock函数用法
clock()是C/C++中的计时函数,而与其相关的数据类型是clock_t.在MSDN中,查得对clock函数定义如下: clock_t clock(void) ; 这个函数返回从“开启这个程序进程 ...
- Unity Vector3.Slerp使用范例
using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestSler ...
- C语言 · 黑色星期五
算法训练 黑色星期五 时间限制:1.0s 内存限制:512.0MB 问题描述 有些西方人比较迷信,如果某个月的13号正好是星期五,他们就会觉得不太吉利,用古人的说法,就是“诸事不宜” ...
- HTML——图片自动轮换和手动轮换
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- kafka操作清单
1. 查看topic个数 ./kafka-topics.,dwtest-data3:,dwtest-data4: 2. 查看topic的生产者与消费者消息 ./kafka-topics.,dwtest ...