/etc/ssh/sshd_config should contain:
Protocol 2
PasswordAuthentication no
PermitRootLogin no
addgroup sshuser
and then add the relevant users to it:
adduser francois sshuser
Finally, add this to /etc/ssh/sshd_config:
AllowGroups sshuser
/var/log/auth.log) and
temporarily blocks IP addresses after a number of failed login attempts.
Another approach is to hide the ssh service using
Single-Packet Authentication. I
have fwknop installed on some of my
servers and use small
wrapper
scripts
to connect to them.
scp or rsync), it's a good idea to set their shell
(via chsh) to a restricted one like
rssh.
Should they attempt to log into the server, these users will be greeted with
the following error message:
This account is restricted by rssh.
Allowed commands: rsync
If you believe this is in error, please contact your system administrator.
Connection to server.example.com closed.
~/.ssh/authorized_keys file also allows (as the
man page
points out) a user to impose a number of restrictions.
Perhaps the most useful option is from which allows a user to restrict the
IP addresses which can login using a specific key.
Here's what one of my authorized_keys looks like:
from="192.0.2.2" ssh-rsa AAAAB3Nz...zvCn bot@example
You may also want to include the following options to each entry:
no-X11-forwarding, no-user-rc, no-pty, no-agent-forwarding and
no-port-forwarding.
/etc/ssh/sshd_config:
LogLevel VERBOSE
which will, amongst other things, log the fingerprints of keys used to login:
sshd: Connection from 192.0.2.2 port 39671
sshd: Found matching RSA key: de:ad:be:ef:ca:fe
sshd: Postponed publickey for francois from 192.0.2.2 port 39671 ssh2 [preauth]
sshd: Accepted publickey for francois from 192.0.2.2 port 39671 ssh2
Secondly, if you run logcheck
and would like to whitelist the "Accepted publickey" messages on your
server, you'll have to start by deleting the first line of
/etc/logcheck/ignore.d.server/sshd. Then you can add an entry for all of
the usernames and IP addresses that you expect to see.
Finally, it is also possible to
log all commands issued by a specific user over ssh
by enabling the pam_tty_audit module in /etc/pam.d/sshd:
session required pam_tty_audit.so enable=francois
However this module is not included in wheezy and has only recently been re-added to Debian.
/var/log/auth.log:
sshd: Connection from 198.51.100.10 port 39492
sshd: Authentication tried for francois with correct key but not from a permitted host (host=198.51.100.10, ip=198.51.100.10).
sshd: Failed publickey for francois from 198.51.100.10 port 39492 ssh2
sshd: Connection closed by 198.51.100.10 [preauth]
So I can get the IP address of the attacker (likely to be a random VPS or a
Tor exit node), but unfortunately, the key fingerprints don't appear for
failed connections like they do for successful ones. So I don't know which key
to revoke.
Is there any way to identify which key was used in a failed login attempt or
is the solution to only ever have a single public key in each
authorized_keys file and create a separate user account for each user?
A couple of days ago, AO3 reached
1 million fanworks in 14,353 fandoms.
The AO3 is an archive of fanfiction for multiple fandoms, founded and run by a non-profit organization,
Organization for Transformative Works with the aim of
"providing access to and preserving the history of fanworks and fan culture in its myriad forms."
The code behind AO3 is open source, their servers
run Debian and they even have a
Diversity Statement! How cool is that? :)
And, well, there's also the fact that...
"[...] the Archive is one of a very small number of open-source projects founded and largely staffed by women, another contribution fans have made to the internet as a whole. Many women who were not previously involved in technology have learned new skills in the name of fannish activities, and the AO3 is proud to stand as a shining example of this growth."So, congratulations AO3!
This is the 2nd point release of OpenStack Havana (this is the name of the current stable release of OpenStack). It was out on Thursday (US time), and I uploaded it on Friday (Chinese time). Unfortunately, I realized that the latest python-keystoneclient didn t support the token and endpoint command line options, effectively breaking Keystone itself, and all automated endpoint registration in all core packages. So after fixing Keystone and openstack-pkg-tools, I had to re-upload a 2nd Debian release.
However, after this glitch, the packages passed successfully our CI testing suite: my friends at eNovance and I run the tempest functional test suite each time there s this kind of major update, so that we can validate the packages are working as expected. And all went well after the new keystone command line options were fixed in the postinst scripts.
As a side note, I fail to see consistency on deprecating these interfaces. While we still have the old glance index thing in the Glance client (this is really old), keystoneclient just broke backward compatibility, when keystone is quite recent. So, it looks to me that it wasn t a great idea to just remove token and endpoint this way (though I can understand the need of consistency). Hopefully, this will all be fixed anyway, when we move to the unified python-openstackclient command lines instead of per-project clients.
I realized today that the pkg-openstack team now maintains more than 100 packages. This of course includes general purpose Python modules, which probably will move to the Python module team if it one day supports Git (life is too short: I do not wish to learn such a deprecated technology as SVN). Though this is still a lot of packages, and some more are coming: as per the OpenStack TODO list wiki page, Ironic (a replacement for nova-baremetal), TripleO (OpenStack on OpenStack), Tuskar (contols where things are deployed with TripleO) and Designate (DNS as a Service) are already packaged, and I am waiting for the Icehouse (this is the name of the next stable release) beta3 to be out to upload them to Experimental. This is scheduled for the 6th of March. I believe I am currently nearly up-to-date with the current global-requirements.txt (eg: python dependencies of OpenStack), pending a few Python module upgrades, so hopefully, packaging OpenStack Icehouse beta3 will smooth.
I love Free Software, and the people behind it. Even though I have been a free software user and developer for more than a decade now, there's still more to be amazed at, still more to contribute, and still more to learn. I love the Free Software community, because it never ceases to amaze me. It's not just about the technical side, but the social, human side of it, too!During the past year, I came to another milestone in my career: as of july first, I am a Free Software developer, and enjoying every moment of it. This is a feat that could not have been done without there being demand for what I do, without the free software community as a whole. For that, I owe you all a big thank you, you make it possible for me to make my dream come true. I can only hope that through my work, and through my example, I can contribute back enough.To this day, I take delight in contributing to free software, be it a Lisp on Python (or projects built in it), any of my own projects, syslog-ng, Google Summer of Code mentoring, Debian work - any and all of that are great fun. Even processing NEW is (I really should do that more often)! It's an endless source of not only entertainment and knowledge, but inspiration too.Whenever I read something as amazing as Russ Allbery's mail on the Debian technical committee impasse, I realize just how amazing people we have in our community, and how much we all can learn from them, and how much we owe them. This is yet another reason why I feel that contributing to Free Software is a passion many can share, because it teaches us good values too, atop of being technically excellent.I love Free Software, because without it, I would be lost. Thank you.
After so many attempts to have my shiny Movistar Peru (Internet M vil) 3G ZTE MF193 modem to work out-of-the-box in Debian jessie (unstable) with NetworkManager, the word frustration was hitting on my head. Even trying to do the right thing, led me to craziness. I gave up on fanzines and decided to take the old-school route. Release wvdial and friends!
Trying different combinations for wvdial.conf was no heaven for sure, but I ve found this wonderful guide from Christian Ams ss from Vienna, Austria! that really made a difference. Of course he s talking about the MF180 model but you get the idea. So I m sharing what was different for the MF193.
Basically, I ve done the eject and disable CD-ROM thing already, but still no progress. I ve also tried using wvdial to send AT commands to the evasive /dev/ttyUSBX device. Starting from scratch confirmed that I ve done such things properly indeed. I was amused by the fact that I could use screen to talk to the modem! (yo, all the time wasted trying to have minicom and friends play nice)
So, let s get to the point. After following this procedure, you should be able to use NetworkManager to connect to the Interwebs using the 3G data service from Movistar Peru.
/dev/ttyUSB4/dev/ttyUSB 0,1,2 and /dev/gsmmodem should be missing (not sure if this is a bug). Now /dev/ttyUSB2 is your guy./dev/ttyUSB2wvdial from CLI it should connect successfully.wvdial[Dialer Defaults] Modem = /dev/ttyUSB2 Username = movistar@datos Password = movistar APN = movistar.pe Phone = *99# Stupid Mode = 1 Init2 = AT+CGDCONT=4,"IP","movistar.pe"
The home lab is my LAVA development environment and I ve recently got two iMX53 Quick Start Boards working with a typical LAVA master image based on a Linaro build of Linux 3.1.0 for mx5 with a Ubuntu Oneiric Ocelot 11.10 rootfs:
3.1.0-1002-linaro-lt-mx5 (buildd@hubbard) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #13-Ubuntu PREEMPT Fri Dec 16 01:21:07 UTC 2011As part of my Debian work, it was clearly time to look at a current, Debian, kernel and rootfs and as I m developing and testing on Debian unstable, this would necessarily mean testing the Debian ARMMP (multi-platform) kernel which replaces the mx5 build used in Wheezy.
Linux version 3.12-1-armmp (debian-kernel@lists.debian.org) (gcc version 4.8.2 (Debian 4.8.2-10) ) #1 SMP Debian 3.12.9-1 (2014-02-01)I will be scripting the creation of a suitable image for these tests and there are other changes planned in LAVA to make it easier to build suitable images, but it is useful to document just how I worked out how to build the first image. Manual build steps First, I ve already discovered that the u-boot on the iMX53 doesn t like ext4, so the first step was to prepare an ext3 filesystem for the image. With a SATA drive attached, it was also much better to use that than the SD card, at least for generating the image. I m also doing this natively, so I am working inside the booted master image. This is fine as the master is designed to manipulate test images, so the only package I needed to install on the LAVA master image was debootstrap. I had an empty SATA drive to play with for these tests, so first prepare an ext3 filesystem:
# mkfs.ext3 /dev/sda1 # mkdir /mnt/sata # mount /dev/sda1 /mnt/sata # mkdir /mnt/sata/chroots/Start the debootstrap:
# apt-get update # apt-get install debootstrap # debootstrap --arch=armhf --include=linux-image-armmp \ --verbose unstable \ /mnt/sata/chroots/unstable-armhf http://ftp.uk.debian.org/debianVarious actions in this chroot will need proc, so mount it here:
# chroot /mnt/sata/chroots/unstable-armhf # mount proc -t proc /proc # mount devpts -t devpts /dev/pts # exitYou may also have to edit the apt sources the LAVA master image doesn t have editors installed, so either use echo or download an edited file. I m using:
deb http://ftp.uk.debian.org/debian sid mainflash-kernel needs changes For the initial tests, I ve got to get this image to boot directly from u-boot, so flash-kernel is going to be needed inside the chroot and to get the iMX53 to work with the ARMMP kernel and Device Tree, flash-kernel will need an update which will mean a patch:
# chroot /mnt/sata/chroots/unstable-armhf # apt-get update # apt-get install patch flash-kernel # cp /usr/share/flash-kernel/db/all.db /home # cd /home # patch -p2The patch itself goes through a couple of iterations. Initially, it is enough to use:
Machine: Freescale MX53 LOCO Board -Kernel-Flavors: mx5 +Kernel-Flavors: armmp +DTB-Id: imx53-qsb.dtb +DTB-Append: yesLater, once the device has booted with the ARMMP kernel, the Machine Id can be updated to distinguish it from the mx5 flavour (from /proc/cpuinfo) and use the model name from the Device Tree (/proc/device-tree/model):
diff --git a/db/all.db b/db/all.db index fab3407..41f6c78 100644 --- a/db/all.db +++ b/db/all.db @@ -62,6 +62,18 @@ U-Boot-Initrd-Address: 0x00800000 Required-Packages: u-boot-tools Bootloader-Sets-Incorrect-Root: yes +Machine: Freescale i.MX53 Quick Start Board +Kernel-Flavors: armmp +DTB-Id: imx53-qsb.dtb +DTB-Append-From: 3.12 +Boot-DTB-Path: /boot/dtb +U-Boot-Kernel-Address: 0x70008000 +U-Boot-Initrd-Address: 0x0 +Boot-Kernel-Path: /boot/uImage +Boot-Initrd-Path: /boot/uInitrd +Required-Packages: u-boot-tools +Bootloader-Sets-Incorrect-Root: no + Machine: Freescale MX53 LOCO Board Kernel-Flavors: mx5 U-Boot-Kernel-Address: 0x70008000(I will be filing this patch in a bug report against flash-kernel soon.) With that patched, update and run flash-kernel:
# mv all.db /usr/share/flash-kernel/db/all.db # flash-kernel flash-kernel: installing version 3.12-1-armmp Generating kernel u-boot image... done. Taking backup of uImage. Installing new uImage. Generating initramfs u-boot image... done. Taking backup of uInitrd. Installing new uInitrd. Installing new dtb. # exitLAVA overlays This will be a LAVA test image and it needs an overlay if you want a vanilla image, set up a passwd inside the chroot instead.
# cd /mnt/sata/chroots/unstable-armhf/ # wget --no-check-certificate https://launchpad.net/~linaro-maintainers/+archive/overlay/+files/linaro-overlay-minimal_1112.2_all.deb # wget --no-check-certificate https://launchpad.net/~linaro-maintainers/+archive/overlay/+files/linaro-overlay_1112.2_all.deb # chroot /mnt/sata/chroots/unstable-armhf/ # dpkg -i linaro-overlay-minimal_1112.2_all.deb linaro-overlay_1112.2_all.deb # rm linaro-overlay-minimal_1112.2_all.deb linaro-overlay_1112.2_all.deb # exitChanges to allow the chroot to boot Now the chroot needs setting up as a boot image:
# chroot /mnt/sata/chroots/unstable-armhf/ # echo T0:23:respawn:/sbin/getty -L ttymxc0 115200 vt102 >> ./etc/inittab # echo auto lo eth0 > ./etc/network/interfaces.d/mx53loco # echo iface lo inet loopback >> ./etc/network/interfaces.d/mx53loco # echo iface eth0 inet dhcp >> ./etc/network/interfaces.d/mx53loco # apt-get clean # umount /dev/pts # umount /proc # exitPartitioning as a LAVA test image This would be enough as a single partition test image but, currently, LAVA expects a much more hard-wired image. Depending on the history of the device and the need for LAVA to be able to put fresh kernel builds together with a known rootfs, LAVA has used a separate /boot and / partition in the test image for nearly all boards. Standard LAVA test images for many boards (like the iMX53) also have a small unallocated space at the start of the SD card, so until I can get LAVA upstream to handle test images of arbitrary design, I m adapting the image to suit the expectations inside LAVA. Yes, I know but it s better to get something working before spending time fixing things to make it work better. It will be fixed, in time. So I needed to separate out the /boot contents from the rest of the rootfs whilst keeping the chroot itself in a state which I can easily update and use to create other images.
# cd /mnt/sata/chroots/unstable-armhf/boot/ # tar -czf ../../boot.tar.gz ./* # cd .. # tar -czf ../root.tar.gz ./*Now the test image file and its partitions:
# dd if=/dev/zero of=/mnt/sata/images/empty/debian.img bs=1M count=1024 # cp /mnt/sata/images/empty/debian.img /mnt/sata/images/debian-unstable-armhf-armmp.img # losetup /dev/loop0 /mnt/sata/images/debian-unstable-armhf-armmp.img # parted /dev/loop0 -s unit mb mktable msdos # parted /dev/loop0 -s unit mb mkpart primary 1 10 # parted /dev/loop0 -s unit mb mkpart primary 11 110 # parted /dev/loop0 -s unit mb mkpart primary 111 1024I did make the mistake of using kpartx at this stage but there are many areas of confusion when translating the kpartx output to offsets for mount when parted is easier:
# parted /dev/loop0 unit B -s print Model: (file) Disk /dev/loop0: 1073741824B Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1048576B 10485759B 9437184B primary 2 10485760B 110100479B 99614720B primary 3 110100480B 1024458751B 914358272B primaryUse the Start numbers and use losetup to create the loop devices for each
# losetup -o 10485760 /dev/loop1 /dev/loop0 # losetup -o 110100480 /dev/loop2 /dev/loop0 # mkfs.vfat /dev/loop1 # mkfs.ext3 /dev/loop2Now clean up the loop mountpoints:
# losetup -d /dev/loop2 # losetup -d /dev/loop1 # losetup -d /dev/loop0 # losetup -alosetup -a should return nothing. If it doesn t, investigate the contents of
/dev/mapper and use dmsetup remove until losetup -a does report empty. Otherwise the subsequent stages will fail.
Now deploy the /boot contents into the empty image:
# mount -oloop,offset=10485760 /mnt/sata/images/debian-unstable-armhf-armmp.img /mnt/boot/ # pushd /mnt/boot/ # tar -xzf /mnt/sata/chroots/boot.tar.gz # popd # sync # umount /mnt/boot/and the / contents (removing the duplicate ./boot contents)
# mount -oloop,offset=110100480 /mnt/sata/images/debian-unstable-armhf-armmp.img /mnt/root/ # pushd /mnt/root # tar -xzf /mnt/sata/chroots/root.tar.gz # rm ./boot/* # popd # sync # umount /mnt/rootCheck the image
# mount -oloop,offset=10485760 debian-unstable-armhf-armmp.img /mnt/boot # ls /mnt/boot config-3.12-1-armmp initrd.img-3.12-1-armmp System.map-3.12-1-armmp uImage uInitrd vmlinuz-3.12-1-armmp # umount /mnt/boot # mount -oloop,offset=110100480 debian-unstable-armhf-armmp.img /mnt/root # ls /mnt/root bin boot dev etc home initrd.img lib lost+found media mnt opt proc root run sbin srv sys tmp usr var vmlinuz # ls /mnt/root/bin/auto-serial-console /mnt/root/bin/auto-serial-console # umount /mnt/root # md5sum debian-unstable-armhf-armmp.imgDownloads Yes, I have put that file online, if you are interested. Do read the readme first though. Getting the image off the device
# ip a # python -m SimpleHTTPServer 80 2>/dev/nullthen wget (just http://, IP address / and the filename), md5sum , finish with Ctrl-C. Depending on setup, it may be quicker to transfer the uncompressed
# cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 5 (v7l) Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x2 CPU part : 0xc08 CPU revision : 5 Hardware : Freescale i.MX53 (Device Tree Support) Revision : 0000 Serial : 0000000000000000
# uname -a Linux imx53-02 3.12-1-armmp #1 SMP Debian 3.12.9-1 (2014-02-01) armv7l GNU/Linux
# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux unstable (sid) Release: unstable Codename: sidNext! Yes, there is a lot to do from here on.
I have unsuccessfully tried to find a solution for the following problem on the
internet several times. Now that I have come at least closer to a usable
approach, I thought I'd document what I have found so that others trying to
achieve a similar thing can use this as a starting point.
Boost.Python offers a very nice and flexible way to interface C++ data types
with Python. With just a few lines of code, and the proper
linker flags, you get a Python importable shared object
from your C++ compiler. This can be very productive.
However, there is one aspect of C++ data types that I couldn't figure
out how to interface with Python, which are C++ discriminated unions, or more
specifically, heterogeneous containers. While Python has no problems
with containers containing objects of different types, C++ does not
make this very easy by default. Usually the problem is solved with
a container of pointers to a base class, and various subclasses with virtual
functions. However, this approach is not always practical, especially
if the different types of objects in an heterogeneous container
dont have many things in common. This is where discriminated unions come to
the rescue. They basically behave like a normal union in C, but have
an additional field which indicates the type of object
currently stored in the union. Boost.Variant does exactly that,
with a nice visitor interface added on top of it.
#include <boost/variant.hpp>
#include <vector>
struct a int x; ;
struct b std::string y; ;
typedef boost::variant<a, b> variant;
typedef std::vector<variant> vector;
variant make_variant() return variant();
vector make_vector() return vector a(), b(), a() ;
#include <boost/python/class.hpp>
#include <boost/python/def.hpp>
#include <boost/python/implicit.hpp>
#include <boost/python/init.hpp>
#include <boost/python/module.hpp>
#include <boost/python/object.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
bool operator==(a const &lhs, a const &rhs) return lhs.x == rhs.x;
bool operator==(b const &lhs, b const &rhs) return lhs.y == rhs.y;
struct variant_to_object : boost::static_visitor<PyObject *>
static result_type convert(variant const &v)
return apply_visitor(variant_to_object(), v);
template<typename T>
result_type operator()(T const &t) const
return boost::python::incref(boost::python::object(t).ptr());
;
BOOST_PYTHON_MODULE(bpv)
using namespace boost::python;
class_<a>("a", init<a>()).def(init<>()).def_readwrite("x", &a::x);
class_<b>("b", init<b>()).def(init<>()).def_readwrite("y", &b::y);
to_python_converter<variant, variant_to_object>();
implicitly_convertible<a, variant>();
implicitly_convertible<b, variant>();
def("make_variant", make_variant);
class_<vector>("vector").def(vector_indexing_suite<vector, true>());
def("make_vector", make_vector);
$ g++ -std=c++11 -fPIC -shared $(python-config --includes) -o bpv.so file.cpp -lboost_python
>>> import bpv
>>> variant=bpv.make_variant()
>>> variant
<bpv.a object at 0x7f06bb2130c0>
>>> variant.x
0
>>> variant.x=2
>>> variant.x
2
>>> vector=bpv.make_vector()
>>> vector
<bpv.vector object at 0x7f20693289d0>
>>> len(vector)
3
>>> list(vector)
[<bpv.a object at 0x7f20693190c0>, <bpv.b object at 0x7f20693193d0>, <bpv.a object at 0x7f2069319440>]
>>> vector[0].x
0
>>> vector[0].x=2
>>> vector[0].x
0
>>> e0=vector[0]
>>> type(e0)
<class 'bpv.a'>
>>> e0.x = 2
>>> vector[0] = e0
>>> vector[0].x
2
>>> len(vector)
3
>>> vector.extend(vector)
>>> vector.append(bpv.a())
>>> len(vector)
7
>>> len(filter(lambda x: type(x)==bpv.b, vector))
2
>>> len(filter(lambda x: type(x)==bpv.a, vector))
5
>>> map(lambda x: x.x, filter(lambda x: type(x)==bpv.a, vector))
[2, 0, 2, 0, 0]
I'm working in a very small web agency with 4 employees, one of them part time and our boss who doesn't do programming. It shouldn't come as a surprise, that our development infrastructure is not perfect. We have many ideas and dreams how we could improve it, but not the time.
Somewhere back in August or September, I pre-ordered a CuBox-i A nicely finished, completely hackable, and reasonably powerful ARM system, nicely packaged and meant to be used to hack on. A sweet deal!
There are four models (you can see the different models' specs here) I went for the top one, and bought a CuBox-i4Pro. That means, I have a US$130 nice little box, with 4 ARM7 cores, 2GB RAM, WiFi, and... well, all of its basic goodies and features. For some more details, look at the CuBox-i block diagram.
I got it delivered by early January, and (with no real ARM experience on my side) I finally got to a point where I can, I believe, contribute something to its adoption/usage: How to get a basic Debian system installed and running in it.
The ARM world is quite different to the x86 one: Compatibility is much harder, the computing platform does not self-describe properly, and a kernel must first understand how a specific subarchitecture is before being able to boot on it. Somewhere in the CuBox forums (or was it the IRC channel?) I learnt that the upstream Linux kernel does not yet boot on the i.MX6 chip (although support is rumored to be merged for the 3.14 release), so I am using both a kernel and an uBoot bootloader not built for (or by) Debian people. Besides that, the result I will describe is a kosher Debian install. Yes, I know that my orthodox friends and family will say that 99% kosher is taref... But remember I'm never ever that dogmatic. (yeah, right!)
Note that there is a prebuilt image you can run if you are so inclined: In the CuBox-i forums and wiki, you will find links to a pre-installed Debian image you can use... But I cannot advise to do so. First, it is IMO quite bloated (you need a 4GB card for a very basic Debian install? Seriously?) Second, it has a whole desktop environment (LXDE, if I recall correctly) and a whole set of packages I will probably not use in this little box. Third, there is a preinstalled user, and that's a no-no (user: debian, password: debian). But, most importantly, fourth: It is a nightly build of the Testing (Jessie) suite... Built back in December. So no, as a Debian Developer, it's not something we should recommend our users to run!
So, in the end and after quite a bit of frustration due to my lack of knowledge, here goes the list of steps I followed:
# dd if=SPL-U-Boot.img of=/dev/mmcblk0 bs=1024 seek=1.# dd if=busybox.img of=/dev/mmcblk0debootstrap --foreign --arch=armhf wheezy /media/mmcblk0p2 http://http.debian.net/debian
U-Boot SPL 2013.10-rc4-gd05c5c7-dirty (Jan 12 2014 - 02:18:28) Boot Device: SD1 reading u-boot.img Load image from RAW... U-Boot 2013.10-rc4-gd05c5c7-dirty (Jan 12 2014 - 02:18:28) CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: POR Board: MX6-CuBox-i DRAM: 2 GiB MMC: FSL_SDHC: 0 In: serial Out: vga Err: vga Net: phydev = 0x0 Phy not found PHY reset timed out FEC (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found Hit any key to stop autoboot: 3
# mount /dev/mmcblk0p2 /mnt# chroot /mnt# debootstrap --second-stage
# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully # echo cubox-i.gwolf.org > /etc/hostname
# echo 'T0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100' >> /etc/inittab
# exit # umount /mnt # mount / -o remount,ro
CuBox-i U-Boot > setenv root /dev/mmcblk0p2 rootfstype=ext3 ro rootwait CuBox-i U-Boot > boot
** File not found /boot/busyEnv.txt ** 4703740 bytes read in 390 ms (11.5 MiB/s) ## Booting kernel from Legacy Image at 10000000 ... Image Name: Linux-3.0.35-8 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4703676 Bytes = 4.5 MiB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... OK Loading Kernel Image ... OK Starting kernel ... Unable to get enet.0 clock pwm-backlight pwm-backlight.0: unable to request PWM for backlight pwm-backlight pwm-backlight.1: unable to request PWM for backlight _regulator_get: get() with no identifier mxc_sdc_fb mxc_sdc_fb.2: NO mxc display driver found! INIT: version 2.88 booting [info] Using makefile-style concurrent boot in runlevel S. [....] Starting the hotplug events dispatcher: udevd. ok [....] Synthesizing the initial hotplug events...done. [....] Waiting for /dev to be fully populated...done. [....] Activating swap...done. [....] Cleaning up temporary files... /tmp. ok [....] Activating lvm and md swap...done. [....] Checking file systems...fsck from util-linux 2.20.1 done. [....] Mounting local filesystems...done. [....] Activating swapfile swap...done. [....] Cleaning up temporary files.... ok [....] Setting kernel variables ...done. [....] Configuring network interfaces...done. [....] Cleaning up temporary files.... ok [....] Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix. ok INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd. ok [....] Starting periodic command scheduler: cron. ok Debian GNU/Linux 7 cubox-i.gwolf.org ttymxc0 cubox-i login:
root@cubox-i:~# apt-get clean root@cubox-i:~# df -h Filesystem Size Used Avail Use% Mounted on rootfs 1008M 347M 611M 37% / /dev/root 1008M 347M 611M 37% / devtmpfs 881M 0 881M 0% /dev tmpfs 177M 132K 177M 1% /run tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 353M 0 353M 0% /run/shm
Today was our first expedition to the local Playgroup at the Bulimba
Senior Citizen's Centre, an easy 5 minute bike ride from our place.
I told Zoe we were going to Playgroup when Sarah dropped her around this
morning, and she got very excited and jumped up and down. When Sarah asked
her if she knew what Playgroup was, she said "no!" while continuing to jump
up and down excitedly. We all laughed.
I must have put this on my calendar when I was in Sydney last week, because
I had it down for 8:30am, and we rocked up and there wasn't anyone there. A
lady arrived to set up for a music class, and she said that the Playgroup
didn't usually start until much later, so I figured I'd had a timezone fail
and we went for a little bike ride around Bulimba while we waited.
The lady who was running the Playgroup arrived at about 9:15am, and so we
helped with the set up. Basically lots of toys, a couple of slides and some
basic craft stuff. Heaps of the little IKEA round plastic stools.
Parents (almost exclusively mothers) started trickling in from 9:30am. I've
got a total name overload. We need name tags. Most of the girls seemed to be
about 2 and a half, and a lot of the mothers had very young second children.
Apparently a mother's group had joined en masse because they all had second
children who were crawling, and so meeting in a park wasn't practical any
more.
Structurally, the first hour or so was just a free for all, and the last
half an hour was some songs, a story and some playing under and on a
parachute.
All in all it was a good morning's activity, and at $20 for the term, nice
and cheap. Apparently you're supposed to join Playgroup Queensland as
well, for $40, but that takes care of liability insurance and whatnot. If
only their website used SSL.
Zoe mostly just wanted to play with me. We did a lot of role playing with
some dolls, and she checked out the various toys. She loved that
there was a stage, and took it upon herself to give an impromptu dance
performance for a bit. We also did a little craft activity. She seemed more
interested in helping flap the parachute than going under it, but enjoyed
having a ride on it when the time came.
I've just finished reading How
Not to F*** Them Up by Oliver James. It was quite an interesting
read, although not particularly applicable for my situation, as it more
dealt with the first three years. It was interesting observing a whole bunch
of different mothering techniques in action, both in dealing with their
toddler children, and how they responded to their second infants.
After Playgroup, we biked over to the local toy shop around the
corner from home, and grabbed some birthday presents for the birthday party
on Saturday and came home for lunch. Chicken quesadillas and some mango (I
hadn't realised how much I've missed Queensland mangoes until we moved back,
and I'm glad Zoe loves them as well).
I got her down for a nap earlier today, and after she woke up, I asked Zoe
if she wanted to write on the birthday cards we'd bought for the twins'
birthday presents. She said she didn't know how to write her name (which
isn't true) and wanted to paint them instead, so we compromised and used
some sponge letters to stamp "Z O E" on the cards in paint.
Zoe said that Eva's favourite colour was purple and Layla's was pink (or it
may have been the other way around), so we stamped one with purple paint and
mixed red and white to make something that looked more orange than pink and
stamped the other one.
Then Zoe wanted to glue the two paper plates together that we'd been using
to hold the paint, so we did that, and then she wanted to "hand paint" a
cardboard tube, which seemed to involve me directly squirting various
colours into her hands and then her "painting" the tube with what was in her
hands. The tube quickly ended up a brown/grey colour. All in all, it was a
fabulous mess, and fortunately no walls or doors copped any paint on the way to
the bathroom to clean up.
After that, we cleaned up Zoe's room a bit, which resulted in her going off
and playing with her Magna Doodle with Smudge for a bit, and then we played
Doctor with her doctor set and then we did some baking.
It was a good afternoon, and she only asked to watch TV once, when she first
woke up from her nap, and we managed to successfully divert to other much
more fun stuff.
I don't know how Debian planet deals with MathJax (it seems to
become illegible), but I will try to post this, anyway.
"To demonstrate the usefulness of this type of analysis, we turned our attention to criminal activity. In the Bitcoin economy, criminal activity can appear in a number of forms, such as dealing drugs on Silk Road or simply stealing someone else s bitcoins. We followed the flow of bitcoins out of Silk Road (in particular, from one notorious address) and from a number of highly publicized thefts to see whether we could track the bitcoins to known services. Although some of the thieves attempted to use sophisticated mixing techniques (or possibly mix services) to obscure the flow of bitcoins, for the most part tracking the bitcoins was quite straightforward, and we ultimately saw large quantities of bitcoins flow to a variety of exchanges directly from the point of theft (or the withdrawal from Silk Road). As acknowledged above, following stolen bitcoins to the point at which they are deposited into an exchange does not in itself identify the thief; however, it does enable further de-anonymization in the case in which certain agencies can determine (through, for example, subpoena power) the real-world owner of the account into which the stolen bitcoins were deposited. Because such exchanges seem to serve as chokepoints into and out of the Bitcoin economy (i.e., there are few alternative ways to cash out), we conclude that using Bitcoin for money laundering or other illicit purposes does not (at least at present) seem to be particularly attractive."These researches are not the first to analyse the Bitcoin transaction log. The 2011 paper "An Analysis of Anonymity in the Bitcoin System" by Fergal Reid and Martin Harrigan is summarized like this:
"Anonymity in Bitcoin, a peer-to-peer electronic currency system, is a complicated issue. Within the system, users are identified by public-keys only. An attacker wishing to de-anonymize its users will attempt to construct the one-to-many mapping between users and public-keys and associate information external to the system with the users. Bitcoin tries to prevent this attack by storing the mapping of a user to his or her public-keys on that user's node only and by allowing each user to generate as many public-keys as required. In this chapter we consider the topological structure of two networks derived from Bitcoin's public transaction history. We show that the two networks have a non-trivial topological structure, provide complementary views of the Bitcoin system and have implications for anonymity. We combine these structures with external information and techniques such as context discovery and flow analysis to investigate an alleged theft of Bitcoins, which, at the time of the theft, had a market value of approximately half a million U.S. dollars."I hope these references can help kill the urban myth that Bitcoin is anonymous. It isn't really a good fit for illegal activites. Use cash if you need to stay anonymous, at least until regular DNA sampling of notes and coins become the norm. :) As usual, if you use Bitcoin and want to show your support of my activities, please send Bitcoin donations to my address 15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.
Friday was my last day
at Solarflare
Communications, which I joined in 2006 (originally as Level 5
Networks).
When I started, Level 5 Networks (L5N) had a 2-port gigabit Ethernet
controller called EF1 and a user-level network stack called
EtherFabric which ran on Linux. It had nearly completed the Falcon
project to develop a 10-gigabit controller (also supporing a 2-port
gigabit mode) and was porting EtherFabric to Windows. Later that
year, however, L5N merged with Solarflare Communications (SF), which
was developing a 10GBASE-T PHY (for 10-gigabit Ethernet over
twisted-pair cables). The investors and management saw the
opportunity to create an integrated 10GBASE-T LAN-on-motherboard
chip that would be attractive to OEMs and so had the potential for
mass sales. EtherFabric was put on the back-burner, but regular net
drivers for Linux, Windows and other operating systems became more
important.
In a change from my previous jobs, my initial role at L5N was to
maintain and extend the in-house test automation software, Runbench,
written in Python. I worked with Dickon Reed who had written most
of Runbench up to then. One of my first major tasks was to extend
it to cover DUTs running Windows. Aside from changing Runbench
itself, I wrote a simple SSH server to be installed on DUTs, using
the
Twisted.Python framework.
(Cygwin's port of OpenSSH wasn't suitable for running a lot of
native Windows commands.) I rewrote the test-installation script
for the Windows driver itself, converting it to Python (with a C
extension to get around
the WOW64
nonsense). As Windows does not allow loading a driver just once
(like insmod in Linux), except by using the kernel
debugger, I added a time check in the driver so the
test-installation script can make it fail early when reloaded after
a reboot, so that a crasher bug in the probe path would usually be
recoverable.
In 2007 I persuaded management in Cambridge to loan several older
servers to DebConf. I
took them there and back by car, and they were used to convert video
for live streams
and recordings.
(This was repeated in 2009.)
I was also asked to work on other small development tasks, including
some cleanup on the Linux net driver (sfc). In mid-2007, when SF
decided it was time to get sfc upstream (in-tree), I joined Steve
Hodgson and Robert Stonehouse in working on that.
Out-of-tree (separately distributed) drivers for Linux normally need
a large number of preprocessor conditions for compatibility with
Linux's kernel
module API across a range of supported versions. They may also
implement some features with a driver-specific interface that should
be replaced with a standard interface (possibly including the work
to define that standard). They may not comply with the kernel
coding style or unwritten conventions for kernel code. All of these
problems were present and had to be dealt with. As part of this
work, I extended unifdef
so that it could be used to remove all of the backward-compatibility
and not-for-upstream code without introducing extra blank lines. I
could then export the out-of-tree driver from CVS(!) into a kernel
source tree automatically and turn it into a patch or patch series
that would stand a chance of being acceptable upstream.
Our
first
few
attempts
got
little
response,
but eventually we newbies got the message that the driver was simply
too
big for a single submission and that putting patches on a web
site because they're too big for the list was not a solution. In
the next week, I removed about half of the code (on a git branch),
resulting in a relatively lean driver that could be sent to the
netdev list. And finally the 9th (I think) submission
was accepted.
Following this, I continued to work on sfc but was also brought into
the Siena project. Siena (SFL9021) was the LAN-on-motherboard chip
that had been planned following the merger. It combined a dual-port
controller based on Falcon with a 10GBASE-T PHY and a management
controller (MC) to support Lights-Out Management (LOM). (Since
10GBASE-T has not taken off, it is now mostly sold as the SFC9020
variant in which the PHY is disabled.) I worked on some of the test
framework and test cases for validating the controller design in
software simulation and FPGA. In the course of this I learned to
read and (somewhat) understand the chip design written in Verilog,
but only made a single trivial fix to it.
In August 2009, the first Siena ASICs came back from the fab. There
were a few ASIC-specific bugs but all of them were quickly worked
around in firmware, so it would soon be ready for production. But
there was much work still to be done on the driver and firmware.
The firmware had until then been running in a smaller block of RAM
with no peripherals to manage, while sfc had earlier been modified
just enough to configure a sim or FPGA for running a userland test
application. sfc now had many special cases scattered around it,
and would tell the MC firmware to peek and poke registers that were
no longer directly accessible from the host.
The software and firmware developers had agreed that, in order to
support LOM, the MC would be responsible for managing the ports and
all peripherals and drivers would send higher-level requests to the
MC. As a bonus, this removed the need for the driver to know the
details of each new board, so that it would not be necessary to
backport sfc into distribution kernels very often. Over the next
few months, the firmware team did an excellent job of defining and
implementing those operations, including writing the driver-side
functions to invoke them. Meanwhile, Steve and I concentrated on
refactoring sfc so most of the Falcon/Siena differences could be
abstracted through a few structures with function pointers.
The refactoring and new code for Siena were completed and submitted
upstream in several large patch series in October and November. In
fact, there were so many patches that Solarflare appeared in LWN's
table of who wrote Linux
2.6.33 (as did I, thanks also to another patch series adding
firmware metadata to many drivers). Sadly we had missed Linux
2.6.32 which was a longterm stable branch and used in many
distributions, but I was able to get this version backported into
all the major distributions over the next year.
(To be continued.)
Next.