Archive for the ‘operating system’ Category

Windows 7, McAfee Firewall and SmartPhone-Sync

Thursday, December 24th, 2009

Windows 7, McAfee Firewall and SmartPhone-Sync - an Adventure. After I installed Windows7 successfully on my Samsung NC10 ("Nessie"), as described in another post in this blog, I wanted to sync my phone with it. I knew how it worked with XP. And I knew this would not help me a bit with Windows 7.

All I had, was the description how to get McAfee and ActiveSync up an running, which worked fine with Windows XP. But with Windows 7, ActiveSync is no longer required, nor is it possible to install it. Windows 7 comes with the Windows Mobile Device Center. What you probably need is the 6.1-update of the WMDC, but that's it.

At the time I was looking for information what I would need to get the SmartPhone-sync working without having to turn off the firewall completely everytime, I found nothing, no matter what keywords I fed into google. So I opened up the old description-page about McAfee and ActiveSync, and added the port that was stated there to the list of system-services:

- Service-name       : SmartPhone Sync
- TCP In/out         :   26695
- Open to a computer
   or network that is: Standard (including Trusted)

Then I looked for Apps on my computer that sounded like they might do what the ActiveSync-Apps did. I found a single 100%-match:

ceappmgr.exe,

in the directory

C:\Windows\WindowMobile .

I added it with Full Access to McAfee's Program-list. Next, I looked at the other executables in that directory. I added

  • wmdcBase.exe
  • WmdHost.exe

And tried again. It did not work. I looked through several more directories, added and removed several applications that looked promising to solve the problem, but nothing helped. Then I looked at the log-file generated by the McAfee-firewall, and noticed, that the IP 169.254.2.1 tried to access my computer through ICMP ping (which the firewall blocks), and tcp-port 990, commonly used by FTP for the control-channel when using TLS/SSL. I remembered both the IP and the port from my experiments with syncing the SmartPhone with linux, and decided to add this IP as "trusted" (which is possible directly from the log-entry).

I tried syncing again - and this time it worked.

Samsung NC10 and Windows 7

Monday, December 14th, 2009

On Sunday, December 13th 2009, I dared to switch from the pre-installed Windows XP Home to Windows 7 Professional on my Samsung NC10 NetBook* ("Nessie"). Beforehand, I have had already checked whether Samsung would support Windows 7 for the NC10 or not, with the result that they actually really do. So I downloaded all Windows 7 drivers* and tools* from Samsung, made a full backup of all data on the NC10, and downloaded that little tool from Microsoft, which enables you to use an ISO-image of Windows 7, and create a bootable USB-Stick and/or DVD from it. I used my 8GB USB-Stick, and started the installation process.

The installation process went through without a problem. Even Aero started right away and the base-installation of windows was done after about 30 minutes or so - may be it was 45, I did not really stop the time. Wireless LAN (Atheros) was supported directly with native drivers, as was the sound, graphics, and most important periphal systems. I installed the drivers from Samsung nonetheless, as well as all the tools, and now the NetBook runs with Windows 7 as well as it did with Windows XP before. The memory footprint of the base-system is almost identical (approximately 600MB), and as the NC10 has been upgraded from 1GB RAM to 2GB, everything runs really nice atm.

What seems to be way faster is the SMB-stuff. When initiating a connection to a shared directory on a remote machine, I was used to some waiting before the actual content-listing could be viewed in XP's explorer window. Now the listing "is just there" as soon as I hit enter after typing the host's name - though on the remote host nothing was changed.

All in all, my first impression of Windows 7 is all-positive. I really like to use it, it looks nice with this Aero-design, and seems a lot safer with this "elevated-mode" one has to use when attempting to change system-settings. This will definitely slow virus-attacks a bit (at least until they find ways to circumvent this barrier).

I will provide more information about Windows 7 on the NC10 (as well as in general) soon.

For all interested: The NC10 has a performance rating of 2.1 (The rating you see when selecting "Properties" in the rmb-menu of the "My Computer"-icon on the desktop). I will provide the complete rating-result in a seperate posting soon.

*) Please note that links marked with an asterisk are links to Samsung Germany. As it seems, samsung.com redirects you to your local Samsung-Site depending on your IP. The tools are localized (thus german), but work just fine with any Windows 7 (I am using a us-english Windows 7 professional).

Update:

Microsoft seem to have pulled the ISO-Tool from their Websites, as the link above is not working anymore. It seems to be a consequence of an accusation that Microsoft has violated the GPL, under which the tool was released, somehow in the tool's code. If the accusations prove to be rightful, and if the tool will be downloadable again (one way or another), remains yet to be seen.

New Server - Update (5): ROC - my personal royal PitA

Wednesday, December 2nd, 2009

Yeah, I guess it was a bit naive, but I tried it again. After successfully using the harddiscs in the Compaq DL360 without the ROC-Chip, at full speed and fully write-cached, I thought I re-insert the ROC-Chip and give it another try. I configured the harddiscs to run as a single RAID-1 drive...

...and yeah, you'll probably guess it already: it failed. The ROC-Chip seems to detect and disable the on-disc write-cache hardwired, as it seems. While installing the NetBSD operating system, the performance went down like hell, and I got furious.

The only solution seems to be a 64-bit PCI SmartArray-Controller-Card, which needs to be connected via a special internal SCSI-cable to the mainboard in order to bypass the onboard controller. I am currently trying to find it on the internet, but eBay was no help so far. May be I have found a reseller who can help - I have to contact them, yet. I hope they can provide such a cable, as the hardware-RAID seems to be a lost cause otherwise on that box, and I really don't want to create a new RAIDFrame RAID-1 on a system with only two harddrives total. Especially not, when the machine has the (theoretical) hardware-RAID capability as the DL360 has.

Well, we'll see how it will turn out.

New Server - Update (4): Harddisks, SmartArray, and ROC

Wednesday, May 6th, 2009

In several postings in january, I wrote about a new server, which should replace the current server "unknown". I wrote about serious problems delaying that exchange, and these problems lay in the harddisk-performance.

As I wrote, the "new" server is a Compaq DL-360 (Yes, that is the complete model-name, it is the first generation of DL-360ies) . It came with two 18.2GB harddisks, and had a wonderful fast performance. I replaced both harddisks with compaq-certified 72GB UW-320 harddisks, and installed NetBSD 5.0 on it. While unpacking pkgsrc.tar.bz2, I wondered why the machine took so long...over six minutes for tarball of about 40MB. 2 minutes would have been more appropriate. At that time, I had no further for experimenting and analyzing, but on last sunday, I took up the matter again. I plugged the 70GB harddisks into Ymir, reconfiguring the Mylex DAC960PD-Controller to accept the new disk-pair as a RAID-1 drive, and ran

# tar -xjf pkgsrc.tar.bz2

It was over after 01:55 minutes, and that on a PPro-200. The DL-360 has a Pentium III 1266 and thrice as much RAM.

After this result, I examined the DL-360 again, searched the internet for information, and started a discussion on IRCnet-channel #netbsd. The advice given most often was "that sound like a write-back-cache-problem". And it was - or better, is.

What has confused me all the time was the fact that the machine claimed to have a SmartArray-Controller. Well, it has, but only a stripped-down one: It lacks a write-back-cache.  The integrated SmartArray-Controller is called "ROC" in the manual, which is short for "RAID-On-a-Chip". It is an addon-card, which I have removed now, and unless I can find a SmartArray-Controller-Card (yes, I know, they are sold on eBay), and more importantly the cable which connects the extra SmartArray-Controller with the scsi-backplane to override the ROC-Controller, I will install a NetBSD on the machine in a RAIDFrame RAID-1 again. In the end, a Software-RAID is better than no RAID at all, and RAIDFrame is really great. Unknown runs it since I have setup the machine the first time, which is several years now.

NetBSD 5.0 released!

Thursday, April 30th, 2009

Yesterday, NetBSD 5.0 has been released.

As usual, you can download images via torrent and from the mirrors and read the full details in the release notes.

Here is an excerpt from the release-announcement-mail sent through the netbsd-announcements mailinglist by Soren Jacobsen:

On behalf of the NetBSD developers, I am proud to announce that
NetBSD 5.0, the thirteenth release of the NetBSD operating system,
is now available.

NetBSD 5.0 features greatly improved performance and scalability on
modern multiprocessor (SMP) and multi-core systems. Multi-threaded
applications can now efficiently make use of more than one CPU or core,
and system performance is much better under I/O and network load.

This improved performance is the result of a rewritten threading
subsystem based on a 1:1 threading model, new kernel synchronization
primitives, kernel preemption, a rewritten scheduler implementation,
real-time scheduling extensions, processor sets, and dynamic CPU sets
for thread affinity. Almost all core kernel subsystems, like virtual
memory, memory allocators, file system frameworks for major file
systems, and others were audited and overhauled to make use of highly
concurrent algorithms.

In addition to scalability and performance improvements, a significant
number of major features have been added. Some highlights are: a preview
of metadata journaling for FFS file systems (known as WAPBL, Write
Ahead Physical Block Logging), the 'jemalloc' memory allocator, the
X.Org X11 distribution instead of XFree86 on a number of ports, the
Power Management Framework, ACPI suspend/resume support on many
laptops, write support for UDF file systems, the Automated Testing
Framework, the Runnable Userspace Meta Program framework, Xen 3.3
support for both i386 and amd64, POSIX message queues and
asynchronous I/O, and many new hardware device drivers.

Back online

Saturday, April 18th, 2009

After one and a half days downtime, the system is back online, running happily on a NetBSD 5.0_RC3. With it the blogs and all the other services hosted and provided by this machine are available again of course.
I will provide a detailled report of the upgrade-process later, and the page about this machine will as well be updated later.

Server-outage within the next week

Sunday, April 12th, 2009

Hello everyone, with this post I'd like to inform you about a planned outage of this server within the next few days, and apologize for it. The cause is an OS-upgrade from NetBSD 3.1 to NetBSD 5.0 RC3.

The exact date of the outage is not fixed yet, but it can be expected to happen on thursday. It is hard to say how long it will take, because I have to upgrade the server's operating system and as with all such major system-upgrades, every piece of installed software has to be recompiled against the then installed libs. Though I will of course prioritize and compile the mostly needed applications such as lighttpd, mysql and php first, it will still take some time to be done.

Please be patient, as I will be back online, and stay tuned. :-)

Windows-Update and Proxies

Tuesday, April 7th, 2009

After a discussion on IRCnet, I decided this topic might be worth a blog-post: How do I get Windows Update on Windows XP Home to work with proxies?

Windows XP Professional seems to accept the Administrator's Proxy-Settings automagically, but Windows XP Home doesn't. If you have a network that only permits HTTP-Access through a configured proxy, you have a problem: Windows XP Home won't update, because it attempts a direct connection to Microsoft's servers.

My own setup at home is like this: I have a Cisco C836 Router, which ACL's prohibit any traffic not coming from the proxyhost, or being from certain selected reserved protocols. The proxyhost is a NetBSD 5.0 RC3 Box (see this page and this post), running a Squid 3.0 Web-Proxy.  Since I needed to update my XP-Home-running NetBook, I found a simple solution to this problem some time ago: each Windows comes with a small tool named "proxycfg". All you need to do is call it appropriately, and even Windows XP will update through the proxy like a charm.

This is the help-output from proxycfg:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>proxycfg -?
Microsoft (R) WinHTTP Default Proxy Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.

usage:

    proxycfg -?  : to view help information

    proxycfg     : to view current WinHTTP proxy settings

    proxycfg [-d] [-p <server-name> [<bypass-list>]]

        -d : set direct access
        -p : set proxy server(s), and optional bypass list

    proxycfg -u  : import proxy settings from current user's
                   Microsoft Internet Explorer manual settings
                   (in HKCU)

C:\>

If you have configured the Internet Explorer to use the proxy, you can simply call

 C:\> proxycfg -u

And the settings will be used. If you don't have the IE configured (which is a wise decision if you don't use it), you need to specify the proxy using the -p switch. In my case, this would look like this:

 C:\> proxycfg -p http://proxy.home.nifelheim.info:3128

After this, Windows Update will use these settings and you can update your machine.

Nidhoegg: Updating a Security Host to NetBSD 5.0 RC3

Monday, April 6th, 2009

My network at home is secured against attacks from outside (and inside as well) by a strict set of ACLs within my Cisco C836 Router, and a SUN Ultra-5 serving as a proxy-host for several protocols. Until recently, this Machine was running a NetBSD 3.0.1 Userland with a self-compiled 3.1RC2 Kernel. It's pkgsrc-installed applications were also just as outdated, and so I decided to upgrade the whole box.

Usually, when computers engaged in securing your networks are to be upgraded, one goes for stability, security and definitely not for the newest OS-Version. In this case though, because of "RC" in NetBSD does not mean "development" (that would be "-current"), and because NetBSD 5.0 has certain features NetBSD 4.0.1 does not have, i.e. wapbl, I decided to really go and try NetBSD 5.0RC3. Following is a report about how the upgrade-process worked out...  :)

The Upgrade

Installing NetBSD 5.0RC3

I downloaded the bootable ISO-image from a french mirror-server, because either I was too blind, or the german mirrors currently do not have NetBSD-daily-images. After burning the image onto a CD, making some final backups, and sending a small prayer to /dev/null, the almighty Computer-God, I rebooted the machine. Starting from CD on a SPARC-box is usually as easy as nothing else. After System-Initialization (a.k.a POST on PCs), simply press Stop-A, and at the OK-Prompt enter

OK> boot cdrom

This time, however, the system told me that there was a problem reading the device. I remembered having had problems with the concurrent use of CD-ROM and Harddisk, and opened the Ultra-5. As I remembered, the CD-ROM-Drive was unplugged. I reattached it, and voila, now it worked.

So I ran the installer, partitioned my 8GB Harddisk in a single partition using FFSv2 with the option "log" enabled. This option was introduced by the wapbl-driver donated from Wasabi Systems Inc., and significantly improved by the NetBSD-developers. It provides a journalling filesystem on top of FFSv2, and improves the overall-performance of the filesystem as well. What I was ignorant of at this time of the process was the fact that the sparc64-port of NetBSD does not boot from FFSv2, because it has some issues with the different superblocks of FFSv2. Because I did not notice the culprit to be FFSv2, I tried several things, before finally using FFSv1 for the root-partition ("/"), and splitting up the partitions like this:

Filesystem        Size  Mounted on
/dev/wd0a         1.0G  /
/dev/wd0d         2.4G  /var
/dev/wd0g         2.9G  /usr
/dev/wd0e         482M  /home
mfs:165            62M  /tmp
/dev/wd1d          28G  /data

All partitions (except /tmp and / ) are using FFv2/wabbl (option log). The drive wd1 was added later after the installation process was finished and the CD-ROM drive was unplugged again. It's partition wd1d is using FFSv2 with wapbl, too, of course. :)

I added the log-option to the root-partition using FFSv1, too, just as a test.  mount(8) tells me, it is using the option, though I can hardly imagine that. wapbl(4) states about FFSv1 and the log-options this:

WAPBL requires the super block to be in the UFS2 format. Older FFSv1 file systems will need to be updated to the newer super block layout with the -c option to fsck_ffs(8).

Since I definitely did not update the superblocks (remember the booting-issue), and the machine definitely is booting now, I don't trust mount(8)'s output in this regard anymore, and have changed the option for the root-partition from log to softdep.

Note: log and softdep are mutual exclusive and lead in RC3 to a kernel-trap, though the kernel claims to ignore softdep. I have already submitted a problem report regarding this issue (kern/41161).

Configuring and Installing Packages

Now after the installation was completed, I started to download the pkgsrc-current tarball, again from the french-server since the german servers do not seem to mirror them as well. After untarring pkgsrc into /data, I set some CFLAGS, since I like to squeeze out every bit of performance available, as long as it does not break the system. My CFLAGS on the Ultra-5 look like this:

CFLAGS=-mcpu=ultrasparc -mtune=ultrasparc -m64 -mvis -O3 \
       -funroll-loops -fomit-frame-pointer

Of course the CXXFLAGS are equal to CFLAGS. :)

Now I bootstrapped pkgsrc (I know that on NetBSD this is not necessary, but out of a habit, and because the mk.conf is automatically generated and the tools are compiled with the above CFLAGS as well, I do it. It's a matter of taste, and according to some people probably of waste (of time) as well, but I don't mind :) ). Parallel to the bootstrapping, I configured the DHCP-, NTP- and SSH-server that came with NetBSD-base and launched them, so that those were already up and running again.

After that was done, I started installing the services I required:

  • misc/screen
  • net/bind9 - name-server
  • net/dante - socks-proxy
  • www/squid30 - webproxy
  • www/adzap - advertisement-zapper for squid
  • net/ra-rtsp-proxy - real-audio rtsp-proxy

With screen installed, I left the machine to itself and changed into the more comfortable living-room and my laptop. I ssh'ed to nidhoegg, launched screen, and continued from there with installing the apps in the list above. ntpd and named9 are running chrooted, btw.

I mentioned www/adzap in the list above, a squid-redirector I came to love over the last years while using squid 2.x . Sadly, it is incompatible to squid 3.0, obviously because the way squid talks to its redirectors has changed significantly. May be, if I find the time, I will look into this, and patch it so that is work with squid 3.0, too. Currently, adzap is not in use anymore, because the adzap-processes were dying so fast that browsing was impossible.

But before I could use the squid at all, I had to build my own NetBSD-kernel. Why, you might ask. The answer is simple: because I use diskd as storage-method, and diskd requires the following options set in the kernel, which aren't in GENERIC:

options         SYSVMSG         # System V-like message queues
options         SYSVSEM         # System V-like semaphores
options         SYSVSHM         # System V-like memory sharing

options         SHMMAXPGS=8192
options         MSGMNB=16384
options         MSGSSZ=64
options         MSGTQL=512

Ok, since NetBSD 4.99.35 this could be set through sysctl(8) and the kern.ipc.* variables, but I was not aware of that before writing this post. And besides, it was a good test / experiment to cross-compile a SPARC64-Kernel on an x86-System (I used my primergy-monster to compile the kernel). The kernel was build in about half an hour. Here is the report:

===> Summary of results:
         build.sh command: ./build.sh -m sparc64 -u -N 2 -U   \
                -T obj.sparc64/tooldir -D obj.sparc64/destdir \
                -R obj.sparc64/releasedir -V OBJMACHINE=1 -j8 \
                kernel=NIDHOEGG
         build.sh started: Sun Apr  5 18:16:21 CEST 2009
         NetBSD version:  5.0_RC3
         MACHINE:         sparc64
         MACHINE_ARCH:    sparc64
         Build platform:  NetBSD 4.0 i386
         HOST_SH:         /bin/sh
         TOOLDIR path:    /usr/build/src/obj.sparc64/tooldir
         DESTDIR path:    /usr/build/src/obj.sparc64/destdir
         RELEASEDIR path: /usr/build/src/obj.sparc64/releasedir
         makewrapper:     /usr/build/src/obj.sparc64/tooldir/
                                           bin/nbmake-sparc64
         Updated /usr/build/src/obj.sparc64/tooldir/bin/
                                          nbmake-sparc64
         Building kernel without building new tools
         Building kernel:  NIDHOEGG
         Build directory:  /usr/build/src/sys/arch/sparc64/
                               compile/obj.sparc64/NIDHOEGG
         Kernels built from NIDHOEGG:
          /usr/build/src/sys/arch/sparc64/compile/
                       obj.sparc64/NIDHOEGG/netbsd
         build.sh ended:   Sun Apr  5 18:42:30 CEST 2009
===> .

Of course the building of the toolchain is not included in this report, it's solely the kernel. I forgot to log how long that took, but from experiences with earlier NetBSD 5.0 builds (though for x86-platform), I can say that is usually takes about an hour.

The compilation went through without incident, and the kernel booted like a charm.

Squid was started and after the adzap-issue was identified and the adzap-call was removed from squid's configuration, all worked fine.

Conclusion

All in all it was a smooth process. The small problems that came up were quickly solved, some of them were caused by me being tired and inattentive, others because I had to learn that things do not always work as I wished them to (e.g. booting from FFSv2 and squid-3.0/adzap).

Since sunday, nidhoegg is running stable and fast, and yes, while copying files between disks, I do really think that wapbl's performance-improvements are recognizable. I copied several large files, and though I did not have measured the time, it felt way faster than on FFSv1, which was used on nidhoegg while running NetBSD 3.1RC2.

For all interest in the dmesg-output, read nidhoegg's page.

NetBSD 5.0 RC3 released on NetBSD’s 16th birthday

Saturday, March 21st, 2009

On March, 21st 2009, NetBSD has had its 16th birthday. Congratulations, NetBSD! :)

On the same day, NetBSD 5.0 RC3 has been released.

The changes between RC2 and RC3:

  • Considerable improvements to WAPBL.
  • Further X.Org refinements, including switching sgimips to X.Org.
  • Scheduler Activations support is now disabled by default in sysctl.conf.
  • ddb.onpanic is now set to 1 in the kernel by default, but 0 in sysctl.conf. This avoids trying to dump if a crash occurs during the install phase.
  • puffs is now enabled by default on amd64, i386, macppc, and sparc64.
  • SSP kernels should work again.
  • A handful of assorted stability improvements.

Binaries of NetBSD 5.0 RC3 can be found here, and via CVS using the netbsd-5 branch or the netbsd-5-0-RC3 tag, of course .