How does nfs start Linux?

Source: Internet
Author: User

How does nfs start Linux? We all know that NFS is widely used and has been widely used in Linux. Linux is developing fast, and many people begin to learn. When studying Linux, you may encounter Linux system problems. Here we will introduce how to use qemu to start Linux through nfs. Here we will share with you. I hope you can learn how to start Linux through nfs in qemu. Assume that the development machine is installed with Fedora 9

1. Set network-enable qemu to use the network of the Development Machine

First, confirm that TUN is configured in the kernel of the development machine.

Grep CONFIG_TUN =/boot/config-'uname-R'

Normally, CONFIG_TUN = m OR = y

2. Install the network configuration tool

 
 
  1. yum install bridge-utils 

3. Configure the network

 
 
  1. /usr/sbin/brctl addbr br0  
  2. /sbin/ifconfig eth0 0.0.0.0 promisc up  
  3. /usr/sbin/brctl addif br0 eth0  
  4. /sbin/dhclient br0  
  5. /sbin/iptables -F FORWARD 

4. Fedora 9 configure the Network File System

Assume that the directory of the Network File System is/mnt/arm-nfs

Add the following to/etc/export:

/Mnt/arm-nfs/* (rw, sync, no_root_squash)

Start the Network File System Service

/Sbin/service nfs restart

5. Prepare the qemu STARTUP script, save the following code as qemu-ifup, and set the Execution Mode chmod + x qemu-ifup.

 
 
  1. #!/bin/sh  
  2. /sbin/ifconfig $1 0.0.0.0 promisc up  
  3. /usr/sbin/brctl addif br0 $1 

6. Kernel configuration

 
 
  1. CONFIG_IP_PNP_DHCP=y 
  2. CONFIG_TUN=y 
  3. CONFIG_AEABI=y 
  4. CONFIG_TMPFS=y 

7. Start qemu

 
 
  1. qemu-system-arm -M YourMachine -kernel zImage root="/dev/nfs nfsroot=
  2. -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup 

You can use the above methods to start Linux using nfs for qemu.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.