/srv/boinc-nfs
. Here, each computer will create a subdirectory with the same name as its MAC address. Secondly, in the /srv/debian-live
directory there will be a root file system for network boot. So: mkdir /srv/debian-live mkdir /srv/boinc-nfs chown nobody:nogroup /srv/boinc-nfs chmod 755 /srv/boinc-nfs
/etc/exports
add: /srv/boinc-nfs *(rw,sync,no_root_squash,no_subtree_check) /srv/debian-live *(ro,async,no_root_squash,no_subtree_check)
exportfs -rv
did not give me any results): /etc/init.d/nfs-kernel-server restart
live-build
package is installed, which will do the main work. There should be internet. mkdir /srv/live-default && cd /srv/live-default
lb config -b netboot --net-root-path "/srv/debian-live" --net-root-server "192.168.15.20"
config/package-lists/boinc.list
- list of packages that will be needed in our assembly. We write to it: boinc-client nfs-common
config/includes.chroot/etc/init.d/boinc-preps
- the init script that will install NFS, configure BOINC and change the hostname ( perhaps identical hostnames prevent WCG from identifying the computer, many of my tasks went to them detached state). In this script you need to insert the address of your NFS and the addresses of the hosts from which password-free management will be allowed. Script content: #!/bin/bash ### BEGIN INIT INFO # Provides: boinc-preps # Required-Start: nfs-common # Required-Stop: # Should-Start: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Various stuff for BOINC # Description: Various stuff for BOINC ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh do_start () { MYMAC=`ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | sed s/://g` ancien=`hostname` nouveau=DYNWCG-$MYMAC mkdir -p /mnt/boinc-nfs mount 192.168.15.20:/srv/boinc-nfs /mnt/boinc-nfs && mkdir -p /mnt/boinc-nfs/$MYMAC service boinc stop sed -i "s/^BOINC_DIR=.*/BOINC_DIR=\/mnt\/boinc-nfs\/$MYMAC/;s/^BOINC_USER=.*/BOINC_USER=\"root\"/" /etc/default/boinc-client echo "192.168.10.60" > /mnt/boinc-nfs/$MYMAC/remote_hosts.cfg echo "192.168.10.61" >> /mnt/boinc-nfs/$MYMAC/remote_hosts.cfg echo "" >> /mnt/boinc-nfs/$MYMAC/gui_rpc_auth.cfg for file in \ /etc/hostname \ /etc/hosts # #/etc/ssh/ssh_host_rsa_key.pub \ #/etc/ssh/ssh_host_dsa_key.pub \ # SSH do [ -f $file ] && sed -i.old -e "s:$ancien:$nouveau:g" $file done invoke-rc.d hostname.sh start invoke-rc.d networking force-reload service boinc start } case "$1" in start|"") do_start ;; restart|reload|force-reload|status) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) # NOP exit 3 ;; *) echo "Usage: ... [start|stop]" >&2 exit 3 ;; esac :
config/hooks/boinc-preps-init.chroot
- a script from one command that will be executed when building and will add boinc-preps
from the previous item to autoload: #!/bin/sh update-rc.d boinc-preps defaults
lb build
binary.netboot.tar
file. Extract it to /srv
: cd /srv && tar -xvf live-default/binary.netboot.tar
/srv/debian-live
(root file system for network boot) and /srv/tftpboot
(files for the TFTP server). In my case, the assembly station and the NFS server are one computer, therefore /srv/debian-live
already in place.tftpboot
is a ready boot menu, it needs to be placed on the TFTP server. I did not check his work, since I have a working TFTP server with my menu, and from here I need only a part of the data. First, I copied all the files from the tftpboot/live/
to the TFTP server in images/debian-live/
(relative to the root directory of the TFTP server). Secondly, I borrowed text from tftpboot/live.cfg
, which adds a new menu item, while changing it to this state (here you also need to specify the address of your NFS server): label live-686-pae menu label BOINC-live (686-pae) linux images/debian-live/vmlinuz1 initrd images/debian-live/initrd1.img append boot=live config nosplash root=/dev/nfs nfsroot=192.168.15.20:/srv/debian-live
mount -o loop,ro /srv/debian-live/live/filesystem.squashfs /mnt/squash/
lb clean --binary
or lb clean
.sudo ifconfig
(no password will be required) and write down the IP address.config/includes.chroot/etc/init.d/boinc-preps
), launch boinc-manager, click "Advanced - Change computer" (this button is only in "Full view" ). However, BOINC should not request any passwords from the user.Source: https://habr.com/ru/post/234697/
All Articles