Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:livenet:server [2018/03/12 23:32] – nicola | projects:livenet:server [2018/03/21 11:56] (current) – [install livenet client package] scipio | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Software richiesto | + | ===== Requirements |
** HW**: 2 nic device | ** HW**: 2 nic device | ||
- | **Sistema operativo**: Ubuntu server 17.10 | + | |
+ | **OS**: Ubuntu server 17.10 | ||
< | < | ||
- | **software facoltativo ma usato nel test** | + | **Optional config** |
< | < | ||
+ | |||
+ | **network config ** | ||
+ | nano / | ||
+ | |||
+ | < | ||
+ | # This file describes the network interfaces available on your system | ||
+ | # For more information, | ||
+ | network: | ||
+ | version: 2 | ||
+ | renderer: networkd | ||
+ | ethernets: | ||
+ | ens3: | ||
+ | dhcp4: no | ||
+ | addresses: [10.1.22.2/ | ||
+ | gateway4: 192.168.122.1 | ||
+ | nameservers: | ||
+ | addresses: [8.8.8.8, | ||
+ | ens4: | ||
+ | dhcp4: yes | ||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | ===== Build livenet environment ===== | ||
+ | ==== Preparazione dell' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | Download package | ||
+ | edit / | ||
+ | |||
+ | < | ||
+ | # folder that contains livenet system | ||
+ | BASE=/ | ||
+ | IMAGES=${BASE}/ | ||
+ | BOOT=${BASE}/ | ||
+ | </ | ||
+ | |||
+ | ==== Trivial FTP ==== | ||
+ | edit / | ||
+ | < | ||
+ | TFTP_USERNAME=" | ||
+ | TFTP_DIRECTORY="/ | ||
+ | TFTP_ADDRESS=" | ||
+ | TFTP_OPTIONS=" | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | cp -a / | ||
+ | |||
+ | cp / | ||
+ | |||
+ | edit / | ||
+ | < | ||
+ | default menu.c32 | ||
+ | prompt 0 | ||
+ | #timeout 100 | ||
+ | |||
+ | menu title PXE Special Boot Menu | ||
+ | MENU AUTOBOOT Starting Livenet in # seconds | ||
+ | |||
+ | label bootlocal | ||
+ | menu label ^Boot local disk | ||
+ | menu default | ||
+ | | ||
+ | |||
+ | label nfs | ||
+ | menu label Ubuntu 18.04 - diskless | ||
+ | | ||
+ | | ||
+ | |||
+ | label nfs | ||
+ | menu label Ubuntu 14.04 - install | ||
+ | | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== BUILD IMAGE CLIENT ==== | ||
+ | zfs create livenet/ | ||
+ | debootstrap --arch amd64 bionic / | ||
+ | |||
+ | cd / | ||
+ | run .... | ||
+ | < | ||
+ | R=bionic | ||
+ | cat > ${R}/ | ||
+ | 127.0.0.1 | ||
+ | ::1 | ||
+ | ff02:: | ||
+ | ff02:: | ||
+ | QWK | ||
+ | |||
+ | chroot ${R} lsb_release -c | awk ' | ||
+ | chroot bionic/ | ||
+ | chroot ${R} apt-get -y -q install locales dialog | ||
+ | chroot ${R} locale-gen en_GB.UTF-8 | ||
+ | chroot ${R} locale-gen it_IT.UTF-8 | ||
+ | chroot ${R} update-locale LANG=it_IT.UTF-8 LANGUAGE=it: | ||
+ | echo Europe/Rome > ${R}/ | ||
+ | cp ${R}/ | ||
+ | cat > ${R}/ | ||
+ | #!/bin/sh | ||
+ | |||
+ | # dpkg/apt not start any daemons when things are installed in the chroot | ||
+ | |||
+ | if [ ! " | ||
+ | exit 101 | ||
+ | fi | ||
+ | QWE | ||
+ | |||
+ | chmod +x ${R}/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | DISTR=bionic | ||
+ | |||
+ | cat > / | ||
+ | ############################################################# | ||
+ | ################### | ||
+ | ############################################################# | ||
+ | ###### Ubuntu Main Repos | ||
+ | deb http:// | ||
+ | ###### Ubuntu Update Repos | ||
+ | deb http:// | ||
+ | deb http:// | ||
+ | deb http:// | ||
+ | deb http:// | ||
+ | ###### Ubuntu Partner Repo | ||
+ | deb http:// | ||
+ | QWE | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | apt update apt -y upgrade | ||
+ | apt -y install initramfs-tools | ||
+ | </ | ||
+ | |||
+ | ==== install livenet client package ==== | ||
+ | |||
+ | < | ||
+ | # copiare / | ||
+ | cd /root | ||
+ | git clone https:// | ||
+ | cd livenet-client | ||
+ | git checkout bionic | ||
+ | mv .git / | ||
+ | git status | ||
+ | find / -maxdepth 1 > .gitignore | ||
+ | |||
+ | </ | ||
+ | |||
+ | inside git directory | ||
+ | < | ||
+ | rsync -avb etc/ /etc/ | ||
+ | rsync -avb usr/ /usr/ | ||
+ | rsync -avb debian / | ||
+ | rsync -avb README.md / | ||
+ | apt-get -y install linux-generic | ||
+ | </ | ||
+ | |||
+ | ==== etc/ | ||
+ | < | ||
+ | #!/bin/sh -e | ||
+ | # initramfs hook for livenet | ||
+ | #set -x | ||
+ | PREREQ="" | ||
+ | |||
+ | # Output pre-requisites | ||
+ | prereqs() | ||
+ | { | ||
+ | echo " | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | prereqs) | ||
+ | | ||
+ | exit 0 | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | . / | ||
+ | |||
+ | rm ${DESTDIR}/ | ||
+ | copy_exec /bin/cpio /bin | ||
+ | |||
+ | mkdir -p ${DESTDIR}/ | ||
+ | cp / | ||
+ | [ -f / | ||
+ | cp / | ||
+ | |||
+ | manual_add_modules aufs | ||
+ | manual_add_modules overlayfs | ||
+ | auto_add_modules net | ||
+ | auto_add_modules nfsv4 | ||
+ | |||
+ | # pulizia di firmware non necessario e pesante | ||
+ | set +e | ||
+ | rm -f ${DESTDIR}/ | ||
+ | set -e | ||
+ | |||
+ | ### qui sotto andrebbe commentato in produzione ### | ||
+ | |||
+ | # tastiera italiana in initram | ||
+ | # attivata da do_debug_shell (loadkeys / | ||
+ | #cp -au / | ||
+ | |||
+ | # nfs4 | ||
+ | #copy_exec / | ||
+ | #copy_exec / | ||
+ | #cp -au / | ||
+ | |||
+ | #cat > ${DESTDIR}/ | ||
+ | # | ||
+ | #EOF | ||
+ | #cat > ${DESTDIR}/ | ||
+ | # | ||
+ | #EOF | ||
+ | |||
+ | # debug purpose ################ | ||
+ | # ricordati di mettere FRAMEBUFFER=n in / | ||
+ | #copy_exec / | ||
+ | #copy_exec /sbin/lsmod /bin | ||
+ | #copy_exec / | ||
+ | ################################# | ||
+ | |||
+ | # wireless ##################### | ||
+ | #copy_exec / | ||
+ | #copy_exec / | ||
+ | #copy_exec / | ||
+ | #copy_exec / | ||
+ | #copy_exec / | ||
+ | #copy_exec /sbin/iwspy | ||
+ | #copy_exec / | ||
+ | #cp -au / | ||
+ | ################################# | ||
+ | </ | ||
+ | |||
+ | ===Rebuild initramfs image === | ||
+ | ln-mng --kernel | ||
+ | |||
===== DHCP ===== | ===== DHCP ===== | ||
==== Abilitare dhcpd su specifica scheda ==== | ==== Abilitare dhcpd su specifica scheda ==== |