Jump to content

zux

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by zux

  1. ahh sorry, sure thats params just for dhcpd.conf example subnet 10.100.100.0 netmask 255.255.255.0 { range 10.100.100.10 10.100.100.200; option routers 10.100.100.1; option broadcast-address 10.100.100.255; option domain-name-servers 192.168.11.1; option domain-name "cluster"; option host-name = concat("node", concat ( suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,1,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,2,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,3,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,4,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,5,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,6,1))),2) )); option subnet-mask 255.255.255.0; option root-path = concat("192.168.11.5:/mnt/main/arms_hdd/", concat ( suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,1,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,2,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,3,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,4,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,5,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,6,1))),2) )); default-lease-time 604800; max-lease-time 604800; }
  2. Dude option tftp-server-name "a.b.c.d"; // option 66 from RFC life hack option host-name = concat("node", concat ( suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,1,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,2,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,3,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,4,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,5,1))),2), "", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,6,1))),2) )); will do hostname like node+MAC option root-path = concat("192.168.11.130:/mnt/main/arms_hdd/", concat ( suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,1,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,2,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,3,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,4,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,5,1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,6,1))),2) )); mount dir is "MAC" but need use ${nfs_root} int boot.cmd
  3. For building nfs image and vmlinuz,uInitrd, *.dtb On ubuntu 18.04 apt -y install git git clone https://github.com/armbian/build cd build ./compile.sh ROOTFS_TYPE=nfs wait.....................................................................DONE cd output/images ls .....nfsboot-rootfs.tgz .....nfsboot.img .....nfsboot-rootfs.tgz tar -xzf to nfs export dir fdisk -l .....nfsboot.img ........Orangepizero_Ubuntu_bionic_next_......._nfsboot.img1 8192 131071 122880 60M 83 Linux 8192 * 512 = 4194304 mount -o loop,offset=4194304 .....nfsboot.img /mnt copy vmlinuz,uInitrd, and dtb for you platform to tftp dir
  4. ## set this to NFS root path (ip:path) ## or else provide dhcp option 17 (root-path) #setenv nfs_root # for DHCP setenv net_setup "ip=dhcp" # for static configuration see documentation # https://github.com/torvalds/linux/blob/master/Documentation/filesystems/nfs/nfsroot.txt # setenv net_setup "ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>" # you may need to add extra kernel arguments specific to your device setenv bootargs "console=tty1 console=ttyS0,115200 root=/dev/nfs ${net_setup} rw rootflags=noatime,nodiratime disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 logle if test -n ${nfs_root}; then setenv bootargs "${bootargs} nfsroot=${nfs_root}" fi tftp ${kernel_addr_r} ${serverip}:vmlinuz-4.14.91-sunxi tftp ${ramdisk_addr_r} ${serverip}:uInitrd-4.14.91-sunxi tftp ${fdt_addr_r} ${serverip}:sun8i-h2-plus-orangepi-zero.dtb bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} save and do mkimage -C none -A arm -T script -d boot.cmd boot.scr.uimg copy boot.scr.uimg, vmlinuz,uInitrd, *.dtb to tftp folder and boot. Working for me
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines