<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux | Breek Een Been</title>
    <link>https://blog.breekeenbeen.nl/tag/linux/</link>
      <atom:link href="https://blog.breekeenbeen.nl/tag/linux/index.xml" rel="self" type="application/rss+xml" />
    <description>Linux</description>
    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><copyright>Rob Maas</copyright><lastBuildDate>Thu, 03 Jan 2013 19:29:13 +0200</lastBuildDate>
    <image>
      <url>https://blog.breekeenbeen.nl/images/icon_hue0c3a5851739ca8a2afc787728ee763e_182872_512x512_fill_lanczos_center_3.png</url>
      <title>Linux</title>
      <link>https://blog.breekeenbeen.nl/tag/linux/</link>
    </image>
    
    <item>
      <title>Monitoring Your X86 Synology With Monit</title>
      <link>https://blog.breekeenbeen.nl/post/monitoring-your-x86-synology-with-monit/</link>
      <pubDate>Thu, 03 Jan 2013 19:29:13 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/monitoring-your-x86-synology-with-monit/</guid>
      <description>&lt;p&gt;First of all, I’m not very familiar with 
&lt;a href=&#34;http://mmonit.com/monit/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Monit&lt;/a&gt; at all, but I was looking for a simple monitoring solution which monitors, alerts and eventually can restart a service if it fails. So today I stumble upon Monit which was exactly I was looking for. It generates a simple dashboard and does exactly what I wanted it to do. After messing around with it for a couple of minutes I had a working dashboard on a Debian system which monitored a couple of services.&lt;/p&gt;
&lt;p&gt;I also have Synology NAS which runs a couple of services, which should be up 24/7, unfortunately sometimes a service fails and it is possible I noticed it a little late, i.e. after a couple of hours.&lt;/p&gt;
&lt;p&gt;So I thought why not install Monit on the Synology, I have a DS1010+, which has a plain old x86 Intel CPU, so compiling and running it shouldn’t be that hard even better it turns out they have a lots of compiled versions at their 
&lt;a href=&#34;http://mmonit.com/monit/download&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;website&lt;/a&gt; for download.&lt;/p&gt;
&lt;p&gt;So let’s start.&lt;/p&gt;
&lt;p&gt;First of all download the right version (Linux x86) of the website and unpack it.
Now we have to copy te content to the different locations, Linux users can use SCP, for Windows users, the easiest way is to put the unpacked folder on a share of the Synology. I putted on “\mynasUploads”.&lt;/p&gt;
&lt;p&gt;Start an SSH session (
&lt;a href=&#34;http://www.putty.org&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Putty&lt;/a&gt;) and login with root and your password.&lt;/p&gt;
&lt;p&gt;First let’s copy the binary to “/usr/local/bin” and copy the default config file to /etc/monitrc.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; cp /volume1/Uploads/monit-5.5/bin/monit /usr/local/bin
&amp;gt;
&amp;gt; cp /volume1/Uploads/monit-5.5/conf/monitrc /etc/monitrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we have to edit the monitrc so we can access the dashboard and make a directory the default directory for configuration files, I like to keep them seperated.&lt;/p&gt;
&lt;p&gt;You can edit monitrc on Windows with notepad++ and then copy it again or use vi on the Synology.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;vi /etc/monitrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Press “ins” to enter insert mode and seek and change the following lines.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; set httpd port 2812 and
&amp;gt;     use address localhost    # only accept connection from localhost
&amp;gt;     allow localhost               # allow localhost to connect to the server and
&amp;gt;     allow admin:monit         # require user &#39;admin&#39; with password &#39;monit&#39;
&amp;gt;     allow @monit                 # allow users of group &#39;monit&#39; to connect (rw)
&amp;gt;     allow @users readonly  # allow users of group &#39;users&#39; to connect readonly
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and change them, don’t forget to change the subnet if you use another range then 10.0.0.0/8.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; set httpd port 2812 and
&amp;gt;     allow 10.0.0.0/8
&amp;gt;     allow admin:hardpassword
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Quit “vi” bij pressing escape and type &amp;ldquo;:wq”, which stands for write and quit.&lt;/p&gt;
&lt;p&gt;Change the permissions of the monitrc file&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; chmod 0700 /etc/monitrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and finally start monit&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; /usr/local/bin/monit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Go to your webbrowser and go the url 
&lt;a href=&#34;http://yournas:2812&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;http://yournas:2812&lt;/a&gt; and login, you should see something like the picture below.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/monitoring-your-x86-synology-with-monit/featured_hu341334b6d0ce923b3cd19d573e40e4f1_16056_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/monitoring-your-x86-synology-with-monit/featured_hu341334b6d0ce923b3cd19d573e40e4f1_16056_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;941&#34; height=&#34;497&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;If this works, we can make it more interesting by adding the services or filesystem information.&lt;/p&gt;
&lt;p&gt;Let’s make a directory for the config files and add this directory to the monitrc file.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; mkdir /etc/monit
&amp;gt;
&amp;gt; echo “include /etc/monit/*” &amp;gt;&amp;gt; /etc/monitrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we only need something to monitor, for example Cloudstation.&lt;/p&gt;
&lt;p&gt;Start vi.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; vi /etc/monit/cloudstation
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and add the following lines.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; check process cloudstation with pidfile /var/run/synosyncfolder.pid
&amp;gt;         start program = &amp;quot;/var/packages/CloudStation/scripts/start-stop-status start&amp;quot;
&amp;gt;         stop program = &amp;quot;/var/packages/CloudStation/scripts/start-stop-status stop&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will check if Cloudstation is running and if it isn’t, it will automatically restart the service.&lt;/p&gt;
&lt;p&gt;To load the new config file, restart monit.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;&amp;gt; killall monit
&amp;gt;
&amp;gt; /usr/local/bin/monit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Monit has a lot more possibilities and the 
&lt;a href=&#34;http://mmonit.com/monit/documentation/monit.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;documentation&lt;/a&gt; is good, so I would say knock yourself out.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This post was just to get you started, there are still somethings on my todo list, like create an init script and maybe create a package for it.&lt;/em&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Create Your Own Rescue Partition With Easy Restore Option at No Costs</title>
      <link>https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/</link>
      <pubDate>Thu, 06 Jan 2011 13:56:14 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/</guid>
      <description>&lt;p&gt;When you are a bit handy with computers, you soon become a kind of computer god to your family and friends and if you don’t watch out, you get overloaded with questions and problems. If that is not enough you find yourself (re)installing each computer over and over again. Wouldn’t it be nice, if they can help there selves and you are just needed once in a (long) while?&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/featured_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/featured_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;277&#34; height=&#34;199&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Lots of computer manufactures, deliver there systems with a so called rescue partition or CD/DVD. Which can restore the system in its original state. With this option they hope to give there customers a easy way to “fix” there computer. Even if you have such an option I still recommend to create your own option, cause most of those “restore” actions not only restore the OS, but also all the software you (probably) don’t need. Also after a couple of months you probably need to install tons of OS updates after a restore. Before you start, it is good to know that some of the actions are quite risky and may destroy your installation or partition table. So watch out and test(or practice) in an “test” environment. If you don’t have the hardware for testing, then a Virtual environment, like VMWare, VirtualPC, 
&lt;a href=&#34;http://www.virtualbox.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Virtualbox&lt;/a&gt;, etc. is very handy.&lt;/p&gt;
&lt;h2 id=&#34;lets-start&#34;&gt;Let’s start&lt;/h2&gt;
&lt;p&gt;The idea is simple, we create an extra partition on the hard drive, which is going to store the rescue image (sort of packed installation of an OS). We add a boot menu to the boot order, which gives us the opportunity to boot into the extra partition. After booting in this extra partition it shows us a menu, which gives us the option to restore the system or to create a new image. We need the following software, a boot manager and a small Linux distribution. In this post I use 
&lt;a href=&#34;http://www.plop.at/en/ploplinux.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Plop Linux&lt;/a&gt; and 
&lt;a href=&#34;http://www.plop.at/en/bootmanager.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Plop bootmanager&lt;/a&gt;. Which both can be found 
&lt;a href=&#34;http://www.plop.at/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;here&lt;/a&gt;. Thanks to Elmar for creating this excellent free tools! (For this test I use Windows XP as the “primary” installation, but you can use any OS you like. If they need another file system, you need to edit the rescue script).&lt;/p&gt;
&lt;h2 id=&#34;step-1--downloading-the-tools&#34;&gt;Step 1 – Downloading the tools&lt;/h2&gt;
&lt;p&gt;For this blog I use version 
&lt;a href=&#34;http://download.plop.at/tmp/ploplinux-4.1.1-test3.iso&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;4.1.1 test 3&lt;/a&gt; of Plop Linux cause 4.1.1 was giving some 
&lt;a href=&#34;http://forum.plop.at/index.php/topic,1014.0.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;problems&lt;/a&gt;. If you are testing on a physical system burn the ISO to a CD.&lt;/p&gt;
&lt;h2 id=&#34;step-2--prepare-the-system-partitioning-and-installing-windows&#34;&gt;Step 2 – Prepare the system (Partitioning and Installing Windows)&lt;/h2&gt;
&lt;p&gt;I just assume, you didn’t install any OS yet. So we can delete and create partitions without being afraid of losing some data. If you already have an OS running and do not have some spare space for a rescue partition, you need a partition manager which is capable of resizing and creating partitions without losing any data. For now we just use the Windows XP installation for partitioning the system. Start the installation and make just one partitions (not the whole disk!) for the actual Windows installation, the rest of the space is needed for the rescue partition. I normally make the rescue partition at least the same size or a bit bigger then the “primary” partition. (Sorry a bit Dutch ;-)) We don’t care about the second partition for now.  Just install Windows.&lt;/p&gt;
&lt;h2 id=&#34;step-3--creating-the-rescue-partition-after-the-install-of-windows-boot-from-the-plop-cd-or-image&#34;&gt;Step 3 – Creating the rescue partition** After the install of Windows boot from the Plop CD (or image).&lt;/h2&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb2_huba311094c6c93558fa3d4eebb847d6d2_19320_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb2_huba311094c6c93558fa3d4eebb847d6d2_19320_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;542&#34; height=&#34;130&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;With the command fdisk –l, you can check the connected disks and the available partitions.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image2_hu830ac8fb3306f213f265fd3506d54a5c_4522_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image2_hu830ac8fb3306f213f265fd3506d54a5c_4522_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;586&#34; height=&#34;66&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Start fdisk with the right harddisk to create the “rescue” partition. In my case, the commando is. “fdisk /dev/hda” In the menu press “n” for creating a new partition and press “p” for making it a primary partition. In our case it is partition 2 and it uses the full size (enter twice). If you press “p” you see, what the partition table looks like if you write it to disk.&lt;/p&gt;















&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;image3.png&#34; &gt;


  &lt;img src=&#34;image3.png&#34; alt=&#34;&#34;  &gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;If you are ok with it, press “w” to write the partition table. Reboot the system from CD to make sure the partition table is correctly loaded. When running fdisk –l again it should show something like the picture below.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image4_hu2c66b0626e6bd7c5296533cc6c43bf38_5681_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image4_hu2c66b0626e6bd7c5296533cc6c43bf38_5681_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;590&#34; height=&#34;85&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now we can install Plop. For this, type “installplop”. Make sure you enter the right destination drive, in our case “/dev/hda2” and also make sure you don’t write anything to the MBR. Do not run “plpinstall.sh” !&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image5_hued25ec040995502bf366f3345ccd83b8_5493_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image5_hued25ec040995502bf366f3345ccd83b8_5493_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;398&#34; height=&#34;110&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;We need to make some slight enhancements to the installation script. You can edit the script, by typing “nano /tmp/plpinstall.sh”. Find the lines:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;prompt timeout=20 default=ploplinux boot=/dev/hda2 map=/boot/map lba32 vga=1 compact
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And change them to.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#prompt #timeout=20 default=ploplinux boot=/dev/hda2 map=/boot/map lba32 vga=0x317 compact
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save the file and exit nano (CTRL+X). Now we’re ready to install Plop, by typing “/tmp/plpinstall.sh”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image6_hubda78c5b8211226aae866650424b8863_10634_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image6_hubda78c5b8211226aae866650424b8863_10634_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;543&#34; height=&#34;157&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now it is save to reboot and continue with step 3.&lt;/p&gt;
&lt;h3 id=&#34;remark&#34;&gt;Remark&lt;/h3&gt;
&lt;p&gt;If you get some errors like:&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image7_hu72faef79abfc8b9c90dcb86dd0712ef1_5082_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image7_hu72faef79abfc8b9c90dcb86dd0712ef1_5082_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;573&#34; height=&#34;51&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;You also need the change the line “chroot $MNT lilo” to “chroot $MNT lilo –P ignore” and run the installscript again.&lt;/p&gt;
&lt;h2 id=&#34;step-4--creating-the-boot-menu&#34;&gt;Step 4 – Creating the boot Menu&lt;/h2&gt;
&lt;p&gt;Boot your system from the Plop Linux CD (or by mounting the ISO).&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image8_hu07e00f29989d971a8169df8bdc426296_106511_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image8_hu07e00f29989d971a8169df8bdc426296_106511_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;480&#34; height=&#34;293&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Choose the option “plop boot manager installer”. Make sure that you install the boot manager to the correct hard disk (option 7), after this you can install the boot manager, option 1.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image9_huc39eb1e9fe5753a17b5d1c81dc5a6731_5155_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image9_huc39eb1e9fe5753a17b5d1c81dc5a6731_5155_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;454&#34; height=&#34;160&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;That’s it, the boot manager is installed. Reboot the system, so we can configure the boot manager.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image10_hu5c84d2d89f2ce648ccbf7f7800137bcd_3396_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image10_hu5c84d2d89f2ce648ccbf7f7800137bcd_3396_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;422&#34; height=&#34;114&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;I usually make the menu plain and simple, so that there are only two options, the “default” which will start after a certain amount of time and the “rescue” option. Go to setup –&amp;gt; bootmanager and make the following settings.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;boot countdown: yes 
edit 
boot countdown: 5 seconds 
select at start: default profile 
show floppy 
boot: no show cdrom 
boot: no show usb 
boot: no
&lt;/code&gt;&lt;/pre&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb12_hua15711fe00f341b90f65d7db4b050b6b_67475_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb12_hua15711fe00f341b90f65d7db4b050b6b_67475_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;540&#34; height=&#34;185&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now the menu is simple, we create the two profiles. Go to settings – profiles, select the first profile and press enter. Edit the label to something useful like “Windows XP”. To make sure Windows doesn’t see, the “rescue” partition, we need to go to “linked partitions”. Make sure the first partition is set to “boot partition”, this can be done by pressing “b”. Set the rest of the partitions to “clear”, this makes the partition(s) invisible to Windows.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image12_hu853f485a16eb5da7d2c070cc2f41dcb4_7200_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image12_hu853f485a16eb5da7d2c070cc2f41dcb4_7200_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;271&#34; height=&#34;252&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Next we create the “rescue” profile, so go to settings – profiles and press the down key once. This selects the second profile, even if it is empty, press enter, to configure this profile. Type a name, like “rescue” and set visibility in the menu to “yes”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image13_hu01f5bc5c779881f67feb6a41b5d85d25_3195_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image13_hu01f5bc5c779881f67feb6a41b5d85d25_3195_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;448&#34; height=&#34;71&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Go to linked partitions and make sure both partitions are visible. Also make sure that the second partition is the boot partition, you can accomplish this by pressing the “b”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image14_hu2ba129e8faf88bee72a88968a2ce7019_7400_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image14_hu2ba129e8faf88bee72a88968a2ce7019_7400_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;271&#34; height=&#34;248&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Test it, by going to the menu and boot Windows and the second time boot the Rescue profile. If they both work you can continue with step 4.## Step 4 – Making the “rescue” / image script&lt;/p&gt;
&lt;p&gt;Now we can boot into Windows and a small Linux distribution it is time to create the “rescue” script. We don’t want a user to worry about Linux commands it is just a simple restore. First of all I’m not a BASH guru, so probably not everything is done in the most efficient way. In order to make the rescue process possible, we need to create two directories.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;mkdir /mnt/images mkdir /mnt/script&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The first directory is going to store the created images and the second one stores the script. Now we make the script.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nano /mnt/script/rescue.sh&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fill in the code below for a basic “script”.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash
#
#	AUTOIMAGE SCRIPT
#
#	CHANGES:	ROB	2010-12-30	First attempt.
#	TODO:
#

#Expects the &amp;quot;next function&amp;quot; as a parameter
CheckPassword(){
	clear
	echo &amp;quot;To continue, give in the password&amp;quot;
	echo
	read password
	if [ &amp;quot;$password&amp;quot; == &amp;quot;the password&amp;quot; ]; then
	    $1 $2
	fi
	MainMenu
}

#Delete image, expects the filename as parameter
RemoveImage(){
	clear
	echo &amp;quot;Are you sure, you want to remove $1 ? [Y/N]&amp;quot;
	echo
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; )
		    rm $1
		    MainMenu
		;;
		* ) #MainMenu
		    MainMenu
		;;
	esac
}

#Verwacht als parameter de vervolgfunctie
ListImages(){
	clear
	echo &amp;quot;Available images&amp;quot;
	i=1
	for test in /mnt/images/*
	do
	    echo [$i] $test
	    array[$i]=$test
	    let i=$i+1
	done
	echo
	echo &amp;quot;Make a choice&amp;quot;
	read choice
	CHOICE=${array[choice]}
	$1 $CHOICE
}

MainMenu(){
	clear

	echo  &amp;quot;RESCUE MENU&amp;quot;
	echo
	echo  &amp;quot;Make a choice, followed by enter:&amp;quot;
	echo  &amp;quot;[1] Restore system&amp;quot;
	echo
	echo  &amp;quot;Administrator options&amp;quot;
	echo  &amp;quot;[2] Create a new image&amp;quot;
	echo  &amp;quot;[3] Set a new default image&amp;quot;
	echo  &amp;quot;[4] Restore a specific image&amp;quot;
	echo  &amp;quot;[5] Remove image&amp;quot;
	echo
	echo  &amp;quot;[0] Reboot system&amp;quot;
	echo
	read choice

	case &amp;quot;$choice&amp;quot; in
		&amp;quot;0&amp;quot; ) #Reboot
		      shutdown -r now
		;;
		&amp;quot;1&amp;quot; ) #Restore System
		      PutImage /mnt/images/default.000
		;;
		&amp;quot;2&amp;quot; ) #Create a new image
		      CheckPassword PullImage
		;;
		&amp;quot;3&amp;quot; ) #Set a new default image
		      CheckPassword ListImages SetStandardImage
		;;
		&amp;quot;4&amp;quot; ) #Restore a specific image
		      CheckPassword ListImages PutImage
		;;
		&amp;quot;5&amp;quot; ) #Remove image
		      CheckPassword ListImages RemoveImage
		;;
		* ) #Bad choice
		    MainMenu
		;;
	esac
}

#Create an image
PullImage(){
	clear
	echo &amp;quot;Give in an image name.&amp;quot;
	echo
	echo &amp;quot;TIP!: Put the date in the filename, like 010111_WinUpdates&amp;quot;
	read name
	clear
	echo &amp;quot;Create an image with the following name $name continue? [Y/N]&amp;quot;
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; ) #Image maken
		    hdimg=$(fdisk -l | grep NTFS) &amp;amp;&amp;amp; hdimg=${hdimg:0:9}
		    partimage -z0 -b -o -d -V100000 -f2 save $hdimg /mnt/images/$name
		    MainMenu
		;;
		* ) #Terug naar menu
		    MainMenu
		;;
	esac
}

#Expects the imagename as parameter
PutImage(){
	clear
	echo &amp;quot;Are you sure? [Y/N]&amp;quot;
	echo
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; )	#IMAGEN
			#Pick the right partition
			hdimg=$(fdisk -l | grep NTFS) &amp;amp;&amp;amp; hdimg=${hdimg:0:9}
			#Partimage
			partimage restore $hdimg $1 -b -f2
		;;
	* ) #Back to MainMenu
	    MainMenu
	;;
	esac
}

SetStandardImage(){
	clear
	echo &amp;quot;Set defualt Image&amp;quot;
	echo
	echo &amp;quot;Are you sure, you want to set $1 as the defualt image? [Y/N]&amp;quot;
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; ) #Set default
			#Rename old image (date +%Y%m%d-%H%M%S)
			mv /mnt/images/defualt.000 /mnt/images/olddefault_$(date +%Y%m%d-%H%M%S).000
			mv $1 /mnt/images/default.000
			MainMenu
		;;
		* ) #Back to MainMenu
		    MainMenu
	esac
}

MainMenu
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can exit the script by pressing CTRL+X. Now we need to make the script executable, this can be done by: chmod +x /mnt/script/rescue.sh You can test the script by typing “/mnt/script/rescue.sh”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image15_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image15_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;277&#34; height=&#34;199&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;The password in the script is “the password”, the disk which gets imaged is the disk which shows in the output of “fdisk –l”, “ntfs”. This probably gives error if you have more then one NTFS partition. The last step is to automatically start the menu, when the user boots into “rescue” mode. For this open the rc.local in nano or vi and add “/mnt/script/rescue.sh”, just before “exit 0”. nano /etc/rc.local&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image16_hu65ea1b847104d46b76921b06aa6a801f_18324_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image16_hu65ea1b847104d46b76921b06aa6a801f_18324_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;133&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;h2 id=&#34;final-note&#34;&gt;Final note&lt;/h2&gt;
&lt;p&gt;This is just a simple start, to create the bare minimum, since it is all “open” it is easy to extend, modify,etc. This is just a blog post, which might gets you started. For example, if you are in a business environment, think about booting from PXE and image over the network. We use this for our “thin” clients, which run on Windows XP Embedded. I always find it nice to hear improvements, different thoughts, etc.&lt;/p&gt;
&lt;h3 id=&#34;update-2011-04-20&#34;&gt;UPDATE 2011-04-20&lt;/h3&gt;
&lt;p&gt;Made some minor changes, like adding chmod+x and changes /mnt to $MNT.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Automatically Send Network Device Configurations to Your Support Partner</title>
      <link>https://blog.breekeenbeen.nl/post/automatically-send-network-device-configurations-to-your-support-partner/</link>
      <pubDate>Thu, 09 Sep 2010 20:00:58 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/automatically-send-network-device-configurations-to-your-support-partner/</guid>
      <description>&lt;p&gt;In the last part of the Rancid set-up I created a simple Bash scripts which e-mails the configurations of the network devices to myself and our support partner once a week. This because when your network is down, you always want access to your configurations. Further for our “sub” locations, we have a support partner which fixes the issues on these locations and it would be nice if they always have the up-to-date configuration files. Since there is not much changing in these configurations sending them once a week is more then enough, but this is of course up to you. The script, works fairly simple, it is important that you have set-up the right SMTP server!&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash 

# Script for mailing the network device configurations 

# Make a directory where we can temporarily place the configurations 
mkdir -p /tmp/backup/switch 

# Looking for files starting with “sw” and that are greater then 0 bytes. Copy them to # the just created temporarily folder.
find /usr/local/rancid/var/ -name &amp;quot;sw*&amp;quot; -not -name &amp;quot;\*svn\*&amp;quot; -prune  -size +0 -exec cp &#39;{}&#39; /tmp/backup/switch/;

# Put the files together in one tar file.
cd /tmp/backup/switch tar -cf /tmp/backup/switch/bck\_switch\_cfg\_week$(date +%U).tar *

#Mailing the just created tar file 
echo &amp;quot;Backup netwerkdevices week $(date +%U)&amp;quot; | mailx -s &amp;quot;Switch backup week $(date +%U)&amp;quot; -a bck\_switch\_cfg\_week$(date +%U).tar -r backup@\_nospam\_robmaas.eu  rob@\_nospam\_robmaas.eu support@partner_xx.com

# Delete the just created folder and files
rm -Rf /tmp/backup/switch
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s all, keep in mind that the find and mailing (echo) commands are on one line, otherwise they will fail. Also you may want to change the –name parameter of the find command. No we have a working script we only have to schedule it to run regularly. This can easy be accomplished with cron. I created a cronjob in the /etc/cron.d/mailbackups with the following cronjob.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;@weekly /usr/local/bin/backup_switch_cfg.sh 2&amp;gt;&amp;amp;1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We are done, now every week the configurations are mailed to the given mail addresses.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Backing Up Network Devices With Rancid Opensuse 11 2</title>
      <link>https://blog.breekeenbeen.nl/post/backing-up-network-devices-with-rancid-opensuse-11-2/</link>
      <pubDate>Wed, 25 Aug 2010 19:58:06 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/backing-up-network-devices-with-rancid-opensuse-11-2/</guid>
      <description>&lt;p&gt;One of the most forgotten backups is that of the network devices, while it can save you a lot of time (thus money) when things get broken. Luckily there is a tool, called Rancid. I’m using it for all our HP and Cisco devices for more then a year now. Officially it was running on a (Ubuntu) test-server which was placed under my desk :-). Not the best place for such a critical server. So now it is time to set-up a “real” management server, which takes care of the network devices backup. Since we already have some Suse servers running, I picked OpenSuse 11.2 as OS for this server. Let’s get started. Before we can install Rancid, we need to install “expect”, this is the language Rancid is written in. The most easy way to accomplish this is by using yast and search for “expect”. Now we have started yast, we also need to install &amp;ldquo;cvs”, which Rancid uses for file comparison.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/backing-up-network-devices-with-rancid-opensuse-11-2/image2_hu637473982bd47b71a5fe2f15581e47e4_91568_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/backing-up-network-devices-with-rancid-opensuse-11-2/image2_hu637473982bd47b71a5fe2f15581e47e4_91568_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;384&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now download Rancid, it can be retrieved from this 
&lt;a href=&#34;http://www.shrubbery.net/rancid/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;website&lt;/a&gt;. I downloaded it in my home directory under downloads/rancid and unpack it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;wget 
&lt;a href=&#34;ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.4.tar.gz&#34;&gt;ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.4.tar.gz&lt;/a&gt; tar -xvf rancid-2.3.4.tar.gz&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Go to the unpacked directory and install Rancid.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd rancid-2.3.4 ./configure make install&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If everything went ok, there is a directory created /usr/local/rancid. Since we don’t want to use a root account for Rancid to work, we create a user called rancid and set his home directory to the installation directory /usr/local/rancid. After we created the user, we make him the owner and give right permissions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;useradd -d /usr/local/rancid rancid chown -R rancid /usr/local/rancid/ chmod -R 770 /usr/local/rancid/&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now we can start configuring Rancid. If you’re a real 1337 person, you use vi, but I like nano more, so the next command is.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nano /usr/local/rancid/etc/rancid.conf&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What I usually do is create a group for every location, for this go to the line&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#LIST_OF_GROUPS=”sl joebobbisp”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and change it to.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;LIST_OF_GROUPS=”Headquarters” LIST_OF_GROUPS=”$LIST_OF_GROUPS Location1” LIST_OF_GROUPS=”$LIST_OF_GROUPS Location2” …&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now let’s run Rancid CVS to create the directories and configuration files for the locations. We do this with the Rancid user.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;su – rancid ./bin/rancid-cvs&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you now look in the /usr/local/rancid/var/ directory, you should see the directories which Rancid created by following the rancid.conf file. Additional there are two directories created, “CVS” and “logs”. Within the location directory there is a file, called router.db, this file contains all the routers off that location, which we like to back-up. Since Rancid has no idea by itself, what we like to back-up we need to add these devices ourselves.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd location nano router.db&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Type the following lines, replace the “core” and “distr” with your own names or IP address. My advice is to take DNS names, cause it is more clear then IP addresses, also the name or IP is used to create filenames which contains the actual configuration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#Devicename or IP : Devicetype : Up CORE:HP:UP DISTR:CISCO:UP&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As you probably already guessed, the # is used for comments. Now there is only one thing left. Rancid needs credentials to get access to the device. We create a file in the home directory of the rancid user and since we’re running the command as the user rancid, the command is very simple.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nano ~/.cloginrc&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let’s add the following lines for general access and one specially for the core.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#Specific location/device add password   core     verydifficultandlongpassword #General add password     *       asimplepassword add method        *       telnet add autoenable  *       1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Unfortunately Linux thinks that this file may be read by everyone, we definitely don’t want this and rancid will even give an error on this, so we need to make sure this file is only readable by the rancid user and the group root.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;chmod 770 ~/.cloginrc&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now we can test Rancid by running it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;~/bin/rancid-run&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When it is done, check the config directory in the ./var/location directory and see if there is a file placed, use cat to check if the configuration is actually in i.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd ~/var/location1/config ls cat core&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Congratulations! If everything went ok, you now should see the configuration of the switch you backed upped with Rancid. &lt;em&gt;If you don’t see the configuration, go to the var/logs directory and see if you can find out what went wrong in the log.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd ~/var/logs ls less location1.20100825.160011&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But we ain’t there yet, of course we like to automate this process. This is fairly simple, cause we have created a user, this user has his own cron.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;crontab –e&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my case it is enough to make a daily back-up, but this is of course your own decision.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;@daily /usr/local/rancid/bin/rancid-run @daily /usr/bin/find /usr/local/rancid/var/logs -type f -mtime +1 -exec rm {} ;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The second line deletes log files, older the 2 days. Now we’re done with Rancid. The next step is create a nice web interface for configuration comparison and something we do is mail all the configurations to our support partner weekly. So when there is trouble they also have the latest configurations. I’ll cover these steps later on.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Hurray for Testdisk</title>
      <link>https://blog.breekeenbeen.nl/post/hurray-for-testdisk/</link>
      <pubDate>Mon, 25 Jan 2010 13:26:33 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/hurray-for-testdisk/</guid>
      <description>&lt;p&gt;Last weekend I (re)installed my hobby server with Ubuntu server 9.10. I placed an old Highpoint RocketRaid 1740 Raid controller with 3 500GB disks in it. Since the RocketRaid had no configuration I build up a RAID5 configuration. A few years ago this was also the situation with the same disks. After installing the driver, the (raid) disk was found and shows me one disk of 1TB.After this I become curious if it was possible to restore the old data of this disk, not that it was important, but just for knowledge and fun.&lt;/p&gt;
&lt;p&gt;After some googling I found 
&lt;a href=&#34;http://www.cgsecurity.org/wiki/TestDisk&#34; title=&#34;TestDisk&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;TestDisk&lt;/a&gt;, luckily for me it was in the repositories, so I downloaded and installed it. The CLI was very straightforward and easy to use. TestDisk very soon found the old partition. After this it asked for a deeper search and this took about 14 hours, but I think it is fair if it is real (important) data, which has to be restored. A few ours later my raid set was completely restored and running. I think it is an amazingly good result, so I say a big hurray for TestDisk!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Ldap Authentication for Ipplan Apache Linux</title>
      <link>https://blog.breekeenbeen.nl/post/ldap-authentication-for-ipplan-apache-linux/</link>
      <pubDate>Mon, 21 Dec 2009 19:46:45 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/ldap-authentication-for-ipplan-apache-linux/</guid>
      <description>&lt;p&gt;As you may have read, I’m testing with an IP management tool, called IPPlan. Since I’m not the only one at our company, that need access to IPPlan and I wasn’t planning in doing a lot of user management, I did a try to connect IPPlan to our Active Directory (LDAP) environment. It took me a while to figure it out, maybe cause the lack of “good” documentation or my experience. It doesn’t matter, because it is working now. This is what I did to get it working. Go to the subdirectory “user” in the “ipplan” directory, the full path (here) is: “/var/www/ipplan/user” and create a file with the name “.htacces”. Edit the file with the following information.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AuthType basic AuthName &amp;ldquo;IP Plan LDAP Authentication&amp;rdquo; AuthBasicProvider ldap AuthLDAPURL ldap://ldapserver:389/ou=accounts,dc=robmaas,dc=eu?cn AuthLDAPRemoteUserIsDN off require valid-user&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The “ldapserver” is just the IP or DNS name of your LDAP(AD) server. After the URL you can use a standard LDAP query (don’t forget to replace the domain name). If your LDAP server needs authentication like mine does, you need to add the following two variables.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AuthLDAPBindDN &amp;ldquo;
&lt;a href=&#34;mailto:ldap@robmaas.eu&#34;&gt;ldap@robmaas.eu&lt;/a&gt;&amp;rdquo; AuthLDAPBindPassword &amp;ldquo;secret&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Make sure, your Apache configuration does support the including of “.htaccess” files. This can be done by setting the “AllowOverride” to All, like this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AllowOverride All&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Don’t forget this; it took me about 2 hours, before I got it. Also don’t forget to include the LDAP module in to Apache.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a2enmod authnz_ldap&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After this we need to edit “config.php”, find the following line:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;define(&amp;ldquo;AUTH_INTERNAL&amp;rdquo;, TRUE);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and change it to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;define(&amp;ldquo;AUTH_INTERNAL&amp;rdquo;, FALSE);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The last change I had to make, was changing this line:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;define(“AUTH_VAR”), ‘PHP_AUTH_USER’);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;into&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;define(“AUTH_VAR”), ‘REMOTE_USER’);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s it, after restarting the Apache (httpd) service, it should all work. Don’t forget, the authentication is done through LDAP, but you still have to create the users in IPPlan.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sidenote:&lt;/strong&gt; &lt;em&gt;If the webpage is running on HTTP the username(s) and password(s) are sent in plain text to the webserver. In this case you should think about migrate it to HTTPS.&lt;/em&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Warcraft 2 on Linux</title>
      <link>https://blog.breekeenbeen.nl/post/warcraft-2-on-linux/</link>
      <pubDate>Sun, 19 Jul 2009 20:20:19 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/warcraft-2-on-linux/</guid>
      <description>&lt;p&gt;I would not call myself a gamer, cause I&amp;rsquo;ven&amp;rsquo;t played any game lately, but a few years ago, eight or maybe more. I had plenty of time, so besides programming and other things on a pc, I also played games.&lt;/p&gt;
&lt;p&gt;One of my favourite games in these days was Warcraft 2. I had a lot of fun playing that game. Now in my vacation I had the glorious idea of starting up that game again, but my laptop is running Linux and not some DOS 6.22 or earlier :-). So I installed Wine and put the CD in the drive, the installation went smoothly, but I wasn&amp;rsquo;t able to start the game, it was requesting the CD.&lt;/p&gt;
&lt;p&gt;To solve this problem you have to go the configuration of Wine, go to the Drives tab and add a drive that points to the mountpoint of the CD. I&amp;rsquo;m not sure if this driveletter has to be &amp;ldquo;D&amp;rdquo;, another tip make an image of the CD and mount that one, this way you don&amp;rsquo;t have the swap the CD. I had one small problem when starting the first campaign, the sound engine of Wine got broken, a small work around for this is to save the game and exit the game. Make sure also all processes of Wine are stopped. Now restart the game and load your savegame now you will have sound in all the missions.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Linuxmint 6 and Sound on a Toshiba Tecra A10</title>
      <link>https://blog.breekeenbeen.nl/post/linuxmint-6-and-sound-on-a-toshiba-tecra-a10/</link>
      <pubDate>Wed, 07 Jan 2009 19:45:29 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/linuxmint-6-and-sound-on-a-toshiba-tecra-a10/</guid>
      <description>&lt;p&gt;Today I was in the mood for trying another distribution. So Linux Mint gets a chance of proving itself. The installation went fine, but after the installation there was no sound. This was easily solved by adding the next line to alsa-base.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;options snd-hda-intel index=0 model=toshiba position_fix=1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To edit the right file, type:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo nano /etc/modprobe.d/alsa-base&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since Linux Mint is a fork of Ubuntu 8.10, this problem will probably also occur in Ubuntu and the solution above will do the job.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Mymovies Import Plugin for Gcstar</title>
      <link>https://blog.breekeenbeen.nl/post/mymovies-import-plugin-for-gcstar/</link>
      <pubDate>Fri, 11 Jul 2008 19:18:50 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/mymovies-import-plugin-for-gcstar/</guid>
      <description>&lt;p&gt;I’m running Linux for about one year now and I definitely felt in love with it. The only thing that was missing was my DVD-collection which I managed with MyMovies, a great tool, but it has no real alternative for Linux. So after searching for a while I found GCstar, it is a bit more basic then MyMovies, but it works good and it is very fast compared to MyMovies.&lt;/p&gt;
&lt;p&gt;The only problem was, I have quiet a big collection about 1300 DVD’s and I was not planning to add them manually to GCstar. This problem was not as easy solved as I wish it would be, cause there was no MyMovies import plugin. So I had no other option than write my own import plugin, quiet a big step when you don’t have any knowledge about Perl, but I managed it with a bit sneak and peak and a bit help from the author of GCstar with some array reference troubles.&lt;/p&gt;
&lt;p&gt;So 
&lt;a href=&#34;http://forums.gcstar.org/attachment.php?item=251&#34; title=&#34;MyMovies Import Plugin&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;here&lt;/a&gt; it is.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Mythbuntu 804 Versus Windows Media Center Vista Xp</title>
      <link>https://blog.breekeenbeen.nl/post/mythbuntu-804-versus-windows-media-center-vista-xp/</link>
      <pubDate>Thu, 15 May 2008 19:16:19 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/mythbuntu-804-versus-windows-media-center-vista-xp/</guid>
      <description>&lt;p&gt;As some you may have read in one of my previous posts, I really was tired of using Windows Media Center. At that moment I decided that I was going to take a look to other Media Center software. After looking around for a while and find some great projects, like Elisa and Media Portal I decided to use Mythbuntu. As you can guess a combination of Ubuntu and MythTV.&lt;/p&gt;
&lt;p&gt;I’ve been running a dedicated HTPC for about 5 years, first with Windows XP Media Center after that I used Vista Media Center for about a year and since three weeks I’m running Mythbuntu. So I think I can give a fair opinion between Windows Media Center and Mythbuntu. It is still an opinion, so you don’t have to agree with me.&lt;/p&gt;
&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;
&lt;p&gt;Let’s take a look at the beginning the installation. Both products have an easy to follow installation and I think everyone with a bit knowledge about computers can install both products even if you don’t have any knowledge about Linux. In my opnion both products scores equally at this point. If I really had to pick one it is going to be Mythbuntu, cause the driver installation was very very easy with the restricted driver setup.&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;p&gt;After the easy installation it was time for configuration of both products and I really have to say, even that I’m a bit of a Linux fan, the Windows configuration was much easier then the Mythbuntu configuration.&lt;/p&gt;
&lt;p&gt;At first the electronic program guide(EPG) was much easier to configure in Windows, I typed in my zip-code and that was it. Because I live in the Netherlands I had to use a so called grabber to grab my guide information from the Internet and with some reading it wasn’t really hard to configure but it sure takes a lot more time than the configuration of the EPG in Windows.&lt;/p&gt;
&lt;p&gt;Another point that was not really hard, but took me a little time to figure out was that you can use different sound systems for each plug-in, so for MythTV you can use another device than for playing music. So when I thought I had running my system I could watch TV and change the sound volume, but when I was listening to some music, I couldn’t. This was easy to solve, but I it is a bit annoying if you run a dedicated system and thought you were done with the configuration.&lt;/p&gt;
&lt;p&gt;VGA-RGB scart, I have an old television, such thing with a really big tube at the back, so not an LCD or plasma. So to gain the best picture quality I used a VGA-RGB scart cable, but since the TV cannot display standard computer resolutions, I need to configure so called custem resolutions. F or Windows there is a tool called Powerstrip to accomplishes this, but in Linux I need to configure xorg.conf and after trying this for more than 15hours I gave up, this is so much easier to do with a graphical tool like powerstrip which let you see the effect of the changes immediately. I know, not really a fault of Mythbuntu, but I struggle more with it, then I did with Windows and Powerstrip.&lt;/p&gt;
&lt;p&gt;Further there were some small things that could have done better, like browsing to the right media folders instead of typing the complete path.&lt;/p&gt;
&lt;p&gt;If you read this, I guess you may think Windows will easy win this point, but that is not completely true. Mythbuntu and then especially MythTV is much harder to configure then Windows, but I think this is a side effect of all the extra possibilities that MythTV has. I think if Mythbuntu / MythTV will gain more standard users, that this is a point really need some work, for example a basic set-up and an advanced setup.&lt;/p&gt;
&lt;h2 id=&#34;working&#34;&gt;Working&lt;/h2&gt;
&lt;p&gt;Both products are stable and that is really important for a dedicated mediacenter, there is nothing such annoying as a reboot during that great film.&lt;/p&gt;
&lt;p&gt;So here Windows forgets one big thing I don’t want to reboot my system while I’m watching a film or listening to some great music. When Windows got some automatic updates it gives me a question if I want to reboot or not. So I choose not, but after an hour or so, Windows is still going to reboot, this time without a question!&lt;/p&gt;
&lt;p&gt;Also is the speed of Windows compared to Mythbuntu slow, I&amp;rsquo;ve a lot of albums and movies and if I want to browse through them in Windows Media Center, it is real slow especially compared to mythbuntu.&lt;/p&gt;
&lt;p&gt;Both products have an easy to follow menu, but the interface of Vista Media Center is more smoother and dynamic than that of Mythbuntu. I think this has something to do with the themes that are available within Mythbuntu.&lt;/p&gt;
&lt;p&gt;I also did the girlfriend and mother proof and for some reason they feel more comfortable with controlling the Vista Media Center than Mythbuntu, I guess this is caused by the smoothness of Vista.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;After all this it is still hard for me to say which one wins and I think it has also something to do with your needs and capabilities.&lt;/p&gt;
&lt;p&gt;Windows Media Center has some advantages if it comes to simplicity and looks. It is easy to configure and it wins the girlfriend, mother proof test. The biggest disadvantage for me were the reboots even if I said that it may not reboot also the speed and the incapability I had after replacing the motherboard is still on my mind (see my previous post), I want control about my system. Another thing I miss is the central-server (back-end) with multiple front-ends set-ups.&lt;/p&gt;
&lt;p&gt;Windows Media Center gives you all the basic needs for a Media Center, but if you want more you still need to look for third-party plugins.&lt;/p&gt;
&lt;p&gt;Mythbuntu on the other hand is easy to install, but can be a bit tricky to configure, the interface is a bit simple compared to Windows, but it offers a lot more features, especially the Picture in Picture function, the MythWeb plugin and the back-end/multiple front-end setup are very cool features. It also response much quicker than Windows Media Center especially when using a folder that contains a lot of music or films.&lt;/p&gt;
&lt;p&gt;I should say if you really want control over your system and looking for some real cool features you should definatly choose Mythbuntu. If you want a simple and easy to configure system pick Windows.&lt;/p&gt;
&lt;p&gt;For my the choice is easy I like to have control over my system and I really like the features of Mythbuntu so that&amp;rsquo;s going to be my choice even if it takes a lot more time to configure.&lt;/p&gt;
&lt;p&gt;A small sidenode, Mythbuntu is free and so you can give it a try if you are not sure which one to choose.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>It Is Showtime</title>
      <link>https://blog.breekeenbeen.nl/post/it-is-showtime/</link>
      <pubDate>Thu, 01 May 2008 19:49:44 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/it-is-showtime/</guid>
      <description>&lt;p&gt;Nothing much to tell, just let you see, that Linux can look cool too :) As you can see, it looks very cool and the days that you had to be a geek or nerd to work with Linux are over. The whole set-up took me no longer then 1 hour, this is including installation time.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/it-is-showtime/20080501_desktop_hueaa6c2c74166d25509286af4c5d2f49e_312633_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/it-is-showtime/20080501_desktop_hueaa6c2c74166d25509286af4c5d2f49e_312633_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;1600&#34; height=&#34;640&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

</description>
    </item>
    
  </channel>
</rss>
