Archives

Blogroll

Initially It was not posible to install Linux on Lenovo Yoga 900s ( Yoga 900S-12ISK) due a non standard Harddisk access method. It was thought that Lenovo had a plot with Microsoft to avoid Linux to be installed on this laptop. But Lenovo answers with a BIOS release that makes posible to install Linux. I really like this laptop, fanless, long battery, light, tablet mode and Linux compatible.

This post is a tutorial that describes howto install Debian Linux and dual boot with Windows 10 partition. This tutorial is for advanced users, please use at you own risk.

Back up drivers & create a Windows 10 USB

In order to have Windows working on this laptop you have to reinstall it with the new AHCI mode. Note that Lenovo does not support Windows with the Linux compatible firmware.

You need to have two usb, one with the drivers and another with the Windows 10.

Install BIOS linux compatible firmware

Once all done, download the BIOS firmware that allows Linux to work. Lenovo download link. Boot Windows and install the new BIOS firmware.

As you can see, there is a new option on the BIOS. Change it from RAID to AHCI.

Now the factory Windows install will not work, It was installed on RAID mode and doesn’t works on AHCI mode.

Don’t worry we can reinstall Windows, with the new AHCI mode.

Reinstall Windows and drivers

Now, boot with Windows 10 media USB, delete all partitions, create a smaller partition (in my case 64GB), windows will create additional partitions. Complete the Windows installation process. The windows will be activated as they will recognize the laptop has license for Windows 10. Doing that you will loose your recovery partition and could not restore to factory setting, and probably you could not install Windows in RAID mode again, make it at your risk.

After installed Windows, install one by one all the drivers, you previously copied to the USB.

That’s it, we have a windows installed on “Linux compatible mode”.

Install Debian

Now It is time to install Debian. I have tried with Debian Jessie with no luck, the grub didn’t installed on the disk.
Then I tried Debian testing Stretch ant it works!!!

NOTE: This article is old, this hack is no longer necessary, as Debian includes dehydrated that makes all the work.

Free SSL certificates for everyone! the https://letsencrypt.org/ initiative backed by Akamai, Cisco, Mozilla and EFF, is going to offer free certificates. On this post I am going to explain how I have automated the process of creation and renewal of certificates, on a Debian server with a lot of virtualhosts with the minimal modification of the apache conf files.

The idea of the project is to extend the use of SSL certificates everywhere, the aproach of the project is that the process of provisioning certificates is selfprovisioned from the servers with no manual interaction, to force that the certificates expiration is 90 days, forcing sysadmins to automate the proccess.

In order to validate and sign the certificate the Let’s Encrypt CA, will use the DNS and will query your webserver for some credentials issued during the certificate generation.
Moreover your webserver will have to answer to some queries from the CA during the issue and renewal of certificates. The let’s encrypt software is able to modify your webserver setup, or can launch its own webserver, but none of these aproaches are aceptable for me, I want to have full control of the webserver, and make only controlled changes, there are a lot specific apache setups. Fortunately Let’s encrypt offer us a useful option called webroot that only need to put files on a place on your website, this allow us to create an automated script with full control of what is being done.

First at all we follow the instructions to install the letsencrypt binaries:

I bought a Lego WeDo set for my son, this set is composed by some lego technic pieces and a Hub with USB where you can connect a motor and two sensors, distance and tilt. This set works natively with Windows and OSX but not with Linux. The software includes gives you an educational graphical tool for programming based on scratch.

Scratch is a graphical programming tool for education designed by MIT, you can find more info on scratch website.
The software included with Lego is a more simplistic and easy for kids kind of scratch, It has less options, bigger buttons, and sounds that match the lego instruction designs, this software is not free, It cost 85€ and is sold separately from the inital box (WTF!). However It is possible to use original MIT scratch with Lego WeDo and Linux.
There are two versions of scratch, the 2.0 is web based and It doesn’t work with Lego and Linux, but the older on 1.4 works with Lego Wedo and It is included on Debian Wheezy.

But It doesn’t work, you need to add a udev rule, to do that create this file
/etc/udev/rules.d/99-wedo.rules with this contentATTRS{idVendor}=="0694", ATTRS{idProduct}=="0003", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"

Then restart udev with/etc/init.d/udev restart

Now everything is ready, start the scratch from Applications->Education-> Scratch.

Unhide the Lego Wedo options from the Edit Menu.

You will find new motion options

And on the sensors you have the Lego Wedo sensors tilt and distance.

In order to wait until a sensors detect a condition you can use this structure, a wait condition, an operator and a sensor box like this.

As a Debian fan, I always want to install my favourite Linux distro Debian, on my personal laptop. Some months ago my wife give as a present a fantastic laptop a Sony VAIO VPCYB2M1E, It is a AMD E-350 CPU with 4GB of RAM.

First try was to install Debian squeeze AMD64 , after some trys It willl work, wifi was working and xwindow too, but sound doesn’t work, the sound card was detected but I didn’t acomplish to select with the mixer the device to produce sound, other problem was the suspend, after suspending the machine the screen didn’t return, remaing black. I try severar tweaks with APM and Xwindow, but with no luck.

I try to boot up a Ubuntu liveCD, it works well, even sound and suspend modes. But I don’t want Ubuntu, I want to have the real free distro Debian 🙂

My next try was to update to the testing version of Debian “Wheezy”, I update to that version and the sound works, but I have problems with the kernel 3.2.0, during boot up it show snow on the screen….

After some googling I find out that the problem was loading some kernel modules that need some non-free binaries, the solution was easy:
#apt-get install firmware-linux-nonfree

Imagine you have an Amazon Ec2 instance, and you miss your ssh keys, and passwords. How can you execute a password recovery? That is easy, mount your disk on other machine to do that. First a t all you need and EBS root instance.

Stop the machine

Detach the volume from machine

Create a new machine on the same availability zone, for example a micro instance with fedora, an start it

Attach the volume to it, for example on /dev/sdh. Don’t use the elasticfox, I don’t know don’t work for me, use the aws web.

I usually install Debian machines with software RAID and LVM, until today I have not needed to recover one disk from outside the the system. It is a little bit trick, I decide to make this post for my own interest and help others.

I have been always an amateur sciencist person, I like a lot Carl Sagan, astronomy, maths and computers. One devices that fascinated me a lot are sundials, I have combined it with my computer knowledge, and this is my contribution to the 2.0 sundial technology. 🙂 This post explain what I have done 🙂

I have designed is about paper sundials, sundials are tools that tells you the time, only with the shadow of the sun, to design a sundial you need to know exactly, where are you going to put it, you need to know the longitude, the latitude and the orientation of the wall with respect to North.
I have designed a web page, integrated with Google Maps, that helps you to find easily all the parameters needed, and finally produce a printable page, with a sundial paper cut, that can be cut and folded and give you a vertical Sundial.
This page allows you to make your own Cut Out Paper Vertical Sundial customized to your place on earth and the declination of the wall you are going to put it.

You will obtain a paper sundial like this:

the webpage gives you a printabel PDF, that you only need to cut and fold, this is a sample:

On this post I will explain howto install samba on Voyage Linux 0.5 version. Voyage Linux is the distribution I have installed on the minimotherboard Alix.

As you should know the systme doesn’t use a hard disk, It uses a Compact Flash memory card, that makes the hard disk functionality, I have a 8Gb compact Flash memory card where I have all teh space that I need.

the main disavantage of Compact Flash media, is that they are not writable every times you need, They have a nunmber of times you can rewrite, this number is high, between 300 thousand to million, that is the reason taht all the system, the voyage Linux distribution, is mounted read-only. you have two scripts, “remountrw”, to mount the filesystem with write permissions, and “remountro” to remount read only.
Moreover we have to take this into account on all the applications that need to write on disk.

RAM writable directories

Due that a lot of apps need to write in order to run, Voyage Linux, have a memory mounted partition where you can write, that is space is small (memory space), and is not permanent, you lost it where the system is rebooted.
The trick is that exists a directory called /ro where is all the information that will be copied to teh volatile directory on boot-time, the script taht makes that copy is on /etc/init.d/mountall the last line makes the copy using tar , tar -C /ro -cf - . | tar -C /rw -xf - > /dev/null 2>&1

And then when you need a writable directory yo make a link to the /rw directory, we can see an example with the var directory.

One interesting function our embedded is file sharing, we can share flash contents and contects mounted on usb ports.

This are the way to have it working:

#remountrw
#apt-get install samba
#remountro

since this point, It would be a normal samba installation on Debian, but if you try to boot samba it complans about file write permissions on the files located on /var/lib/samba, however samba works perfectly with remountrw, moreover we have to “convert” that files in writable ones.

As I explain on previous posts, I adquired a cheap two SATA bays home NAS, called Netgear Stora. After the disappointing privacy a features unfunctionalities the manufacturer give to us, the community again have achieved to develop an alternative way to open and use the software for this device, It is now achieved!! you can run an standard ARM Linux distribution on it!!

Every year I assist to Benaguasil party and colabotate with the organization on technical issues, mainly Internet access, each year we have a different scenario, the sponsors one year give us an ADSL, other year a Cable modem, even a wifi access. We always have a Linux server that deals with the connection and give access to the LAN-party doing NAT,or proxy.

This year (2005) we had four Cable Modems each one with 4MB download rate. The exact equipment were four cable modems with one Ethernet port with DHCP assignement (with no configuration options and no NAT option only single mode). We have a Linux server with five ethernet adapters.

And we want to give this download thougput (4Mb x 4) to the LAN party.

Aproaches

We made a brainstorming thinking about how to use all four connections, some ideas, only one of them developed (Are all other posibles?).

-We thought to use a comercial solution, like linkproof from radware, probably we could obtain one borrowed, but we have no clear experience about that product with four ethernets with dhcp on each port. But more important we want to make it work with free software 🙂 only with the Linux server.

-SQUID: A network of squid caches, each one connected to a different Cable modem. Is posible to one squid on a multihomed host to balance connections? All questions unknow.

-To distribute the hosts on LAN, giving each group of hosts a different default gateway. The problem was that we need four host to NAT, due that Modem Cable don’t allow NAT, single IP for each one. We had only one PC, to do everything, with for Pcs, or NAT capable routers this aproach could be achieved, but we didn’t try due to lack of PCs.

-To statically NAT and route routing each group of client host for a specific gateway. This is very similar to the case before, but done with only on Pc, with source routing and NAT. I thought it is posible to do, buy we didn’t make it works.

-To statically NAT and route routing each group of protocols for a specific gateway. This is basically the same, but making policiy routing works giving each protocol a routing gateway thought different cable modem, this solutions have an special characteristic, you could assign web trafic a Cable modem, P2P other Cable modem, having some QOS a service control.

-To dynamicaly balance route and NAT. Better that do assignments of clients or protocols, we try this aproach that balance dinamically each line. This is what we are going to explain how we did it 🙂

Choosing distribution

I am a Debian fan, and then don’t try to install any other distribution. Then we install Debian sarge, however this tutorial have no very specific distribution issues, and I think it could work on any distribution with iptables toools, etc..

The setup

We have five ethernet interfaces, one of them is the internal LAN interface with a static IP, all others have dhcp ip assigned by the cable modem Operator Ono, our /etc/network/interfaces was: