Clint Adams: The rise of TH
We are about to lose hledger on armel,
armhf, mips, mipsel, powerpc, s390, and s390x.
If this affects you, we need working
Template Haskell and
GHCi support on your architecture.
We are about to lose hledger on armel,
armhf, mips, mipsel, powerpc, s390, and s390x.
If this affects you, we need working
Template Haskell and
GHCi support on your architecture.
thanks to my vacations starting I had a bit more time this week for working
on RC bugs. here's the usual list; again: thanks to all the restless
patch providers!
ZFS v28 (finally, with deduplication) is available in latest D-I daily builds when selecting kernel of FreeBSD 9 as boot option.
Testers wanted!!
This is both a release announcement for the next installment of The
MirBSD Korn Shell, mksh R40b,
and a follow-up to Sune s
article about small tools of various degrees of usefulness.
I hope I don t need to say too much about the first part; mksh(1)
is packaged in a gazillion of operating environments (dear Planet
readers, that of course includes Debian, which occasionally
gets a development snapshot; I ll wait uploading R40c until that two
month fixed gcc bug will finally find its way into the
packages for armel and armhf. Ah, we re getting Arch Linux (after
years) to include mksh now. (Probably because they couldn t stand
the teasing that Arch Hurd included it one day after having
been told about its existence, wondering why it built without needing
patches on Hurd ) MSYS is a supposedly supported target now, people
are working on WinAPI and DJGPP in their spare time, and Cygwin and
Debian packagers have deprecated pdksh in favour of mksh (thanks!).
So, everything looking well on that front.
I ve started a
collection of shell snippets some time ago, where most of those
small things of mine ends up. Even stuff I write at work we re an
Open Source company and can generally publish under (currently) AGPLv3
or (if extending existing code) that code s licence. I chose git as
SCM in that FusionForge instance so that people would hopefully use it
and contribute to it without fear, as it s hosted on my current money
source s servers. (Can just clone it.) Feel free to register and ask
for membership, to extend it (only if your shell-fu is up to the task,
KNOPPIX-style scripts would be a bad style(9) example as the primary
goal of the project is to give good examples to people who learn shell
coding by looking at other peoples code).
Maybe you like my editor, too? At
OpenRheinRuhr, the Atari people sure liked it as it uses WordStar
like key combinations, standardised across a lot of platforms and
vendors (DR DOS Editor, Turbo Pascal, Borland C++ for Windows, )
ObPromise: a posting to raise the level of ferrophility
on the Planet aggregators this wlog reaches (got pix)
I'm in the middle of setting up new build machines for the armhf
port (see the
wiki for more details). We'll shortly have six machines set up in
the machine room here at ARM in Cambridge:
All of these machines are Freescale i.MX53 Quickstart (aka "loco")
development boards. They include a 1GHz i.MX53 CPU (based around the
ARM Cortex A8, one of the ARMv7-A family). They have 1GB of RAM and
native SATA. They're lovely little machines, measuring just 3 inches
square. To mount them usefully in a machine room, I've mounted each
board with a 320GB notebook hard drive and the necessary cabling onto
a small perspex card as you can see here. Then we can fit 6 such
machines and a normal PC-style ATX PSU into a 3U mini-rack. Well,
it almost fits - the power supply pokes out a little so we'll
need 4U of space when we come to mount it.
The Quickstart boards have been sponsored
by Linaro, and ditto my time
setting up these machines. Thanks!
As is common with new development boards, these machines are
not quite fully supported in Debian yet. The kernels we're
using are locally-built, using the sources supplied by Freescale. For
now, that means a heavily-patched "2.6.35" kernel but we're expecting
to be able to switch to mainline very soon. The .config I'm using
is kernel.config,
and I've built it natively on harris using
fakeroot make -j2 deb-pkg DEBEMAIL=93sam@debian.org DEBFULLNAME="Steve McIntyre" KDEB_PKGVERSION=1buildd1
Similarly to the setup for
the armel
machines, for now I've tweaked things when installing the
kernel:
/etc/kernel/postinst.d/depmod to do this.
/etc/kernel/postinst.d/initramfs-tools into
place from my amd64 machine; I'm guessing this would be there
automatically on a new-enough version of initramfs-tools on
the armel machines, but we're still using Lenny as a base
system for now even if I'm using a Squeeze-based kernel.
/etc/kernel/postinst.d/zz-flash-kernel) to
create uImage and uInitrd files from the kernel zImage and the
initramfs.
MX53-LOCO U-Boot > setenv loadaddr 0x70800000
MX53-LOCO U-Boot > setenv initrdaddr 0x71000000
MX53-LOCO U-Boot > setenv bootargs_sata set bootargs \$\ bootargs\ root=/dev/sda2 rw rootwait
MX53-LOCO U-Boot > setenv load_sata_kernel ext2load sata 0:1 \$\ loadaddr\ /uImage
MX53-LOCO U-Boot > setenv load_sata_initrd ext2load sata 0:1 \$\ initrdaddr\ /uInitrd
MX53-LOCO U-Boot > setenv load_sata run load_sata_kernel load_sata_initrd
MX53-LOCO U-Boot > setenv bootcmd_sata sata init\; run bootargs_base bootargs_sata load_sata\; bootm \$\ loadaddr\ \$\ initrdaddr\
MX53-LOCO U-Boot > setenv bootcmd run bootcmd_sata
And I've added extra config into uboot to use the pre-installed
Ubuntu system on the micro SD card as a fall-back:
MX53-LOCO U-Boot > setenv bootcmd_rescue sata init\; run bootargs_base bootargs_sata\; mmc read 0 \$\ loadaddr\ 0x800 0x1800\; bootm
Every year I worry that DebConf might not be as good as I hope, or
not as good as previous years. Well, I've yet to be let down!
The road trip
down to Banja Luka was good fun, even if it took a little longer than
planned. We ended up travelling down through Germany on the same
Friday as much of the country finished work/school for their summer
vacation, so there was a lot of traffic. Meh, we got
there in the end.
I made my usual mistake of planning some things to hack on during
the DebConf week; by now I should know better... :-) I made a start on
one small project, but then got so distracted by so many talks and
side meetings with people that it's still waiting. As always, my own
personal TODO list picked up huge amounts of extra stuff from those
discussions. Catching up with, and socialising with, Debian friends
from all over the world was also fun as always!
Lots of highlights of the week for me, both for technical and
social reasons:
Yesterday I begun using Debian GNU/kFreeBSD squeeze in thorin, my main workstation.
During the last few weeks I had to work through some of the limitations that were holding me back, such automated driver load and FUSE. I was lucky enough that other people filled the missing pieces I wanted, such as NFS client support and a GRUB bugfix that broke booting from Mirrored pools.
I have to say that I m very satisfied. Barring a pair of small nuissances here and there, the result is quite impressive:
Debian GNU/kFreeBSD was first released with Squeeze in last february. The technology preview label indicated, among other things, that it had a number of limitations when compared with what users would expect: missing features, incomplete functionality, etc.
But it has seen many noteworthy improvements since then. Here are some that I would like to mention:
Steve Langasek has been contributing to Debian for more than a decade. He was a release manager for sarge and etch, and like many former release managers, he s still involved in the Debian release team although as a release wizard (i.e. more of an advisory role than a day-to-day contributor). Oh, and he did the same with Ubuntu: on the picture on the left, he just announced the release of Ubuntu 10.04 from his Debian-branded laptop. 3 comments Liked this article? Click here. My blog is Flattr-enabled.
Linux 2.6.38 and 2.6.39
As you've probably seen, the testing suite finally got a new
upstream kernel version (Linux 2.6.38) and is currently synchronised
with unstable. I'm just about to upload a new version of linux-2.6
based on upstream stable update 2.6.38.4.
Linux 2.6.39 is well on its way to release, so 2.6.39-rc4 should
soon be in experimental. The Debian source package will add support
for the new armhf (ARM with hardware floating-point) architecture.
Splitting linux-2.6
The linux-base package, introduced to handle transitions and other
support functions for 'image' packages, is now built from a separate
source package. It won't be changed very often, so you will no
longer need to upgrade linux-base every time you upgrade an 'image'
package. (This doesn't apply within 'squeeze', but I may have a
way to work around that.)
The firmware-linux-free package, containing a few firmware and
configuration blobs from Linux that are DFSG-compliant, is also now
built from a separate source package. These blobs have not changed
for a very long time, so again you will no longer be recommended to
upgrade this package every time you upgrade an 'image' package.
Secondly, this allows us to remove the entire 'firmware' directory
from the upstream source rather than carefully removing and patching
to leave just the DFSG-compliant bits.
Wireless regulations
The '2.4 GHz' and '5 GHz' ISM bands used for wifi are not defined
identically around the world. The exact frequency ranges and
maximum permitted power levels vary between countries. Radio
equipment manufacturers have a legal responsibility to ensure their
equipment operates within these regulations. Since it is expensive
to implement such regulations in hardware (including many different
variants for different regions), these restrictions are usually
implemented in the driver using a country code retrieved from the
hardware's EEPROM or flash. So this is now our responsibility.
We need to be able to look up regulations by country codes, and we
also need to support the case where a device sold in one country is
used in another country with tighter regulations. For some time,
the wifi configuration library (cfg80211) included regulatory
information for a small number of countries and regions. However,
the default since Linux 2.6.34 has been to build-in only the 'world'
domain (intersection of all the restrictions) and to request
information from user-space. In Debian, we didn't have anything to
provide this information, so for example channels 12-13 became
unavailable for users in Europe.
The regulatory information should be provided by the Central
Regulatory Domain Agent (CRDA) from a current database. These are
now packaged as crda and wireless-regdb
respectively. Drivers that do not use cfg80211 (mostly those from
the 'staging' area) will not be affected, and may or may not
implement correct regulations.
When you travel to another country or use an imported wifi device
with an incorrect country code (I hear 'CN' is common), you can
use iw reg set to ensure that your wifi devices operate
within the regulations of the country you are in. Set
the REGDOMAIN variable in
/etc/default/crda to make this persistent. These will
be intersected with the regulations specified by the
hardware.
I found some time ago this site which aims at proving that Linux desktops are currently over 1%. So, I registered my and my wife's Debian GNU/Linux desktops to contribute to the statistic.
Hrmh... I am listening to a local news radio station. Of course, what I am about to write lacks information and insight but it follows a conversation I have had with several groups of friends.
Our de-facto president has decreed that the tuition for private schools will be deducted from the Impuesto sobre la renta (revenue/profit tax) up to a given tuition level (IIRC up to MX$2000 a month per child per school). The interviewed subsecretary said they expect this deduction will reach MX$13,000 million, around US$1,000 million. This is, about a third of what is assigned to the National University (UNAM).
At a first sight, this sounds good. However, I just thought about a discussion I have had with many friends. This money the government will hand back to the taxpayers has to be cut from somewhere (after all, we are not in a country with huge superavit or anything like that).
Why does this sound unfair ot me? Because it benefits the few in perjudice of the many. I did a quick search, and found this work based on numbers published by INEGI ten years ago: According to the last table, the money spent on private education was between 5% and 10% of that spent on public education Of course, it is almost impossible to infer the number of students from this alone. I know I could find authoritative data on this regard by searching a bit more, but after all I don't want to spend all (work!) evening on a blog post unless it creates some discussion. Lets say, just for the sake of the exercise, that this means that ~3% of the country's students learn in a private school.
In Mexico, the quality of the basic public education (primary/secondary, ages 6 to 18) has fallen hugely in the last decades. Even when I was to school (but not when my parents), the first subjective sign that a family had broken the low-income barrier is that they were finally able to send their children to private schools. Because, no matter how bad they are, public schools are perceived to be worse. Of course, I was among the "lucky" ones to be in a private school. Higher education (universitary level) is still way better ranged.
Anyway... I want to get this post over with. Why do I oppose this subsidies/tax devolution? Because it will lead to widen the difference between private and public education. And because it will be benefical only for medium-high and high classes People who are formaly employed (as I am) do not present a tax declaration, so we won't get any deductions. Between and of the country's economically active population work informally (from selling in the street to covering up huge transactions in large locals). Most of the population don't (directly) pay "impuesto sobre la renta", and will not get the benefit of this subsidy.
This money has to be taken from other sources in order to be given to private education. If the government wants to improve the education for everybody, why not assign it to the public sector? To specific areas in the public sector, if they don't want to hand it over to the (yes, very, incredibly) corrupt SNTE (National Union of Education Workers)?
It was completely non-obvious; In some cases I had to figure it out by reading kFreeBSD source code; I write it down here so it s not forgotten ;-)
This is a short guide on how to boot Debian GNU/kFreeBSD via network on a diskless machine, using GRUB as the bootloader.
set timeout=1
set default=0 menuentry Debian GNU/kFreeBSD
echo Loading kFreeBSD
kfreebsd /beastie/boot/kfreebsd-8.1-1-amd64.gz
echo Booting
boot
192.168.1.3:/srv/netboot/beastie / nfs rw 0 0This, however, will only work if mount_nfs(8) is in your system. And (well, too bad) it hasn t been packaged yet. So you can copy it from a FreeBSD base tarball, along with its dependencies (/lib/libc.so.7, /libexec and /etc/netconfig).
option option-130 code 130 = text;
option option-130 nolockd ;
When AMD launched its now widely used 64-bit architecture in year 2000, it started marketing it as a significant step forward because of it having longer word and pointer size. One just has to check the advertising material and notice those big 64 being touted as the main improvement.
But it is commonly accepted that most applications don t need a 64-bit address space for anything. Building them in LP64 model is just a waste of memory due to increase of pointer size. Even though this made most applications lag behind, the new architecture still was an improvement in terms of speed because of the AMD revised ISA, featuring changes like:
Sometimes it s nice being wrong. Contrary to what I predicted, ZFS will be supported in Debian Squeeze using the official installer.
This means that Debian Squeeze will be one of the first GNU distributions to support ZFS.
In fact, even though ZFS support didn t make it to Debian-Installer beta1 by the time it was released, it is now available in the netboot images (this happens because netboot images fetch newer installer components from the internet).
As a consequence of this my unofficial installer can now be considered obsolete.
So why did I say something that turned out to be grossly inaccurate? It s not due to anyone s fault really. At that time, the version of Parted that included ZFS detection hadn t migrated to Squeeze. The unblock policy didn t appear to allow this migration. However, the Release Team kindly decided to make an exception that allowed this, and after Parted had migrated the changes in Debian-Installer itself went in quite smoothly.
Heya Sergio
Your blog doesn t allow comments :-( so I reply here. First off, thanks for being one of the first Debian developers in trying out my modified installer with ZFS support, you guys made my day!
Some quick notes on the bugs you found:
The missing //@ prefix bug is #600578, fixed in upstream, in sid and in squeeze. Thanks :-)
The boot partition stays in /target/boot in final install bug is not in BTS. It was present in a preliminar version of partman-zfs which was never uploaded. The version currently in the archive correctly uses altroot option to fix this.
The /lib/modules is needed for boot problem was reported as #600568, but I haven t been able to persuade the kFreeBSD maintainers that this is necessary. It s not critical anyway.
Glad you finally got a working setup.
For the Freaky Wall I have installed a Debian GNU/kFreeBSD system
using the installer with ZFS support announced on:
http://robertmh.wordpress.com/2010/09/06/debian-installer-with-zfs/
I used the mini.iso found on:
http://people.debian.org/~rmh/zfs/kfreebsd-amd64/monolithic/mini.iso
the 12th of October of 2010; as I had some problems and reported them to
Robert is possible that the current image solves part of them.
Installation plan
I did a standard installation on a machine with two hard disks, but only used
the first one from the installer.
The plan was to use ZFS with RAID-1, but current versions of grub do not
support booting from a ZFS + RAID file system, so I had to use the same
technique used for Linux for a long time; three partitions: a swap partition,
a small /boot partition and a big partition for /; / and /boot were
formated to use ZFS.
First reboot
After the installation the system failed to boot because of a bug when
building the /boot/grub/grub.cfg (some routes were missing a //@ prefix);
to be able to boot Iwe edited the config on the grub prompt and later fixed
the file:
--- grub.cfg.orig 2010-10-13 16:40:39.000000000 +0200
+++ grub.cfg 2010-10-13 18:38:47.535436766 +0200
@@ -64,7 +64,7 @@
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a371979bb836d1fe
echo 'Loading kernel of FreeBSD 8.1-1-amd64 ...'
- kfreebsd /kfreebsd-8.1-1-amd64.gz
+ kfreebsd //@/kfreebsd-8.1-1-amd64.gz
insmod part_msdos
insmod zfs
set root='(hd0,3)'
@@ -75,7 +75,7 @@
insmod zfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a371979bb836d1fe
- kfreebsd_module /zfs/zpool.cache type=/boot/zfs/zpool.cache
+ kfreebsd_module //@/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:dkfbf1-ad4s3
set kFreeBSD.vfs.root.mountfrom.options=rw
I haven't tested the installer since that day, but I believe that the current
ZFS installer was fixed by Robert to deal with that problem.
Once the system was booted I had to fix a couple of things:
dpkg-reconfigure kbdcontrol
/boot partition was mounted on /target/boot, as that was what was
recorded on the ZFS file system; to fix it I executed the following commands:
# zfs set mountpoint=/ dkfbf1-ad4s3
# zfs set mountpoint=/boot dkfbf1-ad4s1
Where dkfbf1-ad4s3 is the root file system and dkfbf1-ad4s1 is the
original /boot.
I reported that to Robert also and I believe it is fixed on the ZFS
installer now.parted; the final result was:
# parted -l
Model: ST3250620NS/3BKS (ide)
Disk /dev/ad6: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary
2 256MB 4256MB 4000MB primary
3 4256MB 250GB 246GB primary
Model: ST3250620NS/3BKS (ide)
Disk /dev/ad4: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary
2 256MB 4256MB 4000MB primary linux-swap(v1)
3 4256MB 250GB 246GB primary
To use the second partition of both disks as swap I added the following to
/etc/fstab:
/dev/ad4s2 none swap sw 0 0
/dev/ad6s2 none swap sw 0 0
To configure the mirroring for the root file system I did the following:
zpool attach dkfbf1-ad4s3 ad4s3 ad6s3
As the /boot can't work as a replica I adjusted it to make two copies of
every file:
zfs set copies=2 dkfbf1-ad4s1
Leaving the second disk copy alone, although my plan is to configure it to
hold a copy of the /boot partition synchronized with rsync each night.
After all those changes the system didn't boot, as the grub-pc generates a
buggy /boot/grub/grub.cfg; the problem is on the /etc/grub.d/10_kfreebsd
section:
### BEGIN /etc/grub.d/10_kfreebsd ###
menuentry 'Debian GNU/kFreeBSD, with kFreeBSD 8.1-1-amd64' --class debian \
--class gnu-kfreebsd --class gnu --class os
insmod part_msdos
insmod zfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a371979bb836d1fe
echo 'Loading kernel of FreeBSD 8.1-1-amd64 ...'
kfreebsd /kfreebsd-8.1-1-amd64.gz
set kFreeBSD.vfs.root.mountfrom=unknown:/dev/ad4s3
set kFreeBSD.vfs.root.mountfrom.options=rw
### END /etc/grub.d/10_kfreebsd ###
To fix it there has to be a copy of the modules for ZFS on the boot partition
(in my case I moved the /lib/modules directory to /boot and created a
link on the root partition to the new directory):
cd /boot
mkdir lib
mv /lib/modules lib
cd /lib
ln -s ../boot/lib/modules
And instead of fixing the /etc/grub.d/10_kfreebsd code I wrote a new
script (/etc/grub.d/09_zfs_kfreebsd) that creates the right config for my
current configuration on the grub.cfg file:
#!/bin/sh
prefix=/usr
exec_prefix=$ prefix
bindir=$ exec_prefix /bin
libdir=$ exec_prefix /lib
. $ libdir /grub/grub-mkconfig_lib
prepare_boot_cache="$(prepare_grub_to_access_device $ GRUB_DEVICE_BOOT sed -e "s/^/\t/")"
kfreebsd_versions="$(ls /lib/modules/)"
zfs_root_device="$(zfs list awk '/\/$/ print $1 ' head -1)"
for kversion in $kfreebsd_versions; do
cat << EOF
# Entry when using ZFS (we have issues with /etc/grub.d/10_kfreebsd)
menuentry 'Debian GNU/kFreeBSD, with kFreeBSD $kversion and ZFS' --class debian --class gnu-kfreebsd --class gnu --class os
$ prepare_boot_cache
echo 'Loading kernel of FreeBSD $kversion ...'
kfreebsd //@/kfreebsd-$kversion.gz
kfreebsd_module_elf //@/lib/modules/$kversion/opensolaris.ko
kfreebsd_module_elf //@/lib/modules/$kversion/zfs.ko
kfreebsd_module //@/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:$zfs_root_device
set kFreeBSD.vfs.root.mountfrom.options=rw
EOF
done
I solved the problem this way to have a working solution that does not break
with squeeze upgrades, assuming that a future grub-pc package will deal well
with my config and I'll be able to remove this script, but I guess I'll have
to install it from backports.
The entry generated by the script when called from update-grub will be
similar to:
### BEGIN /etc/grub.d/09_zfs-kfreebsd ###
# Entry when using ZFS (we have issues with /etc/grub.d/10_kfreebsd)
menuentry 'Debian GNU/kFreeBSD, with kFreeBSD 8.1-1-amd64 @ ITI' --class debian --class gnu-kfreebsd --class gnu --class os
insmod part_msdos
insmod zfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a371979bb836d1fe
echo 'Loading kernel of FreeBSD 8.1-1-amd64 ...'
kfreebsd //@/kfreebsd-8.1-1-amd64.gz
kfreebsd_module_elf //@/lib/modules/8.1-1-amd64/opensolaris.ko
kfreebsd_module_elf //@/lib/modules/8.1-1-amd64/zfs.ko
kfreebsd_module //@/zfs/zpool.cache type=/boot/zfs/zpool.cache
set kFreeBSD.vfs.root.mountfrom=zfs:dkfbf1-ad4s3
set kFreeBSD.vfs.root.mountfrom.options=rw
### END /etc/grub.d/10_iti-kfreebsd ###
And after rebooting the machine with this new configuration the system boots
OK.
On my next post I'll continue explaining how to compile a kernel that supports
the use of the OpenBSD Packet Filter and related technologies (CARP, pflog,
etc.).
Next.