Blog

  • How to install Lubuntu Server on Cubietruck from Mac OS X

    This is how to install and set-up the latest Lubuntu software pack on to the NAND Flash on the Cubietruck  from a Mac OS X computer.

    mac_cubietruck

    Cubietruck

    The Cubietruck is a 5V 2A single-board computer “SBC” / PC on Board “PCB” – much like the Raspberry Pi that has taken the World with a craze – but the Cubietruck is just faster, better and stronger..  In realty Cubietruck is more like a real Mini PC.

    The Cubietruck is based on the dual core Cortex-A7 (912MHz each) ARM  Allwinner  CPU with 2 GB Ram. Cubietruck has 8 GB onboard bootable NAND flash memory and it is expandable with a micro sdcard up to 32GB. You can connect a monitor/TV via the VGA or HDMI interface. The Cubietruck comes equipped with both Wifi and Bluetooth, Gigabit Ethernet, 2 USB 2.0, 1 Micro USB, OTG, SPDIF, IR, and Headphone. You can easily add a and fit a 2.5 inch Hard Disk Drive to the Cubietruck out the box. Power:DC5V @ 2.5A with HDD and support Li-battery & Real Time Clock “RTC”.

    The Cubitruck was released for sale on the 31th. of October 2013 from cubieboard.org.

    Supported Operative Systems  “OS”:

    • Android
    • Fedora
    • Lubuntu
    • Lbuntu Server

    BTW: I look forward to an Arch Linux distro for Cubietruck ( you can check here: )!

    The Cubietruck comes with Android preinstalled on the NAND – and it works out the box. Cubietruck looks after a bootable OS on the Micro SDcard before it boots from the NAND flash memory.

    There are 3 different ways to install and run Lubuntu on the Cubietruck:

    1. NAND flash
    2. Micro SD card
    3. 2.5 HHD / SSD ( or a 3.5 HHD with an external power supply )

    1. NAND Installation of the Lubuntu Server

    You need this in advance:

    • A Mac running a newer version of OS X with access to the Internet. I am doing this from a MacBook Pro Retina running OS X version 10.9 Mavericks.
    • An assembled Cubietruck with incl. cables with 2.5 HHD
    • USB Power supply 5v 2/2.5A.
    • An ethernet Internet connection.

    Get the software

    Download and install the LiveSuit NAND installer in your app folder: LiveSuit_ForMac.zip

    Download the latest Lubuntu NAND image for Cubietruck: Cubietruck Lubuntu Desktop Releases or A20-Cubietruck Lubuntu Server Releases

    Connect the mini USB to your mac (mac only).

    Open LiveSuit and Select the downloaded Lubuntu NAND image (.img)

    Cubietruck_FEL_buttonEnter FEL Mode

    1. Press FEL key and hold it in
    2. Plug in mini usb cable to the Cubietruck and wait for the prompt
    3. Release FEL key

    Flash to Board

    When you see the prompt, you have entered FEL mode. Select Yes to continue.

    That’s it!

    2. Customizing

    Changing Boot Parameters

    # mount /dev/nanda /mnt
    # vi /mnt/uEnv.txt

    Change it as you want!

    # umount /mnt
    # sync
    # reboot

    Update Lubuntu Sever

    Normally its good practice to update and upgrade your system to the latest version.

    # apt-get update; apt-get upgrade
    # apt-get install python-apt

    NB! You need to install the python-apt package to use do-release-upgrade.

    # do-release-upgrade

    Modify System Files

    To change your local timezone, you need to edit the file /etc/timezone.

    # ls /usr/share/zoneinfo

    Ex.:  “Europe/Copenhagen”

    Remove your old timezone link and make a new one.

    # rm /etc/localtime

    You can now create a symlink to the appropriate timezone information.

    # ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime

    Change timezone ex. “Europe/Copenhagen”.

    # nano /etc/timezone

    ( Use CTRL-x to exit, hit Y to save the file in nano. )

    Change hostname /etc/hostname and the hosts file /etc/hosts .

    # nano /etc/hostname
    cubietruck

    Change “Cubietruck” to the name you have in mind. I like cubietruck, so I keep it! 🙂

    Edit the /etc/hosts file to reflect the hostname.

    # nano /etc/hosts

    Modify the line of the file to read:

    127.0.0.1 localhost
    127.0.1.1 yourhostname

    If not already so replacing your hostname with the name you put in /etc/hostname.

    Mac OS X specific linux software & daemons

    In order for your Mac’s to automatically see and discover services on your Cubietruck it is convenient to install Apple’s zero conf network service “Bonjour” or “Rendezvous” and Netatalk AFP

    #apt-get install avahi-daemon

    You can verify the install of Bonjour on Cubietruck in your with ping on your Terminal App on your Mac OS X computer.

    # ping cubietruck.local

    If you want to connect you Cubietruck with Apple’s file service AFP “AppleTalk” so your Cubietruck automatically shows up in Finder, you need to install the open source version Netatalk.

    #apt-get install netatalk

    You will find the Netatalk config files in /etc/netatalk.

    Security

    Its good practice to change the root password straight away.

    NB! You should also remove the default user linaro and and disable ssh for root.

    # passwd

    Create a new regular user :

    # adduser

    Follow the prompts; use whatever username you’d like to log in. The next available UID is fine. Use the default users as the initial group.

    Add the user to the Super User Do list.

    Logout, and relogin as the regular user:

    # logout
    login: newuser
    password: yourpassword

    3. Moving Rootfs From Nandflash To Hard Drive

    Installation

    Prepeare the drive for rootfs

    Th drive must have a primary partition formated with filesystem “ext4”. You can use the Linaro user interface DISK app, gparted or use the following shell commands to partition your HDD.

    List all available drives:

    # fdisk -l

    Choose the drive you want to make changes to (e.g. sda):

    # fdisk /dev/sda

    Use “p” (print partition of a drive), “d” deletea partition or “n” (create new partition). The partition should be of type “83”.

    Format the partition for rootfs with EXT4 filesystem:

    # mkfs.ext4 /dev/sda1

    Copying Rootfs

    Assuming that /dev/sda is the hard drive we want to install.

    $ sudo su - root
    # dd if=/dev/nandb of=/dev/sda1 bs=1M

    Changing Boot Parameters

    $ sudo su - root
    # mount /dev/nanda /mnt
    # nano /mnt/uEnv.txt
    root@cubietruck:~
    console=tty0
    
    extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rootfstype=ext4 rootflags=discard
    
    nand_root=/dev/nandb

    Change the contents of uEnv.txt  from “nand_root=/dev/nandb” to “nand_root=/dev/sda1“. And check the changes with cat command.

    # cat /mnt/uEnv.txt

    Unmount the partition.

    # umount /mnt

    Flush the file system buffers with sync.

    # sync
    # reboot

    That’s it!

    References:

    Cubieboard3: Cubietruck is all ready with links software etc. cubieboard.org
    LiveSuit Guide cubieboard.org
    Moving Rootfs From Nandflash To Hard Drive cubieboard.org
    Tutorials for Cubietruck cubieboard.org
    FAQ specs and faq’s cubieboard.org
    A20-Cubietruck specs from SUNXI
    Cubieforum for Q&A’s

    Linux:

    The Debian Administrator’s Handbook by Raphaël Hertzog and Roland Mas
    www.lubuntu.net
    www.ubuntu.com
    manpages.ubuntu.com
    How to use Logical Volume Manager (LVM) to grow etx4 file systems online techrepublic.com

    InstallingANewHardDrive – Installing a new HHD, help.ubuntu.com

  • Magnus Carlsen in the lead 4-2 in Chenai

    Today Magnus Carlsen won “a look a like” drawn rook endgame in the Fide World Chess Championship against the current World Chess Champion Vishy Anand. Magnus play is in general that of a true World Chess Champion. It seems that Magnus took good advantage of the win yesterday by pressing Vishy. Magnus is now in the lead with 4 points against 2 with only 6 more games to go!

    In move 29. Magnus could have gone straight ahead with exd4 to pressure the pawn on e4!

    Vishy’s decision with 38. Qg3 to trade a pawn for piece activity in a difficult rook ending for withe seems inaccurate in retrospect. Deep HIARCS also suggest to stay put with 38. Kg1!

    Vishy’s plan with 43. h4 and 44. h5 to create a double pawn to slow down the movement of blacks pawns was good idea! And Magnus apparently did’t see this he said on the press conference in Chenai after the game.

    The decisive mistake is properly 60. Ra4? 60. b4! apparently creates the necessary counter play for the withe pawns and should at least be equal! A tough decision to make in the heat of the moment. “The best way to defend, is to attack”!

    62. But Anand’s plan with 62. c4 and 63. Ra3+ is to slow an antidote against the ambitious black pawns. White cannot prevent the queening of the black pawn without losing his precious rook.

    And the withe King from India most rest his case in this battle of minds.

    A game like this shows the unbelievably high standard of chess from both sides. Even computers will testify to this fact. But against the Mozart of Chess even the slightest inaccuracy is punished mercilessly!

    Analysis by GM Daniel King:

    Excellent in depth analysis by IM Christof Sielecki:

     

     

  • The right to Privacy for All

    Open letter to the Police State and its supporters,

    The right to privacy is a basic human need – as is the right to mingle with others freely. This is at the very foundation of human life – and maybe life it self. I believe we call it it freedom in the human world.

    Imagine a world where privacy is no longer possible. Whatever you do, whatever you say, where ever you go, with whom you are together is recorded and stored centrally by a National Security Agency in a Police State.

    It is no longer possible to have a private conversation with a friend without the Police State listens in, record and store your conversation. And you even have to worry about friends backgrounds because your very association with them is on public record. Its no longer possible to help a friend, talk to your neighbor, do business in privacy because all is on public record.

    Your hobbies, interests, readings, private life and political views is recorded, analyzed and stored. Your eating habits, your consumption of unhealthy foods, alcohol and drugs are recorded. Your childhood, adolescence, adult life and family history now also belongs to the Police State. Even your sexual preference is on public record for safety reasons. Your medical record, health history and genetic make up belongs to the archives in the Police State. And all your private property and significant belongings is under constant surveillance by the National Security Agency.

    For public safety reasons in the Police State the National Security Agency pieces every imaginable sort of information it can collect about you together and fits it into a complete and auto updated profile on you. The Police State will hold such records for themselves on all citizens of the world.

    Just imagine this!

    Now realize that this scenario is very close to the reality we currently live in or at least realize that is a near likely future of the world.

    To be able to spy on all citizens in the world in all aspects without limitation of any kind is the aspiration, hopes and dreams of almost every National Security Agency all over the world!

    How can this kind of surveillance power only exist for the safety of the public when it belongs to the few in power?

    This is ‘not something I’m willing to live under’!

    I will rather live with uncertainty, insecurity and fear in a fragile democracy, than live in a certain, secure and peaceful surveillance Police State. I object to the idea of a Police State. And I will work against the realization of a world wide Police State.

    Reference:Edward Snowden: US surveillance ‘not something I’m willing to live under’ Interview by Glenn Greenwald in theguardian, 8th. of July 2013

    The Universal Declaration of Human Rights United Nations ( UN )

    Articles:
    Snowden made the right call when he fled the U.S. washingtonpost.com 8th. of July 2013 by Daniel Ellsberg
    2011: A Brave New Dystopia by Chris Hedges truthdig.com 27. December 2010

    Online Privacy:
    Internet Privacy wikipedia.org
    The Tor Project – Web Online Anonymity
    DuckDuckGo – Anonymous Searching of the Internet
    Pretty Good Privacy – Protect your files and email with open source encryption

    Support Online Privacy Organizations:
    Electronic Frontier Foundation eff.org
    epic.org – Electronic Privacy Information Center
    Internet Defense League internetdefenseleague.org

    Litterature:
    Nineteen Eighty-Four by George Orwell
    Brave New World by Aldous Huxley

  • I support a free Internet

    I support freedom of speech.

    I support the right of privacy.

    I support a free Internet.

    Supoort Electronic Frontier Foundation in its effort to make the US Government and the like aware of the digital rights of the people in this world!

    And do join the Internet Defense League with the rest of us and defend the free internet!

    Share this 4th. of July message with others!

    Reference: The NSA Files guardian.co.uk

  • Looking for Wuji everywhere

    20130701-112316.jpg
    Looking for Wuji everywhere,
    In movement,
    In stillness
    Getting it, not getting it
    I let go,
    Finding Wuji.
    I forgot all about it!

  • Chineasy fun with visual Chinese

    You can find more info about Shaolan Hsueh’s “Chineasy” free and creative visual learning of the Chinese written language on chineasy.org and on FB: www.facebook.com/ShaoLanChineasy

  • Effective altruism

    Peter Singer talks on TED about effective altruism

  • Always Already Free

    I sit here looking out, filled with an emptiness that spills over and keeps on spilling. There is no end to this boundlessness, this delicious thrill of Presence.

    Nothing can contain it, for everything is contained within it. The good and the bad, the black and the white, the harsh and the gentle——all simply flavors of Its passage.

    Here, here, always here. So simple, so immediate. This is always here. Call it whatever you will. In truth, This has no name.

    Too exquisite to speak of, too delicate to touch, delicious, tender, yet so very solid, vast, fathomless.

    All that exists comes out of This. All that exists returns to This.
    No-one owns This, yet everyone belongs to This.

    Enza Vita

  • A benevolent and just ruler

    A ruler exercising benevolence and justice will surely win the support and help of most people; if he fails to do so, the people will be absolved of all loyalty to him.

    Mecinus

  • The teaching of a Sage

    Someone who understands the teaching of sages is a sage. Someone who understands the teaching of mortals is a mortal. A mortal who can give up the teaching of mortals and follow the teaching of sages becomes a sage. But the fools of this world prefer to look for sages far away. They don’t believe that the wisdom of their own mind is the sage. The sutras say, “Among men of no understanding, don’t preach this sutra.” And the sutras say, “Mind is the teaching.” But people of no understanding don’t believe in their own mind or that by understanding this teaching they can become a sage. They prefer to look for distant knowledge and long for things in space, buddha—images, light, incense, and colors. They fall prey to falsehood and lose their minds to insanity.

    The most essential method, which includes all other methods, is beholding the mind.

    The mind is the root from which all things grow. If you can understand the mind, everything else is included. It’s like the root of a tree. All a tree’s fruit and flowers, branches and leaves depend on its root. If you nourish its root, a tree multiplies. If you cut its root, it dies. Those who understand the mind reach enlightenment with minimal effort. Those who don’t understand the mind practice in vain. Everything good and bad comes from your own mind. To find something beyond the mind is impossible.

    When a great bodhisattva delves deeply into perfect wisdom he realizes that the four elements and five shades are devoid of a personal self. And he realizes that the activity of his mind has two aspects: pure and impure.” By their very nature, these two mental states are always present. They alternate as cause or effect depending on conditions, the pure mind delighting in good deeds, the impure mind thinking of evil. Those who aren’t affected by impurity are sages. They transcend suffering and experience the bliss of nirvana. All others, trapped by the impure mind and entangled by their own karma, are mortals. They drift through the three realms and suffer countless afflictions, and all because their impure mind obscures their real self.

    If you can simply concentrate your mind’s inner light and behold its outer illumination, you’ll dispel the three poisons and drive away the six thieves once and for all. And without effort you’ll gain possession of an infinite number of virtues, perfections, and doors to the truth. Seeing through the mundane and witnessing the sublime is less than an eye-blink away. Realization is now. Why worry about gray hair? But the true door is hidden and can’t be revealed. I have only touched upon beholding the mind.

    The Zen Teachings of Bodhidharma Translated by Red Pine

  • Caterpillars and Polliwogs

    Caterpillars weave cocoons, polliwogs form from cells; eventually the cocoons break open to produce moths, the cells develop to produce frogs.

    What I realize as I observe this is the Tao of liberative transformation of the spiritual embryo.

    Those who cultivate reality assemble the five forces, join the hundred spirits, merge with the ultimate; one energy coalesces, whole and pure, not consciously cognized. Now the spiritual embryo has form, like when the caterpillar weaves its cocoon or the polliwog forms its cell.

    Store the spirit and energy away in mystical darkness, and the bit of spiritual root will grow from faintness to clarity,
    from softness to strength. When the process is complete, suddenly you will break through space to reveal the pure spiritual body, leaping beyond the worlds. This is like when the caterpillar, having transformed into a moth. Breaks out of its cocoon and flies away, or like when the polliwog becomes a frog and leaps. There is a body beyond the body, another world.

    Therefore the aftermath of accomplishment of the Way is sometimes referred to as developing the power of flight, and sometimes called shedding the shell and becoming real. These expressions mean that you reproduce a real body inside your physical body. This real body is inherent in everyone, but people are fooled by the objects of their senses, deluded by illusory appearances, so they do not recognize the real body, even though it is right there.

    Anyone who can recognize the real body and earnestly cultivate it can produce substance where there was none, produce form where there was none, undergo liberative transformation and become an immortal with an indestructible body.

    Awakening to the Tao Liu I-Ming translated by Thomas Cleary p. 76-77