Problem adding old gmirror drive to current setup

I am running gmirror software raid in FreeBSD and it works great. Today I wanted to add another hard-drive to the server (not raided). After installing the hard drive and when I booted the system it didn’t start. All I got was a prompt and a message that said ”Manual root filesystem specification” like this:

Manual root filesystem specification:
    :  Mount  using filesystem 
             e.g. ufs:/dev/da0s1a
    ?                  List valid disk boot devices
           Abort manual input

  mountroot> 

What to do? Well, I couldn’t mount my gmirror but I could mount one of the drives in my gmirror setup. After some trial and error I remembered that I used the ”new” drive previously in another gmirror raid on another server. The disk therefore had gmirror metadata on it that had survived, so somehow that disk took over my normal raid. The metadata survives most disk actions like formatting, partitioning and such…

The gmirror utility uses on-disk metadata (stored in the provider's last sec-
tor) to store all needed information.

I had to run ”gmirror clear /dev/ad2” (ad2 is the new drive) to remove the metadata from the disk. After that I only had to reboot and the normal raid took over again. It took me some time to solve this very frustrating problem. The solution is pretty simple but there aren’t very much gmirror documentation on the web.

Soft15KHz and problem with the latest Nvidia drivers

I have been trying to connect my computer to a Nanao MS9-29A arcade monitor running at 15kHz. I am using Soft15KHZ to make my Nvidia 7300GS output arcade resolutions and using the program Quickres to change between resolutions. I have been using the latest Nvidia driver 260.99.

All non-interlaced resolutions was working correctly with the largest working resolution at 640×288, however when trying to change to an interlaced resolution like 640×480 it didn’t work. When switching to 640×480 all I got was a 640×480 VGA-resolution which my arcade monitor can’t handle. Very strange!

After trying everything I switched to an older driver for the graphics card. I installed the Nvidia Forceware 93.71 driver from 2006. After setting everything up I tried switching resolution to 640x480i and voila, I got a beautiful 640×480 interlaced resolution on my arcade monitor. Then I tried switching to 720x480i and that also worked. Problem solved!


Sega Rally at 800×600 interlaced @ 15KHz

Strange behaviour when my gmirror raid lost one of the disks

To begin with, I really like the gmirror software raid feature in Freebsd. It has helped me to keep my server and my sistes online for a very long time without any large interruption. Since my last strange gmirror problem I haven’t had any problem until now. I checked my log and found out that my raid was DEGRADED, there were only one disk in my raid setup.

The error message was the following. Looks like some kind of disk failure…

Dec 21 22:30:14 kernel: ad6: TIMEOUT - WRITE_DMA48 retrying (1 retry left) LBA=693151663
Dec 21 22:30:24 kernel: ad6: TIMEOUT - WRITE_DMA48 retrying (0 retries left) LBA=693151663
Dec 21 22:30:24 kernel: ad6: FAILURE - WRITE_DMA48 timed out LBA=693151663
Dec 21 22:30:24 kernel: GEOM_MIRROR: Request failed (error=5). ad6[WRITE(offset=354893651456, length=114688)]
Dec 21 22:30:24 kernel: GEOM_MIRROR: Device gm0: provider ad6 disconnected.

However the disk was there and it was ok and I didn’t know why it had been disconnected. I tried the following set of commands:

root@server ~>gmirror deactivate -v gm0 ad6
gmirror: No such provider: ad6.
root@mysql ~> gmirror forget -v gm0
Done.
root@mysql ~> gmirror insert -v gm0 ad6
Done.
root@mysql ~> gmirror status
      Name    Status  Components
mirror/gm0  DEGRADED  ad4
                      ad6 (0%)

Then it started rebuilding at once, very strange. And it works as before again! Maybe this was a warning sign that the disk is going bad or was it some kind of glitch?

Ny webbsida – harrietsatelje.se

Min duktiga chef ville ha hjälp med sin privata konstnärs-blogg/portfolio/hemsida. Självklart ställde jag upp på det och resultatet hittar ni på harrietsatelje.se. Självklart så passar WordPress ypperligt för de flesta sorters sajter och så även till denna.

Specifikationer
CMS: WordPress 3.0.1
Tema: Fresh And Clean 1.0 (modifierat)
Tillägg/plugins: Akismet, All in One SEO Pack, Blogger Importer, Contact Form 7, Google XML Sitemaps, NextGEN Gallery

Lycka till med målandet och webbsidan Harriet!

Running Windows 7 on an Asus Z9100 laptop

I have got this old Asus Z9100 laptop and tried to install Windows 7 on it. Windows 7 is not supported on this machine and there are no drivers available. Asus stopped supporting this machine with Windows XP. The machine isn’t that bad so if I got it running it could be a great spare/lab computer.

Specifications
Processor: Intel Celeron M 370 1.5GHz
RAM: 512MB DDR (2x256MB,PC2700)
Graphics: Intel(R) 82852/82855 GM/GME Graphics
Hard drive: 40GB

The installation of Windows 7 was straight forward and I was up and running in no-time. In ”device manager” I only had a few missing drivers and when I made a ”windows update” only ”PCI modem” and the graphics driver was still missing. I can live without the modem but I really wanted the graphics to be ok, it is no fun to be running in the standard vga mode (Standard VGA Graphics Adaptor).

I tried to use the Asus XP driver in compability mode but with no success. It installed fine but was lost after each reboot. I tried with everything that I could think of but the driver was always rejected after booting.

After a while I found the solution in this thread.

The driver to use for the 82852/82855 GM graphics card in Windows 7 is this one: 855gm_vista_driver

Download the file and follow these instructions:

A. Turn off Digital Driver Signing Check

1. Create a shortcut on the desktop to cmd.exe (In the location box type cmd /k)
2. Right-click on the shortcut and select Run as administrator
3.When the command window opens, type the following and press ENTER after each:
bcdedit /set nointegritychecks ON
bcdedit /set loadoptions DDISABLE_INTEGRITY_CHECKS
4. Reboot in safe mode (press F8 repeatedly during the BIOS screen).

B. Installing the XDDM Vista Driver

1. With computer in safe mode, open the Device Manager
(Start > Computer > System Properties > Device Manager)
2. Initiate driver update for Standard VGA Graphics Adaptor
(Properties > Driver Tab > Update Driver > Update driver -> Browse -> Let me pick -> Display adapters -> Have disk -> give path to ”855gm_vista_driver ” folder of the extracted driver)
3. Navigate to the folder where the driver is stored then complete the installation.
4. In the Device Manager, initiate a new hardware scan (Action > Scan for Hardware Changes).
5. Reboot. If successful, create a restore point!

After following these instructions everything started to work. Max resolution is now at 1024×768. I can choose Aero-themes but they are not working because the drivers are not made for Windows 7.

The Windows 7 performance for the Asus Z9100 is not that good but it is definitely satisfying for simple home use.

Summary: Very nice, I now have a ”new” computer running pretty good.

How to install a shared network printer with VB.NET and WMI

Today I show you an example of how to install a network printer with VB.NET and WMI by using the AddPrinterConnection method of the wmi Win32_Printer class. Just replace hostname with the name of the printserver/workstation and queuename with the shared printer queuename.

        Try

            Dim scope As ManagementScope = New ManagementScope("root\CIMV2")
            scope.Options.Impersonation = ImpersonationLevel.Impersonate
            scope.Connect()

            Dim path As New ManagementPath("Win32_Printer")
            Dim mgtClass As New ManagementClass(scope, path, Nothing)

            Dim inputParameters As ManagementBaseObject = mgtClass.GetMethodParameters("AddPrinterConnection")
            inputParameters("Name") = "\\hostname\queuename"

            Dim outputParameters As ManagementBaseObject = mgtClass.InvokeMethod("AddPrinterConnection", inputParameters, Nothing)
            Dim returnValue As UInteger = UInteger.Parse(outputParameters("ReturnValue"))

            If (returnValue = 0) Then
                Console.WriteLine("Success")
            ElseIf (returnValue = 5) Then
                Console.WriteLine("Access Denied")
            ElseIf (returnValue = 1801) Then
                Console.WriteLine("Invalid Printer Name")
            ElseIf (returnValue = 1930) Then
                Console.WriteLine("Incompatible Printer Driver")
            End If

        Catch ex As Exception

        End Try

Error importing from blogger (blogspot) to WordPress

Today I created a fresh WordPress blog and tried to import an existing blog from blogger (blogspot). Everything worked is it should and all posts were converted, however all of the imported posts got extra characters in them that wasn’t in the original blog. The post title and the post content all got an ’>’ in them in the first position. Like: ”>This a a post title” amd ”>This is the content”.

To clean this up you can run the following sql-commands against the wordpress database:

update wp_posts SET post_title = TRIM(LEADING '>' FROM post_title)   WHERE post_title LIKE '>%'
update wp_posts SET post_content = TRIM(LEADING '>' FROM post_content)  WHERE post_content LIKE '>%'

Mitt hembyggda arkadspel Marcade Mini är färdigt

Efter många timmars slit så är äntligen arkadspelet så gott som färdigt. Lite småfix med mjukvaran är det givetvis kvar och man kan ju alltid lägga till fler emulatorer, men i stort sett så är allt klart. Om du följer länken nedan så har jag lagt upp en byggbeskrivning med bilder och en film.

Marcade mini är ett litet two-player arkad/flipper-spel som körs på Tiny XP och sedan används ett flertal emulatorer för att kunna köra olika hårdvara.

Byggbeskrivning av Marcade Mini