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用户登陆的,直接创建了设备节点。
[email protected]:/# 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:
[email protected]:/# sh makedir.sh
创建出一个主文件夹rootfs,里面有一批文件:
[email protected]:/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下
[email protected]:/# cd etc/
[email protected] 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.                                                                                                 
[[email protected] /]#

OK,这样就启动完成了,ls查看下可以看到文件系统里的目录

Please press Enter to activate this console.                                                                                                 
[[email protected] /]# ls                                                                                                                      
bin      etc      lib      mnt      root     sys      usr                                                                                    
dev      home     linuxrc  proc     sbin     tmp      var                                                                                    
[[email protected] /]#

时间: 2024-08-27 18:23:10

tiny6410nfs挂载问题的相关文章

linux云自动化运维基础知识14(设备挂载)

####1.设备访问####1.设备识别/dev/xdxn        ##硬盘设备/dev/sda1/dev/cdrom        ##光驱/dev/mapper/*        ##虚拟设备 2.设备的使用##<设备的发现>##fdisk -l        ##查看真实存在的设备cat /proc/partitions    ##系统能够识别的设备blkid            ##系统能够挂载使用的设备iddf            ##查看设备被系统使用的情况 ##<

Windows挂载NFS文件系统

主机 操作系统 IP地址 软件包 NFS主机 Centos7.2 192.168.190.128 nfs-utils.rpcbind Windows Client Windows server 2008 192.168.190.129 网络文件系统 注:以下实验均关闭防火墙以及其它安全机制 NFS主机操作: # 使用yum安装nfs-utils和管理工具rpcbind [[email protected] ~]# yum -y install nfs-utilsrpcbind # 建立共享文件夹

利用s3fs 将 s3 bucket 挂载到Linux目录

S3fs是基于FUSE的文件系统,允许Linux和Mac Os X挂载S3的存储桶在本地文件系统,S3fs能够保持对象原来的格式.关于s3fs-fuse的功能.使用方法.下载可参考:https://github.com/s3fs-fuse/s3fs-fuse 1.本文主要介绍将s3的bucket挂载到Linux的目录上,当做本地磁盘使用.所以首先要创建s3的bucket,例: 2.将s3 bucket挂载到 本地目录时需要有访问 s3 bucket的权限,所以接下来需要准备IAM用户的访问密钥I

第九章 Linux系统下分区、格式化磁盘,学会挂载和卸载磁盘

1. 请查资料了解这些术语:/dev/hda, /dev/hdb, /dev/sda, /dev/sdb, 他们之间有什么区别?/dev/hda, /dev/hdb 是 IDE借口硬盘的块文件. /dev/hda  第一块IDE磁盘 : /dev/hdb 第二块IDE磁盘 /dev/sda, /dev/sdb 是SCSI接口硬盘的块文件. /dev/sda 第一块SCSI磁盘 :/dev/sdb 第二块SCSI磁盘 2. 为什么 du -b /etc/passwd  和 du -k  /etc/

Linux与云计算——第二阶段 第十章:Samba服务器架设—SMB共享目录及多用户SMB挂载

Linux与云计算--第二阶段Linux服务器架设 第十章:Samba服务器架设-SMB共享目录及多用户SMB挂载 通过SMB共享目录 在Server上配置SMB服务 您的SMB服务器必须是STAFF工作组的一个成员 共享/common目录 共享名必须为common 只有example.com域内的客户端可以访问common共享 common必须是可以浏览的 用户andy必须能够读取共享中的内容,如果需要的话,验证密码是redhat [1] 安装配置Samba. [[email protecte

通过iscsi配置在aix上挂载存储设备

本文中我们利用starwind虚拟存储进行设置,以下为实验环境说明: Windows环境:win7,ip address:10.3.5.7,iscsi initiator name :iqn.2008-08.com.starwindsoftware:joker-pc-aix Aix环境:ip address 10.3.5.250 ,iscsi initiator name:iqn.localhost.hostid.7f000001 一.starwind配置说明 如图,打开starwind,右键选

NFS挂载文件系统出现nfs is not responding,still trying

采用NFS挂载根文件系统启动开发板出现: 1 nfs xxx is not responding,still trying 2 nfs xxx is OK 3 nfs xxx is not responding,still trying 4 ............... 不断的出现没有回应..成功..要很长时间才能启动开发板 解决办法: 修改uboot启动配置 uboot之前的启动配置: 1 setenv bootargs noinitrd console=ttySAC0,115200 ini

CentOS系统挂载exFAT和NTFS文件系统

exFAT和NTFS文件系统在默认条件下并不被CentOS系统支持.有时候在用U盘在CentOS和Windows系统之间拷贝文件时较为麻烦,通过在CentOS系统中安装软件,可以挂载exFAT 和 NTFS文件系统的U盘. exFAT文件系统在CentOS系统的挂载: CentOS需要具备的基本工具:GCC,python 第一步:下载fuse-exfat相关软件并安装 对exfat文件系统的识别通过fuse相关软件支持,下载相关软件包地址:http://download1.rpmfusion.o

nfs客户端挂载问题。

nfs挂载报错: mount: wrong fs type, bad option, bad superblock on 根据错误提示,查看/sbin/mount.<type>文件,果然发现没有/sbin/mount.nfs的文件,安装nfs-utils即可 yum install nfs-utils 问题:mount.nfs: rpc.statd is not running but is required for remote locking # /etc/init.d/rpcbind s