Category Archives: Uncategorized

Fedora 22 virt-builder image

Fedora 22 has been released. And there is a virt-builder cloud image available:

$ virt-builder fedora-22
$ virt-install --import --name test-f22 \
    --ram 2048 --disk path=fedora-22.img,format=raw \
    --os-variant fedora21

3 Comments

Filed under Uncategorized

Fedora 21 chrooted on an aarch64 Nexus 9

fedora

A while back I bought a Nexus 9, mainly because it has a weird processor that emulates a 64 bit ARM (aarch64). Google seem to have abandoned this platform entirely, just 6 months after I got it, so fuck you too Google. Anyway here’s how I installed a Fedora 21 aarch64 chroot on the device, using virt-builder and virt-tar-out and a bunch of unnecessary hassle.

First I ran virt-builder, which takes under a minute to produce a Fedora 21 aarch64 disk image. I then used virt-tar-out to convert all the files in that disk image into a tar file:

$ virt-builder --arch aarch64 fedora-21
$ virt-tar-out -a fedora-21.img / chroot.tar

Copy this file over to the N9, and unpack it. I have rooted my N9, so I can do this as root to preserve all the permissions etc:

# mkdir root
# cd root
# tar -xf /sdcard/Download/chroot.tar
# cd ..

And how can there not be a tar utility in Android?? I had to build a static ‘tar’ for aarch64 using my existing aarch64 server, to run the above command. And and and how can there be no chroot utility either!? I ended up compiling that myself too yada yada.

After all that you can do:

# mount -o bind /dev root/dev
# mount -o bind /proc root/proc
# mount -o bind /sys root/sys
# PATH=/usr/bin:/bin LD_PRELOAD= chroot root /bin/bash

which gives me at least a Fedora 21 shell on Android.

Edit: A few further notes:

  1. When setting up a non-root user account inside the chroot, give it the same UID, GID and groups as the ordinary non-privileged Android user account. In particular it must be in the inet group, else network access is blocked.
  2. You may need to set up /etc/resolv.conf by hand in the chroot.

Leave a comment

Filed under Uncategorized

New home gateway router (part 3) — network configuration

This is just some notes and links about how I set up the firewall and PPPoE on RHEL 7.

For firewalld, a very useful reference is: http://www.certdepot.net/rhel7-get-started-firewalld/ To enable IPv4 masquerading, see this mailing list posting.

For PPPoE, as always the ArchLinux wiki pages are the best.

2 Comments

Filed under Uncategorized

New home gateway router (part 2) — the Gigabyte Brix

As explained in the previous post I’m building a new home gateway router, and for this I chose the Gigabyte Brix GB-BXBT-2807, the lowest end product in Gigabyte’s Brix range.

brix

It was a bit of a saga to get it working. The main problem was the RAM that I bought was faulty, but I didn’t know that at the time since all you get is a blank display. The Brix uses strange low voltage SO-DIMMs and it’s unlikely you’d have any lying around — I certainly did not. Guessing that it could be the RAM, I ordered more which took another two days, and that worked.

Suggestion for Gigabyte: solder a minimal amount of RAM on the motherboard (eg. 256 MB) so that the Brix at least boots to the EFI shell with no SO-DIMM inserted.

Disassembling and reassembling the Brix is fiddly, but I got there in the end.

Without an operating system installed, it boots into the EFI shell. Booting with a RHEL USB key boots straight into the RHEL installer.

The dual core 64 bit Celeron is pretty nice given that the whole system cost me £137.

lstopo looks like this:

brix-lstopo

and /proc/cpuinfo like this:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 55
model name	: Intel(R) Celeron(R) CPU  N2807  @ 1.58GHz
stepping	: 8
microcode	: 0x811
cpu MHz		: 981.246
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips	: 3166.40
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 55
model name	: Intel(R) Celeron(R) CPU  N2807  @ 1.58GHz
stepping	: 8
microcode	: 0x811
cpu MHz		: 1831.644
cache size	: 1024 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips	: 3166.40
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

Leave a comment

Filed under Uncategorized

New home gateway router (part 1)

router_blur

For about 12 months I’ve been using the ASUS RT-N16 + OpenWRT as my gateway. But you know what? It sucks — I hate that it’s not a real Linux distro, that it’s difficult to upgrade, that it randomly reboots itself, that it only kinda manages IPv6, that it uses a half-assed packaging system, that I can’t run regular tools, and that it’s insecure.

And since I switched over to VDSL @ 80 Mbps which uses PPPoE (ie. no need for DSL terminated at the gateway), it’s time to switch to running a real distro on a real computer.

The first step is to choose a small form-factor PC, crucially with two ethernet ports. Unfortunately Intel still don’t sell NUCs with two ethernet ports. Also Intel NUCs are really expensive. So I’ve settled for a much cheaper alternative:

Total cost (including tax and delivery): £137.87

Note that I already have a spare 2.5″ SSD, but you would need to add the cost of a SATA HDD/SSD if you don’t have one already.

It’ll be interesting to see how fast the USB 3.0 ethernet adapter is in real life, because it’s the obvious weak spot. However I only need the router to be able to forward at 80 Mbps, and even a Celeron and a weak ethernet adapter surely should be able to handle that.

5 Comments

Filed under Uncategorized

Raise the Itanic! (part 2)

Previously …

I finally got my HP Integrity RX2620 (dual core Itanium II) working, after a lot of messing around in the EFI shell. It is now running Debian-ia64 Wheezy. The thing is so noisy that you can’t stay in the room with it for very long, and I discovered that if you pull out the fans then it overheats and shuts down after a few minutes.

Here is lstopo output:

itanic-lstopo

and /proc/cpuinfo:

processor  : 0
vendor     : GenuineIntel
arch       : IA-64
family     : 31
model      : 2
model name : Madison up to 9M cache
revision   : 2
archrev    : 0
features   : branchlong
cpu number : 0
cpu regs   : 4
cpu MHz    : 1600.035
itc MHz    : 1600.035576
BogoMIPS   : 2390.01
siblings   : 1
physical id: 0

processor  : 1
vendor     : GenuineIntel
arch       : IA-64
family     : 31
model      : 2
model name : Madison up to 9M cache
revision   : 2
archrev    : 0
features   : branchlong
cpu number : 0
cpu regs   : 4
cpu MHz    : 1600.035
itc MHz    : 1600.035576
BogoMIPS   : 2390.01
siblings   : 1
physical id: 1

Also: Nooooooooooooooooooo!!!!11!!1

2 Comments

Filed under Uncategorized

libguestfs works on MIPS Creator (mipsel)

[Previous post about the MIPS Creator CI20]

Slowly, of course.

I had to compile supermin & qemu from upstream and download (but not install) a qemu-compatible Debian kernel. Then setting the following environment variables allows make quickcheck to pass:

$ cat localenv
export SUPERMIN=/home/rjones/d/supermin-mipsel/src/supermin
export LIBGUESTFS_HV=/home/rjones/d/qemu-mipsel/mipsel-softmmu/qemu-system-mipsel
export SUPERMIN_KERNEL=/home/rjones/d/libguestfs-mipsel/kernel/boot/vmlinux-3.16.0-0.bpo.4-4kc-malta
export SUPERMIN_KERNEL_VERSION=3.16.0-0.bpo.4-4kc-malta
export SUPERMIN_MODULES=/home/rjones/d/libguestfs-mipsel/kernel/lib/modules/3.16.0-0.bpo.4-4kc-malta/

Leave a comment

Filed under Uncategorized