{"id":154,"date":"2016-09-19T15:17:53","date_gmt":"2016-09-19T15:17:53","guid":{"rendered":"http:\/\/www.blackestknight.com\/photography\/?p=154"},"modified":"2017-08-10T11:54:49","modified_gmt":"2017-08-10T10:54:49","slug":"configure-iconnect-with-debian","status":"publish","type":"post","link":"https:\/\/www.blackestknight.com\/index.php\/2016\/09\/19\/configure-iconnect-with-debian\/","title":{"rendered":"Configure Iconnect with Debian"},"content":{"rendered":"<p>This is going to start where congenio.de stop<br \/>\nso assuming you booted their image and now you have logged in for the first time with root password congenio.<br \/>\n<code>sudo passwd root or passwd #change root password<br \/>\nadduser username<br \/>\nusermod -aG sudo username<br \/>\n<\/code><br \/>\nedit<br \/>\n<code>nano \/etc\/network\/interfaces<br \/>\nifup wlan0<br \/>\nifconfig<br \/>\n<\/code><br \/>\nreboot #just to make sure everything works \ud83d\ude42<br \/>\nby default the swapfile is pretty much disabled<br \/>\n<code>nano \/etc\/fstab #enable swapfile remove #<br \/>\nnano \/etc\/sysctl.d\/98-swap.conf #swapiness to 20<br \/>\n<\/code><br \/>\n<strong>Swap Files<\/strong><\/p>\n<p>There might be times when you&#8217;ve run out of swap space and it is not practical to repartition a drive or add a new one. In this case, you can use a regular file in an ordinary partition. All you have to do is create a file of the size you want<br \/>\n<code><br \/>\ndd if=\/dev\/zero of=\/var\/my_swap bs=1024 count=131072<br \/>\n<\/code><br \/>\nand activate it<br \/>\n<code>mkswap -f \/var\/my_swap<br \/>\nswapon \/var\/my_swap<br \/>\n<\/code><br \/>\nThis invocation creates a file called my_swap in \/var. It is 128 Mb long (128 x 1024 = 131072). Initially, it is filled with zeros. However, mkswap marks it as swap space and swapon tells the kernel to start using it as swap space. When you are done with it,<br \/>\n<code>swapoff \/var\/my_swap<br \/>\nrm \/var\/my_swap<br \/>\n<\/code><br \/>\n<strong>Multiple Swap Areas<\/strong><\/p>\n<p>More than one swap partition can be used on the same system. Consider an example fstab where there is a single swap partition:<\/p>\n<p>\/dev\/hda5 \/ ext3 defaults 1 1<br \/>\n\/dev\/hda1 \/boot ext2 defaults 1 2<br \/>\nnone \/dev\/pts devpts gid=5,mode=620 0 0<br \/>\nnone \/proc proc defaults 0 0<br \/>\n\/dev\/hda7 \/usr ext3 defaults 1 2<br \/>\n\/dev\/hda6 swap swap defaults 0 0<\/p>\n<p>Imagine replacing the entry for the swap partition with these three lines:<\/p>\n<p>\/dev\/hda6 none swap sw,pri=3 0 0<br \/>\n\/dev\/hdb2 none swap sw,pri=2 0 0<br \/>\n\/dev\/hdc2 none swap sw,pri=1 0 0<\/p>\n<p>This configuration would cause the kernel to use \/dev\/hda6 first. it has the highest priority assigned to it (pri=3). The maximum priority can be 32767 and the lowest 0. If that space were to max out, the kernel would start using \/dev\/hdb2, and on to \/dev\/hdc2 after that. Why such a configuration? Imagine that the newest (fastest) drives are given the highest priority. This will minimize speed loss as swap space usage grows.<\/p>\n<p>It is possible to write to all three simultaneously. If each has the same priority, the kernel will write to them much like a RAID, with commensurate speed increases.<\/p>\n<p>\/dev\/hda6 none swap sw,pri=3 0 0<br \/>\n\/dev\/hdb2 none swap sw,pri=3 0 0<br \/>\n\/dev\/hdc2 none swap sw,pri=3 0 0<\/p>\n<p>Notice that these three partitions are on separate drives, which is ideal in terms of speed enhancement.<br \/>\n<code><br \/>\nsudo apt-get install usbmount<br \/>\n<\/code><br \/>\nnext job is to build and set up netatalk<\/p>\n<p>install the following packages by &#8220;apt-get install&#8221;.<br \/>\n<code><br \/>\napt-get update<\/code><br \/>\n<code>apt-get install build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl libtracker-sparql-1.0-dev libtracker-miner-1.0-dev tracker<\/code><\/p>\n<p><code>wget http:\/\/prdownloads.sourceforge.net\/netatalk\/netatalk-3.1.9.tar.bz2?download<br \/>\n$ tar xvf netatalk-3.1.9.tar.bz2<br \/>\n$ cd netatalk-3.1.9<br \/>\n<\/code><br \/>\n<code>.\/configure \\<br \/>\n--with-init-style=debian-systemd \\<br \/>\n--without-libevent \\<br \/>\n--without-tdb \\<br \/>\n--with-cracklib \\<br \/>\n--enable-krbV-uam \\<br \/>\n--with-pam-confdir=\/etc\/pam.d \\<br \/>\n--with-dbus-daemon=\/usr\/bin\/dbus-daemon \\<br \/>\n--with-dbus-sysconf-dir=\/etc\/dbus-1\/system.d \\<br \/>\n--with-tracker-pkgconfig-version=1.0<br \/>\n<\/code><code>make<br \/>\nmake install<br \/>\nsudo apt-get install libtool-bin<br \/>\nsudo libtool --finish \/usr\/local\/lib\/netatalk\/<br \/>\n<\/code>Edit &#8220;nano&nbsp;<tt>\/usr\/local\/etc\/afp.conf<\/tt>&#8220;.<br \/>\nbasic afpd.conf<\/p>\n<p><code>;<br \/>\n; Netatalk 3.x configuration file<br \/>\n;<\/code><\/p>\n<p>[Global]<br \/>\n; Global server settings<br \/>\nhostname = AirDrive<br \/>\nuam list = uams_dhx.so uams_dhx2.so uams_guest.so<br \/>\nzeroconf = yes<br \/>\nguest account = nobody<br \/>\nlog level = default:warn<br \/>\nlog file =\/var\/log\/afpd.log<br \/>\nmimic model = Macmini<\/p>\n<p>[Homes]<br \/>\nbasedir regex = \/home<\/p>\n<p>[myitunes]]<br \/>\n; path = \/path\/to\/volume<br \/>\npath = \/media\/usb1\/media\/itunes<br \/>\nvalid users = john<\/p>\n<p>; [My Time Machine Volume]<br \/>\n; path = \/path\/to\/backup<br \/>\n; time machine = yes<\/p>\n<p>Enabling &amp; Starting<br \/>\n<code><br \/>\n# systemctl enable avahi-daemon<br \/>\n# systemctl enable netatalk<br \/>\n# systemctl start avahi-daemon<br \/>\n# systemctl start netatalk<br \/>\n<\/code><br \/>\nof course the problem is what if it isn&#8217;t mounted on usb1.<br \/>\nthe solution is to create a mount point but systemd may cause problems on boot.<\/p>\n<p>There is a bit of a gotcha with systemd if a drive has an entry in \/ect\/fstab and it isn&#8217;t available systemd may drop to an emergency shell. unfortunately this doesnt have ssh enabled so you cant work on the problem unless you have the serial console set up.<\/p>\n<p>Of course if you can attach the boot drive to a second machine you can edit fstab.<\/p>\n<p>by default the iconnect thinks it is in germany<br \/>\n<code><br \/>\ndpkg-reconfigure tzdata<br \/>\n<\/code><br \/>\nthis will let you select your correct timezone.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is going to start where congenio.de stop so assuming you booted their image and now you have logged in for the first time with root password congenio. sudo passwd root or passwd #change root password adduser username usermod -aG sudo username edit nano \/etc\/network\/interfaces ifup wlan0 ifconfig reboot #just to make sure everything works [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":288,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[6,8],"tags":[11],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.blackestknight.com\/photography\/wp-content\/uploads\/2016\/09\/IMGP9677-1.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7UXrA-2u","_links":{"self":[{"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":11,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":1100,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions\/1100"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/media\/288"}],"wp:attachment":[{"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blackestknight.com\/index.php\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}