NFS

A

Aaron Padilla

Guest
Hi, I am trying of learn linux embedded following the formation of free-electrons by myself, so in the NFS lab I should be capable of run the mount command from the target but I got an error message for fstab file not found.

I was looking for info but it is confusing for a newbie like my, so should I create a fstab file w an entry like?:
192.168.0.1:/home/user/felabs/sysdev/tinysystem/nfsroot /mnt/remote nfs defaults,auto,rw 0 0


or, being the NFS `transparent` between hast and target, should I write an entry

for a dummy media like?
:

/dev/hda6 swap swap defaults 0 0


Brief, I would like to know what is a typical entry for the fstab that makes work

the mount command in the target, using NFS.

Thanks in advance.
 


Here is a default NFS fstab mount:
Code:
servername:/nfsDirectory   /mountpoint/on/client  nfs4  rsize=8192,wsize=8192,timeo=14,_netdev    0 0
rsize and wsize
The rsize value is the number of bytes used when reading from the server. The wsize value is the number of bytes used when writing to the server. The default for both is 1024, but using higher values such as 8192 can improve throughput. This is not universal. It is recommended to test after making this change, see #Performance tuning.
timeo
The timeo value is the amount of time, in tenths of a second, to wait before resending a transmission after an RPC timeout. After the first timeout, the timeout value is doubled for each retry for a maximum of 60 seconds or until a major timeout occurs. If connecting to a slow server or over a busy network, better performance can be achieved by increasing this timeout value.
_netdev
The _netdev option tells the system to wait until the network is up before trying to mount the share. systemd assumes this for NFS, but anyway it is good practice to use it for all types of networked file systems

https://wiki.archlinux.org/index.php/Nfs#Mount_using_.2Fetc.2Ffstab
 
Very fast answer ryanvade, but I am lost yet, I have a NFS system working between my server and an ARM card; the filesystem of the target is on the server, I mean, every single file available on my target comes from home/user/.../nfsroot folder on my server so, what does means /mountpoint/on/client?

Could you advise?
Thanks.
 
This is my startup log and the error when I try to mount a filesystem:


60
U-Boot SPL 2013.10 (Oct 22 2014 - 13:46:09)


U-Boot 2013.10 (Oct 22 2014 - 13:46:09)

OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
IGEPv2 + LPDDR/NAND
I2C: ready
DRAM: 512 MiB
NAND: 512 MiB
MMC: OMAP SD/MMC: 0
In: serial
Out: serial
Err: serial
Die ID #7eec00029ff80000015a86d11002101d
Net: smc911x-0
Hit any key to stop autoboot: 3 2 1 0

NAND read: device 0 offset 0x2e0000, size 0x20000
131072 bytes read: OK

Loading from nand0, offset 0x300000
Image Name: Linux-3.11.10
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2891320 Bytes = 2.8 MiB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80000000 ...
Image Name: Linux-3.11.10
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2891320 Bytes = 2.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 81000000
Booting using the fdt blob at 0x81000000
Loading Kernel Image ... OK
Loading Device Tree to 8fff9000, end 8ffff71b ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.11.10 (aaron@aaron-desktop) (gcc version 4.4.3 (crosstool-NG 1.19.0) ) #1 SMP Sun Oct 26 14:01:07 EDT 2014
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Generic OMAP3 (Flattened Device Tree), model: IGEPv2
[ 0.000000] cma: CMA: reserved 16 MiB at 9e800000
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
[ 0.000000] PERCPU: Embedded 9 pages/cpu @c119e000 s14144 r8192 d14528 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129792
[ 0.000000] Kernel command line: console=ttyO2,115200 root=/dev/nfs ip=192.168.0.100 nfsroot=192.168.0.1:/home/aaron/felabs/sysdev/tinysystem/nfsroot rw
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 488352K/523264K available (5406K kernel code, 610K rwdata, 1932K rodata, 377K init, 5522K bss, 34912K reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0732a20 (7339 kB)
[ 0.000000] .init : 0xc0733000 - 0xc0791740 ( 378 kB)
[ 0.000000] .data : 0xc0792000 - 0xc082a8a0 ( 611 kB)
[ 0.000000] .bss : 0xc082a8a0 - 0xc0d8f330 (5523 kB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[ 0.000000] Total of 96 interrupts on 1 active controller
[ 0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
[ 0.000000] OMAP clockevent source: timer1 at 32768 Hz
[ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[ 0.000000] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.000000] ... CHAINHASH_SIZE: 16384
[ 0.000000] memory used by lock dependency info: 3695 kB
[ 0.000000] per task-struct memory footprint: 1152 bytes
[ 0.001281] Calibrating delay loop... 395.67 BogoMIPS (lpj=1978368)
[ 0.109710] pid_max: default: 32768 minimum: 301
[ 0.110260] Security Framework initialized
[ 0.110443] Mount-cache hash table entries: 512
[ 0.126556] CPU: Testing write buffer coherency: ok
[ 0.128204] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[ 0.128295] Setting up static identity map for 0xc051e020 - 0xc051e090
[ 0.132202] Brought up 1 CPUs
[ 0.132232] SMP: Total of 1 processors activated (395.67 BogoMIPS).
[ 0.132232] CPU: All CPU(s) started in SVC mode.
[ 0.135742] devtmpfs: initialized
[ 0.197113] pinctrl core: initialized pinctrl subsystem
[ 0.202728] regulator-dummy: no parameters
[ 0.206695] NET: Registered protocol family 16
[ 0.216369] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.233947] Reprogramming SDRC clock to 400000000 Hz
[ 0.247802] OMAP GPIO hardware version 2.5
[ 0.280273] platform 49022000.mcbsp: alias fck already exists
[ 0.281768] platform 49024000.mcbsp: alias fck already exists
[ 0.299194] omap-gpmc 6e000000.gpmc: GPMC revision 5.0
[ 0.307159] No ATAGs?
[ 0.307189] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.314941] OMAP DMA hardware revision 5.0
[ 0.395416] bio: create slab <bio-0> at 0
[ 0.401153] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[ 0.401214] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[ 0.497894] omap-dma-engine 48056000.dma-controller: OMAP DMA engine driver
[ 0.501342] vddvario: no parameters
[ 0.502685] vdd33a: no parameters
[ 0.512390] SCSI subsystem initialized
[ 0.515136] usbcore: registered new interface driver usbfs
[ 0.515716] usbcore: registered new interface driver hub
[ 0.516662] usbcore: registered new device driver usb
[ 0.520599] omap_i2c i2c.8: did not get pins for i2c error: -19
[ 0.522735] omap_i2c i2c.8: bus 0 rev4.4 at 2600 kHz
[ 0.524993] omap_i2c i2c.9: did not get pins for i2c error: -19
[ 0.526428] omap_i2c i2c.9: bus 1 rev4.4 at 400 kHz
[ 0.526733] omap_i2c i2c.10: did not get pins for i2c error: -19
[ 0.528045] omap_i2c i2c.10: bus 2 rev4.4 at 100 kHz
[ 0.540466] Switched to clocksource 32k_counter
[ 0.715942] NET: Registered protocol family 2
[ 0.718261] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.718566] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[ 0.721069] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.721343] TCP: reno registered
[ 0.721405] UDP hash table entries: 256 (order: 2, 20480 bytes)
[ 0.721710] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[ 0.723480] NET: Registered protocol family 1
[ 0.725982] RPC: Registered named UNIX socket transport module.
[ 0.726013] RPC: Registered udp transport module.
[ 0.726043] RPC: Registered tcp transport module.
[ 0.726043] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.727233] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.727539] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
[ 0.966827] VFS: Disk quotas dquot_6.5.2
[ 0.967102] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.970184] NFS: Registering the id_resolver key type
[ 0.970947] Key type id_resolver registered
[ 0.970977] Key type id_legacy registered
[ 0.971160] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.971801] msgmni has been set to 985
[ 0.976226] io scheduler noop registered
[ 0.976257] io scheduler deadline registered
[ 0.976379] io scheduler cfq registered (default)
[ 0.979827] pinctrl-single 48002030.pinmux: 742 pins at pa fa002030 size 1484
[ 0.980773] pinctrl-single 48002a00.pinmux: 46 pins at pa fa002a00 size 92
[ 0.986175] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.996490] serial.5: ttyO0 at MMIO 0x4806a000 (irq = 88) is a OMAP UART0
[ 0.999877] serial.6: ttyO1 at MMIO 0x4806c000 (irq = 89) is a OMAP UART1
[ 1.002471] serial.7: ttyO2 at MMIO 0x49020000 (irq = 90) is a OMAP UART2
[ 1.696044] console [ttyO2] enabled
[ 1.742034] brd: module loaded
[ 1.769165] loop: module loaded
[ 1.786102] twl 0-0048: PIH (irq 23) chaining IRQs 338..346
[ 1.792724] twl 0-0048: power (irq 343) chaining IRQs 346..353
[ 1.805938] VDD1: 600 <--> 1450 mV at 1200 mV
[ 1.814666] VDAC: 1800 mV
[ 1.821075] VPLL2: 1800 mV
[ 1.827148] VMMC1: 1850 <--> 3150 mV at 3000 mV
[ 1.835418] VMMC2: 1850 <--> 3150 mV at 2600 mV
[ 1.843566] VUSB1V5: 1500 mV
[ 1.849273] VUSB1V8: 1800 mV
[ 1.855224] VUSB3V1: 3100 mV
[ 1.861541] VSIM: 1800 <--> 3000 mV at 1800 mV
[ 1.869537] twl4030_gpio gpio.33: gpio (irq 338) chaining IRQs 354..371
[ 1.891998] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.899536] CONFIG_MTD_NAND_OMAP_BCH is not enabled
[ 1.904998] omap2-nand: probe of omap2-nand.0 failed with error -22
[ 1.927520] smsc911x: Driver version 2008-10-21
[ 1.933563] smsc911x 2c000000.ethernet (unregistered net_device): couldn't get clock -2
[ 1.950164] libphy: smsc911x-mdio: probed
[ 1.954986] smsc911x 2c000000.ethernet eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=2c000000.etherne:01, irq=-1)
[ 1.967559] smsc911x 2c000000.ethernet eth0: MAC Address: ae:b7:61:7e:f9:b8
[ 1.977752] usbcore: registered new interface driver asix
[ 1.984191] usbcore: registered new interface driver ax88179_178a
[ 1.991241] usbcore: registered new interface driver cdc_ether
[ 1.997985] usbcore: registered new interface driver r815x
[ 2.004882] usbcore: registered new interface driver smsc95xx
[ 2.011688] usbcore: registered new interface driver net1080
[ 2.018188] usbcore: registered new interface driver cdc_subset
[ 2.025146] usbcore: registered new interface driver zaurus
[ 2.031921] usbcore: registered new interface driver cdc_ncm
[ 2.041107] usbcore: registered new interface driver cdc_wdm
[ 2.047790] usbcore: registered new interface driver usb-storage
[ 2.054962] usbcore: registered new interface driver usbtest
[ 2.063903] mousedev: PS/2 mouse device common for all mice
[ 2.076629] twl_rtc rtc.22: Power up reset detected.
[ 2.083160] twl_rtc rtc.22: Enabling TWL-RTC
[ 2.093078] twl_rtc rtc.22: rtc core: registered rtc.22 as rtc0
[ 2.101928] i2c /dev entries driver
[ 2.110870] Driver for 1-wire Dallas network protocol.
[ 2.123199] omap_wdt: OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[ 2.137451] omap-dma-engine 48056000.dma-controller: allocating channel for 62
[ 2.145446] omap-dma-engine 48056000.dma-controller: allocating channel for 61
[ 2.205688] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.214263] usbcore: registered new interface driver usbhid
[ 2.220153] usbhid: USB HID core driver
[ 2.226104] oprofile: using arm/armv7
[ 2.231170] TCP: cubic registered
[ 2.234710] Initializing XFRM netlink socket
[ 2.239349] NET: Registered protocol family 17
[ 2.244232] NET: Registered protocol family 15
[ 2.249389] Key type dns_resolver registered
[ 2.254058] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 2.264556] ThumbEE CPU extension supported.
[ 2.274169] VUSB3V1: disabling
[ 2.278137] VUSB1V8: disabling
[ 2.282318] VUSB1V5: disabling
[ 2.286437] VPLL2: disabling
[ 2.290100] VDAC: disabling
[ 2.300262] twl_rtc rtc.22: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[ 2.311889] smsc911x 2c000000.ethernet eth0: SMSC911x/921x identified at 0xe087c000, IRQ: 288
[ 2.341064] IP-Config: Guessing netmask 255.255.255.0
[ 2.347106] IP-Config: Complete:
[ 2.350646] device=eth0, hwaddr=ae:b7:61:7e:f9:b8, ipaddr=192.168.0.100, mask=255.255.255.0, gw=255.255.255.255
[ 2.361785] host=192.168.0.100, domain=, nis-domain=(none)
[ 2.368041] bootserver=255.255.255.255, rootserver=192.168.0.1, rootpath=
[ 7.410583] VFS: Mounted root (nfs filesystem) on device 0:12.
[ 7.418884] devtmpfs: mounted
[ 7.423065] Freeing unused kernel memory: 376K (c0733000 - c0791000)
starting pid 742, tty '': '/etc/init.d/rcS'
can't run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.
starting pid 743, tty '': '-/bin/sh'


BusyBox v1.21.1 (2014-10-29 01:10:33 EDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

-/bin/sh: can't access tty; job control turned off
# mount /proc
mount: can't read '/etc/fstab': No such file or directory
#
 
I am not sure what you are trying to do. Is the NFS file system supposed to be the root file system of the client?

If so then how you mount the NFS as root depends on how the client is booting. I have used DHCPD, nfs, tftp, and pxeboot to create a diskless cluster which may be what you are looking for.
 
I have not enough knowledge to understand your answer, my last hope is to show you mi guide document, take a glance on page 22 up to half of page 23 "Virtual filesystems" that is the step that not works as supposed,

Thanks
 

Attachments

  • labs.pdf
    442.1 KB · Views: 1,750

Members online


Top