hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20100205] Hackathon, February 19-22 2010
Aleksej Saushev writes on a bunch of lists:
We're running 13th Hackathon February 19-22 2010,
come and join us on IRC channel #netbsd-code at FreeNode (irc.freenode.net).
You may choose other ways to participate, if you find it more convenient.
See Hackathon page for updates: http://wiki.netbsd.se/Hackathon13


Goal

Fix as many bugs as possible, close as many PRs as possible.


Details

In previous years we have accumulated a lot of problem reports.
Some of them relate to no longer supported branches (e.g. 2.0)
and were occasionally fixed during regular code work.
Some of them relate to hardware developers don't have access to.
Some of them may be too easy to fix, but noone looks at that part
of code (e.g. documentation).
Some of them relate to packages already removed or heavily reworked.
Some of them relate to packages in exotic environment (Solaris, Interix)
and developers cannot test if the bug is present or not.

You can find more in PR database at http://netbsd.org/support/query-pr.html


More specifically, David Holland maintains categorized lists of PRs at

  http://www.netbsd.org/~dholland/buglists/

of which "Wanted for 5.1" 

(http://www.netbsd.org/~dholland/buglists/51-WANTED.html)
and "Stuck" (http://www.netbsd.org/~dholland/buglists/STUCK.html)
are of particular interest.

Another hot area is pkgsrc 
(http://www.netbsd.org/~dholland/buglists/pkgsrc.html).


IMPORTANT NOTE: You don't have to be programmer to be able to help us,
you can help us with generic testing support.  

Come, bring your favourite booze, and join in!

[Tags: ] [Slashdot It!]

[20100202] Turn your ALIX into KITT (Updated)
Drop the following script into /etc/rc.d/alixkitt, put "alixkitt=yes" into /etc/rc.conf and enjoy:
#!/bin/sh
# Turn ALIX2c front LEDs into running LED
# http://www.gifninja.com/Workspace/59f3f22e-5f40-4937-936c-1dc0d6fbe690/output.gif
#
# Copyright (c) 2010 Hubert Feyrer <hubertf@NetBSD.org>

# PROVIDE: alixkitt

$_rc_subr_loaded . /etc/rc.subr

name="alixkitt"
start_cmd="alixkitt_start"
stop_cmd="alixkitt_stop"
pidfile="/var/run/${name}.pid"

alixkitt_sleeptime=1.0          # 0.5

alixkitt_setled()
{
        gpioctl -q -d /dev/gpio 6 $1
        gpioctl -q -d /dev/gpio 25 $2
        gpioctl -q -d /dev/gpio 27 $3

        sleep $alixkitt_sleeptime
}

alixkitt_start()
{
	touch $pidfile
        (
                alixkitt_setled 0 0 0

                while [ -f $pidfile ] ; do
                        alixkitt_setled 0 1 1
                        alixkitt_setled 1 0 1
                        alixkitt_setled 1 1 0
                        alixkitt_setled 1 0 1
                done
        ) &;
        echo $! >$pidfile
        echo Started pid $!
}

alixkitt_stop()
{
        if [ -f /var/run/alixkitt.pid ]; then
                read pid <$pidfile
                echo Stopped pid $pid
                kill $pid
                rm $pidfile
                alixkitt_setled 1 1 1
        fi
        exit 0
}

load_rc_config $name
run_rc_command "$1"
P.S.: There's still a bug left in that stopping immediately re-starts the process. Got a patch? Update: Axel Scheepers suggested doing the while-loop only as long as the PID-file exists. Changed above.

[Tags: , , ] [Slashdot It!]

[20100131] Toggling Alix2c LEDs
I've found that the three LEDs at the front of a PC Engines Alix2C board can be toggled on and off via their attachment to the GPIO bus. Here are the commands for this:

left: gpioctl -d /dev/gpio 6 2
middle: gpioctl -d /dev/gpio 25 2
right: gpioctl -d /dev/gpio 27 2


[Tags: , ] [Slashdot It!]

[20100131] Unfilling my inbox: NetBSD news from the past few weeks - ACPI, NUMA, Xen, and more
Herre are some more things that I've caught in my inbox for too long, and I'm finally finding some time to sum them up here:
  • NetBSD's "let's move kernel parts to the userland" RUMP project is still under heavy development, and in order to make testing of compatibility after kernel changes easier, a new command "rumptest" was added to build.sh: ``Basically you say:
    	    ./build.sh ${yourargs} tools ; ./build.sh ${yourargs} rumptest
    	
    Where yourargs are what have you, e.g. '-U -u -o -O /objs'.

    The latter builds only the rump kernel libs and uses some ld+awk magic to figure out if things go right or not. This is to avoid having to install headers and build libs (which is too slow since a full build is too slow). The magic is not a substitute for a full build, but it is n+1 times faster and works probably 99.9% of the time.

    The scheme uses a number of predefined component sets (e.g. tmpfs+vfs+rumpkern) to test linkage. They are currently listed in build.sh. This area probably needs some work in the future. It would be nice to autogenerate the combinations somehow.

    If things go well, you get something like this:

            ===> Rump build&link tests successful
            ===> build.sh ended:   Wed Nov 18 20:10:59 EET 2009 
    '' See Antti's Antti's mail to tech-kern: on how to tell if things didn't go so well, and what to do in that case.

  • According to Wikipedia, ``Non-Uniform Memory Access or Non-Uniform Memory Architecture (NUMA) is a computer memory design used in multiprocessors, where the memory access time depends on the memory location relative to a processor. Under NUMA, a processor can access its own local memory faster than non-local memory, that is, memory local to another processor or memory shared between processors.''

    Supporting NUMA in a contemporary (i.e.: Intel centric) SMP-enabled operating system requires following a bunch of standards, two of which are parsing of two tables, the System Resource Affinity Table (SRAT) and the System Locality Information Table (SLIT). Both tables are accessible via the Advanced Configuration and Power Interface (ACPI), and according to the German-language Wikipedia, the SRAT is used to assign local memory to local threads to boost their performance, and the SLIT defines the "distance" of the nodes among themselves, which is used to determine the "nearest" memory if local memory is not enough.

    Now, Christop Egger has posted patches to add an ACPI SLIT parser and an ACPI SRAT parser. See the two postings for dmesg pr0n from his tests on an 8-node system.

  • Staying with ACPI and Christoph Egger, he found that even though the ACPI spec defines an ACPI device for fans, BIOS vendors and OEMs do their own thing. To accommodate things like the fan sensor found in the ACPI Thermal Zone in his HP Pavillion DV9700 laptop he has proposed a driver to extend the acpitz(4) driver with fan information. That way, envstat(8) can be used to display the ran's RPMs:
    [acpitz0]
      Processor Thermal Zone:     56.000   95.000                       degC
                         fan:       2840                                 RPM 

  • Staying with driver games, iMil writes me that there's documentation on getting DRI, AIGLX, Composite and Compiz going with NetBSD 5.0 available in the O(ther)NetBSD Wiki now.

    The documentation covers how to enable the Direct Rendering Manager (DRI), setting up and configuring Modular X.org, assuring that everything's in place, and how to get Compitz going. Mmm, wobbly windows at last! :-)

  • While we're talking funky desktop stuff: Marc Balmer has submitted a patch to get touchpanel support for ums(4). ums(4) is for USB mice, and in contrast to mice, touch panels need to deal with absolute numbers, not relative numbers.

  • Back to the guts of the kernel, another patch suggested by Christop Egger was for adding x2apic. What is x2apic? X2APIC is ``an Intel-only feature but can also be found in virtual environments with support for CPU apic id's > 0xff.

    I.e. Xen 4.0 (not yet released) supports 128 CPUs in HVM guests with the CPUs enumerated with even apic id's. That means you need x2apic for the 128th CPU :) ''

  • While speaking of Xen: Xen 4.0 is coming soon, and there's a call to help testing it on NetBSD!

    Install Mercurial, check out latest Xen sources, apply a bunch of patches, build and install. Examples of commands are given, in addition to changes required for /boot.cfg etc.

    Report your findings to port-xen!

  • Last one for today: Michal Gladecki, Editor-in-Chief of BSD Magazine writes: ``We are happy to announce that BSD Magazine is transforming into a free monthly online publication. The online version of BSD Magazine will stay in the same quality and form. It will look like the BSD magazine one is familiar and comfortable with. Please sign up to our newsletter at www.bsdmag.org and get every issue straight to your inbox. Also, you can now download any of the previous issues from our website. The first online issue -- 2/2010 -- is coming out in February. Please spread the word about BSD Magazine. '' Click!

So much for today. I still have a bunch of news items in my inbox for next time, but let's call it good for today.

Unrelated, I've been playing with git a bit over the past few days, and wile I have a number of questions building up (which will be subject to tech-repository or so), what I can say today is that the speed of "git pull" with NetBSD's git repository and my 1MBit DSL line reminds me a lot of the times when I used SUP with my 56k modem - it took forever, too. :-(

[Tags: , , , , , , , , , , , , , , ] [Slashdot It!]

[20100119] A colorful collection of NetBSD news from the past few weeks
AKA "I've been slacking again, and there's a whole pile of stuff here now that I'm putthing into one blog posting". Here we go:
  • Initial support for the FriendlyArm Mini2440 board has been announced by Paul Fleischer. In a later update, most of the hardware is reported working, and the patch is available for review & comments. Furthermore, the touch screen is usable, and Qt/Embedded was built on top of wscons.

  • Force10 Networks Receives Common Criteria Security Certification for Its High-Performance Ethernet Switch/Router Products. According to the article, ``Common Criteria evaluations entail formal rigorous analysis and testing to examine security aspects of a product or system. Extensive testing activities involve a comprehensive and formally repeatable process, confirming that the security product functions as claimed by the manufacturer. Security weaknesses and potential vulnerabilities are specifically examined during wide-ranging evaluation and testing.

    FTOS is the operating system software that runs on Force10 switch/router product lines, including the E-Series, C-Series and S-Series platforms. Based on NetBSD, FTOS leverages a distributed, multiprocessor architecture that delivers highly scalable protocols and reliability. By delivering the same OS across its entire switch/router line, Force10 ensures that customers benefit from stable code, a consistent configuration environment and simpler software management. ''

  • While there: Force10 Networks Delivers Ethernet-Optimized Platform for MPLS Core Networks: ``Force10 Networks, Inc. [...] announced the immediate availability of MPLS (multi-protocol label switching) functionality for its ExaScale E-Series core switch/routers. [...] The ExaScale platform combines high-density, non-blocking, line-rate 10 GbE switching and routing with robust MPLS LSR support at 1/5th of the cost of a traditional core router, enabling carriers to fully capitalize on the economic advantages of Ethernet.''

  • Create Bootable Live Linux USB Drives with UNetbootin: ``UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. You can either let it download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list.''

    And of course we all know that NetBSD is Linux, right? See the list of supported distributions:

    The homepage mentions that NetBSD 4.0 is supported, maybe someone wants to give them an update on what's up with NetBSD 5.0? Would be nice to see that on the list!

  • Ever wondered what happened with the BSD Certification recently? There's a video from the talk BSD Certification Group: A Case Study in Open Source Certification available that talks about the goal of the project, the two exams (BSD Associate, BSD Professional), and what's going on behind the scenes.

  • With the move from XFree to X.org, the X server for the DNARD Shark's NetBSD/shark lost support for accelerated X. Thanks to Michael 'macallan' Lorenz, hardware-accelerated X for NetBSD/shark is back now: ``I finally got around to start working on an Xorg driver for the IGS CyberPro 20x0 family found in rev. 5 Sharks, Netwinder etc. - currently the driver is built only on shark and supports only the VL variant found there. Adding support for PCI chips is trivial though, just needs extra probing. The driver supports autoconfiguration ( X -configure should yield something almost usable, only DefaultDepth needs to be adjusted).''

  • Staying with cool platforms, here's a quick procedure to run NetBSD/sun2 5.0.1 on The Machine Emulator (TME) (see pkgsrc/emulators/tme), compiled by Izumi Tsutsui. Who's first do get a pkgsrc bulk build done? :-)

  • Jed Davis has committed the RAIDframe parity Summer-of-Code project. See his posting for the details. The project ``drastically reduces the time RAIDframe spends rewriting parity after an unclean shutdown by keeping better track of outstanding writes (thus, "parity map"). The tech-kern archives have more details [...]

    This feature is enabled by default on all sets (other than RAID 0). It can be administratively disabled with the new "raidctl -M" flag, which is described in the changes to the raidctl(8) man page; however, the I/O overhead for updating the parity map is expected to be unnoticeable in practice.''

So much for now. There is more in the pipe, but that will have to wait for now. Good night!

[Tags: , , , , , , , , , , , , , , , , , , ] [Slashdot It!]

[20100117] NetBSD and ISO 8859-2
Flying by one one of our mailing lists, I found this gem: ``This short article aims to help people that want to use ISO8859-2 character encoding in NetBSD/i386's wscons(4) console. It is very brief, so if you understand Slovak language, I recommend you to read NetBSD Slovak & Czech HOWTO instead. ''

The article describes how to teach wscons to use a ISO 8859-2 font, and also how to adjust the wscons keymap to either a czech or slovak keyboard mapping.

I think that gives support for ISO 8859-1, -2 and -15, so now where are your patches for the rest?

[Tags: , ] [Slashdot It!]

[20100113] Hardware crypto with Geode LX based ALIX board
I'm using an Alix 2d13 machine as home router for quite some time now - uptime was 158 days today. The board has a 500MHz AMD Geode LX800 CPU, which can do AES crypto in hardware. Today, I've found time to play with the glxsb(4) driver, and get some numbers:

The 'numbers' are in 1000s of bytes per second processed.
crypto   type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sw       aes-128-cbc       3583.29k     3931.51k     4037.32k     8113.75k     8205.61k
hw       aes-128-cbc       1200.70k     4470.18k    11729.65k    17328.05k    34006.33k
The command "openssl speed -evp aes-128-cbc -elapsed" was ran each time, in the first case with glxsb(4) disabled (boot -c, disable glxsb), in the second case with the driver enabled.

Still, I find those numbers interesting in comparison to those of a Soekris 5501, esp. as the machines have the same CPU & clock rate.

I couldn't find a way to switch use of hardware crypto off in software, anyone got a hint? openssl(1)'s "-engine cryptodev" seems to always use hardware crypto when it's there, and leaving out that switch uses the same engine, so no difference. I've found a few sysctls under kern.*, but apparently none seems relevant to my goal (not to speak of the lack of documentation...)

[Tags: , , , ] [Slashdot It!]

[20100112] sysupdate - an addition for etcupdate(8) (Update #2)
I wanted to update a few machines with latest netbsd-5 and -current today, and found that there's a certain lack of tools to aid in the process: we have etcupdate(8) and postinstall(8), but nothing to help extract the userland sets (let alone do the same thing for the kernel, esp. now that modules must be put into place, too).

To save me from re-typing the same commands, I've hacked a script "sysupdate" that's intended to run with a new kernel booted, and which will then 1) extract all the sets where mtree files are in /etc/mtree, and 2) run etcupdate for etc (and xetc, if in /etc/mtree).

Here's an example run:

    % sh ~/tmp/sysupdate -s /usr/cvs/src-current/obj.i386/releasedir/i386/binary/sets -n
    ---------------------------------------------------------------------------
    Updating your userland now!
    ---------------------------------------------------------------------------

    New userland: NetBSD 5.99.23 (GENERIC) #0: Sun Jan 3 02:13:00 CET 2010
    Current kernel: NetBSD vmnetbsd6 5.99.23 NetBSD 5.99.23 (GENERIC) #0: Sun Jan 3 02:13:00 CET 2010 feyrer%mini.local@localhost:/usr/cvs/src-current/obj.i386/sys/arch/i386/compile/GENERIC i386

    Really update? (y/N) y
    Updating sets...
    Extracting base.tgz
    tar -plzx -C / -f base.tgz
    Extracting comp.tgz
    tar -plzx -C / -f comp.tgz
    Extracting games.tgz
    tar -plzx -C / -f games.tgz
    Extracting man.tgz
    tar -plzx -C / -f man.tgz
    Extracting misc.tgz
    tar -plzx -C / -f misc.tgz
    Extracting modules.tgz
    tar -plzx -C / -f modules.tgz
    Extracting tests.tgz
    tar -plzx -C / -f tests.tgz
    Extracting text.tgz
    tar -plzx -C / -f text.tgz
    Extracting xbase.tgz
    tar -plzx -C / -f xbase.tgz
    Extracting xcomp.tgz
    tar -plzx -C / -f xcomp.tgz
    Extracting xfont.tgz
    tar -plzx -C / -f xfont.tgz
    Extracting xserver.tgz
    tar -plzx -C / -f xserver.tgz
    Updating etc files...
    etcupdate -s /usr/cvs/src-current/obj.i386/releasedir/i386/binary/sets/etc.tgz -s /usr/cvs/src-current/obj.i386/releasedir/i386/binary/sets/xetc.tgz
    Done.
    % 
The script is available in the current-users@ mailing list archive.

Update: Chavdar Ivanov tells me that there's a package pkgsrc/sysutils/etcmanage that comes with a script INSTALL-NetBSD which does the same as mine (plus more). Seems that's not established enough that it's the communicated way for updating (yet?). Given that the script uses perl, maybe that's some time off. :-P

Another option that uses toosl that come with NetBSD out of the box (ksh!) is available here - thanks to Dalibor Gudzic for the hint and the script!

Update #2: Asmodehn sent me mail that he also has made a script for performing system updates. How about someone collect all these into one, and import something into NetBSD that at least provides minimal functionality?

[Tags: , , ] [Slashdot It!]

[20091228] Mounting fixed and removable disks with KDE
If you're among the people running KDE, and if you want to be able to have KDE handle removable and fixed disks properly during the HAL subsystem, there's a suggestion by David Brownlee to achieve this.

To get removable devices automatically mounted and a file browser pop up, add the following to /usr/pkg/etc/PolicyKit/PolicyKit.conf:

        <match action="org.freedesktop.hal.storage.mount-removable">
                <return result="yes" />
        </match>
David writes that ``[w]ith the above plugging in a USB flash drive into my amd64 laptop pops up a notification window, clicking on it opens dolphin, and clicking on the device in dolphin correctly mounted it.''

A similar thing can be achieved for fixed disks, by adding the following data:

        <match action="org.freedesktop.hal.storage.mount-fixed">
                <return result="yes" />
        </match> 
There are still discussions if/what part of this should be enabled by default, but I think it's nevertheless useful to document this here. Enjoy!

[Tags: , , ] [Slashdot It!]

[20091210] Catching up on source changes
I've dug through my source-changes archive once more, and there are entries from February(?!?) to mid-October 2009 in there that I think may be of interest to casual followers of NetBSD.

Before I go into the details, let me add a hint on the "source-changes-full" mailing list, which is like source-changes, but the mails there also contain diffs of the changes (as long as they are below 1MB in size). The -full list is not archived on mail-index.netbsd.org, and I must have missed the announcement. It's definitely useful!

So, what interesting changes have there been to NetBSD-current recently? Here we go:

  • New / updated drivers:
    • sdtemp(4) reads the on-DIMM temperature sensors following the JEDEC Standard No. 21-C Section 4-7.
    • gpio(4) got support for Intel ICH southbridges as found on Intel SS4220-E (ICH7) and Acorp 6A815EPD (ICH2) motherboards
    • lom(4) supports the LOMlite "Lights Out Management" boards found on Sun hardware like the LOMlite found on the Sun Netra t1 and the LOMlite2 found on Sun Netra T1/X1 and Sun Fire V100/V120.
    • An initial version of a SD/MMC driver for the Winbond W83L518D (and probably W83L519D) Integrated Media Reader with PNP bus attachment glue was added.
    • acpiwmi(4) was added to added, to further support ACPI development. See the specs for more details.
    • piixide(4) now supports Intel 3400 SATA
  • New kernel interfaces and library functions include:
    • getdate(3) and getdate_err(3) were added according to POSIX.1 and the Open Group
    • RAIDframe was sped up massively when checking parity after a system crash with the help of a parity map. This work was done during this year's Google Summer-of-Code.
    • A "netbsd.inet.icmp.bmcastecho" sysctl was added to disable replies to the broadcast address.
    • Floating point functions f{min,max,dim}{,l,f}(3) were added
    • udl(4) adds support for DisplayLink DL-1x0/1x5 based USB LCDs and USB-VGA adaptors
  • Random other additions and changes include:
    • hdaudioctl(8) can be used to manipulate hdaudio(4) devices
    • The NetBSD/playstation2 port was removed due to a lack of developer support. It's still available in CVS.
    • The NetBSD/i386 bootloader now knows a "dev" command to list available boot devices and their size.
  • Newly imported and updated 3rd party software includes:
    • pfsync from OpenBSD 4.2, adopted in this year's Google Summer of Code.
    • PF from OpenBSD 4.2 was imported.
    • Multicast DNS ("Bonjour") support was added, based on Apple's mDNSResponder. Enable with "dns: mdns" in /etc/nsswitch.conf.
    • GNU binutils were updated to version 2.19
    • Many of the bazillion of X.org components were updated - ways too many to note in detail.
    • BIND was updated to 9.7.0b1
    • Flex 2.5.35 was imported
    • A new m4(1) was imported


[Tags: , , , , , , , , , , ] [Slashdot It!]

[20091209] Logical Volume Management (LVM)
Adam Hamsik has been working on Logical Volume Management (LVM) support in NetBSD during the Google Summer of Code and beyond. The code is a from-scratch implementation of the same interfaces found in the Linux kernel, and as a result, the same userland tools can be used. The code is now enabled in NetBSD by default, i.e. it will be part of NetBSD 6.0 (quite some time down the road, but time to test and shake out the bugs is *now*).

Besides the code, there's also documentation available in the NetBSD Guide.

Happy Volume Managing!

[Tags: ] [Slashdot It!]

[20091109] TeX Live 2009 - including NetBSD binaries
Today, TeX Live 2009 was released. After teTeX is no longer maintained, TeX Live is *the* Unix (and other) TeX distribution. And with the binary release come binaries for NetBSD: ``Executables for the cygwin and i386-netbsd platforms are now included, while the other BSD distributions have been dropped; we were advised that OpenBSD and FreeBSD users get TEX through their package systems, plus there were difficulties in making binaries that have a chance of working on more than one version. ''.

The NetBSD binaries were provided by Jukka Salmi. Mmm, community involvement. Thanks Jukka!

[Tags: ] [Slashdot It!]

[20091107] NetBSD vs. Microkernels - From Kernel to Userspace and Abroad
A few weeks ago I made a comment about NetBSD not being a "microkernel" despite it's move to kernel modules. Antti Kantee wrote back to me (Hi Antti!) reminding me of his work on RUMP, PUFFS and the like, which I think does definitely deserve mentioning in that context:

With RUMP, PUFFS and the like, Antti is set on a mission to define interfaces between kernel components, and move those kernel components from inside the kernel to the userland. As a result, the (once) kernel-code is now running as "simple" userland processes that have all the benefits like memory protection and not taking down the whole system in case of an error. Examples that Antti has been bashing on started with moving file systems to the userland, which resulted in PUFFS and ReFUSE, an implementation of the Linux inferface of File systems in USErland (FUSE). Not stopping at file systems (which are traditionally used for accessing data on storage media, like e.g. for ntfs-3g), Antti went further and moved into getting network services like SSHFS going - in userland, based on FUSE.

Not stopping there, more recent works include:

Remember when NetBSD got (re)FUSE? All of a sudden we got a bazillion of filesystems back then. So why not turn this development around, and make RUMP available as an interface for all sort of drivers to other operating systems. That way, they can get our file systems, usb stack and drivers, etc., and run them in userspace as well. Developing a driver on one operating system, and using it on many - a wet dream would come true!

Sounds impossible? Ye fear not, it's been done! Arnaud 'stacktic' Ysmal already has ported RUMP to FreeBSD and Linux, the work is available via pkgsrc/misc/rump, and there is also Arnaud's page on Rump on non-NetBSD Operating Systems for more information.

Whew... lots of research and development going on in this area, and - getting back to the initial topic - we may well see an operating system in the future that moves from the monolithic to a microkernel approach, and it may or may not be called NetBSD. Fact is, that a lot of research is going on in that area, on NetBSD, here and now. Hats off, Antti!

[Tags: , , , , , , , , , , ] [Slashdot It!]

[20091107] On the difference between "data" and "information"

Thanks xkcd, from the information scientist inside me!

[Tags: , , , ] [Slashdot It!]

[20091025] Harddisk image cloning for Unix - g4u 2.4 released
g4u ("ghosting for unix") version 2.4 has been released. g4u is a NetBSD-based bootfloppy/CD-ROM that allows easy cloning of PC harddisks to deploy a common set up on a number of PCs using FTP. The floppy/CD offers two functions. The first is to upload the compressed image of a local harddisk to a FTP server, the other is to restore that image via FTP, uncompress it and write it back to disk. Network configuration is fetched via DHCP. As the harddisk is processed as an image, any filesystem and operating system can be deployed using g4u. Easy cloning of local disks as well as partitions is also supported.

Three years of time have passed since the last full release of g4u. Here's a list of what's new / changes in g4u 2.4:

  • Major new supported device types include bluetooth keyboards and SD/MMC cards - feedback highly appreciated!
  • Lots of new drivers. Too many to list, please see the g4u section of my blog at http://www.feyrer.de/NetBSD/blog.html?-tags=g4u for details.
  • Based on the NetBSD development version from Sep 2009
  • Source builds native and without root privileges on NetBSD 5.0 and crossbuilds also without root privileges from Mac OS X (tested) and probably others (untested; expected: Solaris, Linux).
The g4u 2.4 release is available on the g4u homeage at

http://www.feyrer.de/g4u/


[Tags: ] [Slashdot It!]

[20091024] Fun around daylight saving time (DST) and Unix timezone handling in general
It's that time of the year again when I and my friends never know when daylight saving time is switched from summer- to winter time. Do you know? And if you've heared in the news today... do you know when the next change is?

There's an easy way to find out, using the zdump(8) utility that comes with about every Unix machine (at least with NetBSD and Mac OS X - is there anything else relevant? :), and the timezone information stored in the /usr/share/zoneinfo directory.

To find out when DST is switched on/off, run the following command:

% zdump -v /etc/localtime
...
/etc/localtime  Sun Mar 29 00:59:59 2009 UTC = Sun Mar 29 01:59:59 2009 CET isdst=0
/etc/localtime  Sun Mar 29 01:00:00 2009 UTC = Sun Mar 29 03:00:00 2009 CEST isdst=1
/etc/localtime  Sun Oct 25 00:59:59 2009 UTC = Sun Oct 25 02:59:59 2009 CEST isdst=1
/etc/localtime  Sun Oct 25 01:00:00 2009 UTC = Sun Oct 25 02:00:00 2009 CET isdst=0
/etc/localtime  Sun Mar 28 00:59:59 2010 UTC = Sun Mar 28 01:59:59 2010 CET isdst=0
/etc/localtime  Sun Mar 28 01:00:00 2010 UTC = Sun Mar 28 03:00:00 2010 CEST isdst=1
/etc/localtime  Sun Oct 31 00:59:59 2010 UTC = Sun Oct 31 02:59:59 2010 CEST isdst=1
/etc/localtime  Sun Oct 31 01:00:00 2010 UTC = Sun Oct 31 02:00:00 2010 CET isdst=0
/etc/localtime  Sun Mar 27 00:59:59 2011 UTC = Sun Mar 27 01:59:59 2011 CET isdst=0
/etc/localtime  Sun Mar 27 01:00:00 2011 UTC = Sun Mar 27 03:00:00 2011 CEST isdst=1
/etc/localtime  Sun Oct 30 00:59:59 2011 UTC = Sun Oct 30 02:59:59 2011 CEST isdst=1
/etc/localtime  Sun Oct 30 01:00:00 2011 UTC = Sun Oct 30 02:00:00 2011 CET isdst=0
...  
The data is given relative to Universal Time Coordinated, which you can determine on a NetBSD system by running "date -u":
% date
Sat 24 Oct 14:30:24 CEST 2009
% date -u
Sat 24 Oct 12:30:26 UTC 2009
And if you wonder what timezone you're actually in, you probably knokw that /etc/localtime is a symbolic link to a file that fits to your exact timezone, with all related information:
% ls -la /etc/localtime 
lrwxr-xr-x  1 root  wheel  33 May 26  2007 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
If you always wanted to know what timezones there are, have a look at /usr/share/zoneinfo:
% ls /usr/share/zoneinfo/
Africa       Chile        GB-Eire      Israel       NZ-CHAT      UCT
America      Cuba         GMT          Jamaica      Navajo       US
Antarctica   EET          GMT+0        Japan        PRC          UTC
Arctic       EST          GMT-0        Kwajalein    PST8PDT      Universal
Asia         EST5EDT      GMT0         Libya        Pacific      W-SU
Atlantic     Egypt        Greenwich    MET          Poland       WET
Australia    Eire         HST          MST          Portugal     Zulu
Brazil       Etc          Hongkong     MST7MDT      ROC          iso3166.tab
CET          Europe       Iceland      Mexico       ROK          posixrules
CST6CDT      Factory      Indian       Mideast      Singapore    zone.tab
Canada       GB           Iran         NZ           Turkey
% ls /usr/share/zoneinfo/Europe/
Amsterdam    Chisinau     Kiev         Moscow       Sarajevo     Vatican
Andorra      Copenhagen   Lisbon       Nicosia      Simferopol   Vienna
Athens       Dublin       Ljubljana    Oslo         Skopje       Vilnius
Belfast      Gibraltar    London       Paris        Sofia        Volgograd
Belgrade     Guernsey     Luxembourg   Podgorica    Stockholm    Warsaw
Berlin       Helsinki     Madrid       Prague       Tallinn      Zagreb
Bratislava   Isle_of_Man  Malta        Riga         Tirane       Zaporozhye
Brussels     Istanbul     Mariehamn    Rome         Tiraspol     Zurich
Bucharest    Jersey       Minsk        Samara       Uzhgorod
Budapest     Kaliningrad  Monaco       San_Marino   Vaduz 
So now that we all that, here's a last cutie: suppose you want to log into a machine on the other end of the world, and still run an application that should use your local timezone, not that that the machine is in. Changing /etc/localtime is not an option, but you can do it on a per-process base by setting the "TZ" environment variable:
% date
Sat Oct 24 14:35:06 CEST 2009
% ssh remote.example.org date
Sat Oct 24 12:35:45 UTC 2009
% ssh remote.example.org env TZ=Europe/Berlin date
Sat Oct 24 14:35:58 CEST 2009 
Enjoy!

[Tags: , , , , ] [Slashdot It!]

[20091019] A Stick Figure Guide to the Advanced Encryption Standard (AES)
This one is not directly related to NetBSD right now, but it will be, eventually: It's AES, the successor of the DES encryption algorithm explained in a comic-like way. It comes as a play in four acts: First some historical predecessors and related events are introduced, followed by some general crypto basics and a general overview of how AES works. The last act gives some introduction to the math behind it - enjoy! :-)

Oh, and why do I think this will be related to NetBSD? Well, there's software cryptography today, and to some extent there are drivers for accelerated crypto co-processors that are supported by NetBSD's opencrypto(9) framework. Even more, some VIA CPUs already have AES hardware on board. With Intel and AMD adding them to their marked-dominating CPUs, I envision that cryptography will happen in a lot more places when they hit the streets. And I guess we can be sure that this will impact all operating systems via standards and protocols.

[Tags: , ] [Slashdot It!]

[20091018] When updating your kernel, remember ...
... to also install new kernel modules if you run NetBSD-current, else your system will not boot any more:

How? Either unpack modules.tgz set so you get modules matching your kernel in /stand, or run "make install USETOOLS=no DESTDIR=/" in src/sys/modules.

[Tags: ] [Slashdot It!]

[20091014] Catching up: Webfwlog, git, vnd and sparse disk images, acpismbus
Here are two news items from the past few days:
  • Web-based firewall log reporting and analysis tool Webfwlog 0.94 released: ``Webfwlog is a flexible web-based firewall log analyzer and reporting tool. It supports standard system logs for linux, FreeBSD, OpenBSD, NetBSD, Solaris, Irix, OS X, etc. as well as Windows XP. Supported log file formats are netfilter, ipfilter, ipfw, ipchains and Windows XP. [...]

    With Webfwlog you can design reports to use on your logged data in whatever configuration you desire. Included are example reports as a starting point. You can sort a report with a single click, "drill-down" on the reports all the way to the packet level, and save your reports for later use. You can also create a link directly to any saved report.''

    See the webfwlog homepage for more information.

  • Git copies of cvs modules available - spz@ writes that ``htdocs, othersrc, pkgsrc, src and xsrc are now available as (bare) git repository copies at http://ftp.netbsd.org/pub/NetBSD/misc/repositories/git. These repositories are currently updated every 30 minutes.

    They are not authoritative and are not meant to replace cvs, but if you want to track your development that is not yet fit for committing into cvs head or sending in as a PR, and want to use git for that, they may serve as a convenient starting point or reference.''

  • Support for writing file systems on sparse disk images - File system hacker Antti Kantee writes: ``Yesterday I wanted to write to a file system which was on a sparse disk image. Normally I would have just used a rump mount, but since the file system was not at offset = 0 in the file, this failed. vnd wasn't helpful either: it allowed me to mount the image and then I got weird errors when writing.

    I just finished adding disklabel support to the various rump_fs utilities. Due to them using the option parsing code of the real mount_fs utilities, I decided to signal the label number with a magic parameter at the end of the device (yes, this really simplifies things currently).

    Let's assume you're looking at wd0.img. Here's how it works:

    === SNIP ===
    golem> disklabel wd0.img
    [...]
    16 partitions:
    #        size    offset     fstype [fsize bsize cpg/sgs]
     a:    719712        63     4.2BSD   1024  8192     0  # (Cyl.      0*-    714*)
     b:     66657    719775       swap                     # (Cyl.    714*-    780*)
     c:    786369        63     unused      0     0        # (Cyl.      0*-    780*)
     d:    786432         0     unused      0     0        # (Cyl.      0 -    780*)
    
    golem> rump_ffs wd0.img%PART:a% /puffs
    rump_ffs: "wd0.img" is a non-resolved or relative path.
    rump_ffs: using "/usr/home/pooka/wd0.img" instead.
    golem> df /puffs
    Filesystem                      1K-blocks       Used      Avail %Cap Mounted on
    /usr/home/pooka/wd0.img%PART:a%     338471     256211      65337  79% /puffs
    === SNIP ===
    So you specify the partition number as %PART:n%, where is n is obviously the partition number. Other than that, things work as usual. No vnconfig etc. necessary.
    ''

  • New ACPI driver: acpismbus(4) - call for testers - Paul Goyette writes that ``At the request of some folks off-list, I have created a driver for ACPI's SMBus Control Method Interface. Basically, this is an acpi-based wrapper to provide device-independant access to i2c/SMBus controllers. (See spec at http://smbus.org/specs/smbus_cmi10.pdf for further info.)

    To see if your system can use this driver, check the output of acpidump for the existence of a Device(SMB0). If you have an SMB device, I'd appreciate it if you could help test this driver!''

    Continue with Paul's mail to learn on how to test the driver, and what limitations there are currently.



[Tags: , , , , , ] [Slashdot It!]

[20091007] man(1) can handle *roff files, now
What, *roff - never heared of? You should - it's the formatting language that predates HTML and TeX for some many years, and which all *nix manpages are written in:
% cat /usr/share/man/man1/ls.1
...
.Dd September 25, 2008
.Dt LS 1
.Os
.Sh NAME
.Nm ls
.Nd list directory contents
.Sh SYNOPSIS
.Nm
.Op Fl AaBbCcdFfghikLlmnopqRrSsTtuWwx1
.Op Ar
...
There are many formatting commands, all starting with a dot as first character, and the various commands are grouped in so-called macro packages. Example files in the old-school "man" format and the newer "mandoc" format can be found in man(7) and mdoc(7) manpages on any NetBSD installation, templates can be found in /usr/share/misc/man.template and .../mdoc.template. And in /usr/share/man. :-)

Now, with the new change to man(1), you can simply type "man /usr/share/man/man1/ls.1" and the formatted manpage will be shown, just like it always did for "man ls". The fine difference is that the latter command really just shows you a preformatted file (from /usr/share/man/cat1), while the former now really formats the given file on the fly, and shows you the result.

Before the new change to man(1), you had to run the formatting tool with the right set of parameters for macro packages and possibly other options manually. Usually, the command is something like

	nroff -mandoc /usr/share/man/man1/ls.1 | more 
for terminal output. NetBSD's "nroff" command is really from the GNU *roff utilities, and using groff(1) it is also possible to produce PostScript output for pretty-printing:
	groff -Tps -mandoc /usr/share/man/man1/ls.1 >ls.ps
	lp -dPS ls.ps 
There are more options when running nroff(1)/groff(1), plus manpages can be stored in compressed format, see /etc/man.conf for some ideas. All this is now hidden behind an easy run of man(1).

For a more in-depth introduction of the Unix documentation tools (and many more things!), I recommend reading Kernighan/Pike's Unix Programming Environment.

[Tags: , , ] [Slashdot It!]

Previous 20 entries

Tags: , 3com, 501c3, 64bit, acl, acls, acm, acorn, acpi, acpitz, adobe, Advocacy, advocacy, advogato, aes, afs, aiglx, aio, airport, alereon, alex, alix, alpha, altq, am64t, amazon, amd64, anatomy, apache, apm, apple, arkeia, arla, arm, art, Article, Articles, ascii, asiabsdcon, asterisk, asus, atf, ath, atheros, atmel, audio, audiocodes, autoconf, avocent, avr32, axigen, backup, banners, basename, bc, benchmark, bigip, bind, blackmouse, bldgblog, blog, blogs, blosxom, bluetooth, bonjour, books, boot, bootprops, bozohttpd, bs2000, bsd, bsdcan, bsdcg, bsdforen, bsdfreak, bsdmac, bsdmagazine, bsdnexus, bsdstats, bsdtalk, bsdtracker, bug, busybox, buttons, bzip, c-jump, c99, cafepress, callweaver, camera, candy, capabilities, card, carp, cars, cauldron, ccc, ccd, cd, cddl, cdrom, cdrtools, cebit, centrino, cephes, cert, certification, cfs, cgd, cgf, checkpointing, china, cisco, clt, cobalt, codian, colossus, common-criteria, community, compat, compiz, compsci, concept04, config, console, contest, copyright, core, cortina, coverity, cpu, cray, crosscompile, crunchgen, cryptography, cu, cuneiform, curses, cuwin, cvs, cvs-digest, cvsup, cygwin, daemon, daemonforums, danger, darwin, data, date, dd, debian, debugging, dell, desktop, devd, devfs, devotionalia, df, dfd_keeper, dhcp, dhcpcd, dhcpd, dhs, diezeit, digest, digests, dilbert, dirhash, distcc, dmesg, Docs, donations, draco, dracopkg, dragonflybsd, dreamcast, dri, driver, drivers, drm, dsl, dst, dvb, eclipse, eeepc, eeepca, ehci, eifel, elf, em64t, embedded, emulate, encoding, envsys, eol, espresso, etcupdate, etherip, eurobsdcon, eurosys, Events, exascale, ext3, f5, falken, fan, fatbinary, features, fefe, ffs, filesystem, fileysstem, firefox, firewire, fireworks, flag, flash, flashsucks, flickr, flyer, fmslabs, force10, fortunes, fosdem, freebsd, freedarwin, freescale, freex, freshbsd, friendlyAam, fritzbox, fsck, fss, ftp, ftpd, fujitsu, fun, fundraising, funds, funny, fuse, g4u, g5, games, gcc, gdb, gentoo, geode, getty, git, gnome, google, google-soc, gpio, gpl, gprs, gre, groff, groupwise, growfs, grub, gumstix, guug, gzip, hackathon, hackbench, hal, hanoi, happabsd, Hardware, haze, hdaudio, heat, heimdal, hf6to4, hfblog, hfs, history, hosting, hp, hp700, hpcsh, hpux, html, httpd, hubertf, hurd, i18n, i386, i386pkg, ia64, ian, ibm, ids, ieee, ifwatchd, igd, iij, image, images, information, init, initrd, install, intel, interix, internet2, io, ioccc, iostat, ipbt, ipf, ipfilter, ipmi, ipsec, ipv6, irbsd, irc, irix, iscsi, isdn, iso, isp, itojun, jail, jails, java, javascript, jibbed, jihbed, jobs, jokes, journaling, kame, kauth, kde, kerberos, kergis, kernel, keyboardcolemak, kitt, kmod, kolab, kylin, l10n, landisk, laptop, laptops, law, ldap, lehmanns, lenovo, lfs, libc, license, licensing, links, linksys, linux, linuxtag, live-cd, lkm, localtime, locate.updatedb, logfile, logging, logo, logos, lom, lvm, m68k, macmini, macppc, macromedia, mail, makefs, mame, manpages, matlab, maus, mbuf, mca, mdns, mediant, mediapack, meetbsd, mercurial, mesh, meshcube, mfs, mhonarc, microkernel, microsoft, midi, miniroot, mips, missile, mit, mobile-ip, modula3, modules, mouse, mp3, mpls, mtftp, mult, multics, multilib, multimedia, music, mysql, named, nas, ndis, nec, nemo, neo1973, netbook, netboot, netbsd, netbsd.se, nethack, nethence, netksb, networking, neutrino, nforce, nfs, nis, npwr, nroff, nslu2, nspluginwrapper, ntfs-3f, nullfs, numa, nvi, nvidia, nycbsdcon, office, ofppc, ohloh, olimex, olpc, onetbsd, openat, openbgpd, openbsd, opencrypto, opengrok, openmoko, openoffice, openssl, oracle, oreilly, oscon, osf1, osjb, packages, pad, pae, pam, pan, panasonic, parallels, pascal, patch, patents, pax, paypal, pc532, pc98, pcc, pci, pdf, pegasos, penguin, performance, pexpect, pf, pfsync, pgx32, pinderkent, pkg_install, pkg_select, pkglint, pkgmanager, pkgsrc, pkgsrc.se, pkgsrcCon, pkgsrccon, plathome, pocketsan, podcast, pofacs, politics, polls, polybsd, portability, posix, postinstall, power3, powernow, powerpc, pppoe, precedence, preemption, prep, presentations, Producs, Products, products, proplib, proxy, ps3, psp, pthread, ptp, ptyfs, Publications, puffs, pxe, qemu, qnx, qos, qt, quine, quote, quotes, r-project, radio, radiotap, raid, raidframe, rants, raptor, raq, rc.d, readahead, realtime, record, refuse, reiserfs, Release, release, Releases, releases, releases pkgsrc, releng, reports, resize, restore, ricoh, rijndael, rip, riscos, rng, roadmap, robot, robots, roff, rootserver, rotfl, rox, rs6k, rss, ruby, rump, rzip, sa, san, savin, sbsd, scampi, scheduling, sco, screen, script, sdf, sdtemp, Security, security, segvguard, seil, sendmail, sfu, sge, sgi, sgimips, sh, sha2, shark, shisa, sidekick, size, slackware, slashdot, slit, smbus, smp, soekris, softdep, software, solaris, sony, source, source-changes, spanish, sparc, sparc64, spider, spreadshirt, squid, ssh, sshfs, ssp, stereostream, stickers, studybsd, subfile, sudo, summit, sun, sun2, sun3, sunpci, support, sus, suse, sushi, susv3, svn, symlinks, sysbench, sysinst, sysjail, syslog, syspkg, systat, systrace, sysupdate, t-shirt, tabs, tanenbaum, tape, tcp, tcp/ip, tcpdrop, tcpmux, tcsh, teamasa, teredo, testdrive, testing, tex, TeXlive, thecus, theopengroup, thin-client, thinkgeek, thorpej, threads, time, time_t, timecounters, tip, tme, tmp, tmpfs, tnf, toaster, todo, toolchain, torvalds, toshiba, touchpanel, training, tso, ttyrec, tulip, tun, tuning, uboot, udf, ufs, ukfs, ums, unetbootin, unicos, unix, updating, upnp, uptime, usb, usenix, useradd, userconf, userfriendly, usermode, usl, utc, utf8, uucp, uvc, uvm, valgrind, vcfe, vcr, veriexec, vesa, video, videos, virtex, vm, vmware, vnd, vobb, voip, voltalinux, vpn, vpnc, vulab, wallpaper, wapbl, wargames, wasabi, webcam, webfwlog, wedges, wgt624v3, wiki, window, windows, winmodem, wireless, wizd, wlan, wordle, wpa, wscons, wstablet, x.org, x11, x2apic, xbox, xcast, xen, xfree, xfs, xilinx, xkcd, xmms, xorg, xscale, youos, youtube, zaurus, zdump, zfs, zlib

'nuff. Grab the RSS-feed, index, or go back to my regular NetBSD page

Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 8702152
Copyright (c) Hubert Feyrer <hubert@feyrer.de>