You can grab the source code of the Singularity OS RDK - a Microsoft Research project from codeplex (Microsoft's version of SourceForge for Open Source Projects Hosting). It's basically an OS written mostly in managed code. It also uses a microkernel.
Running the thing is pretty simple. Just build world and run the ISO in VirtualPC.
Saturday, July 12, 2008
Microsoft Reaserch Singularity Project - Open Source on Codeplex
Posted by
cmihai
at
2:00 PM
0
comments
Labels: Microsoft, Open Source
Sunday, July 06, 2008
Puttycyg, screen, zsh and irssi on Windows
Remeber PowerShell + PowerTab + PCSX + Console + Terminus?
Here's something even nicer: Puttycyg + Terminus + GNU Screen + ZSH + irssi:
Posted by
cmihai
at
9:54 PM
0
comments
Labels: Microsoft, Open Source
Wednesday, June 11, 2008
Reading Microsoft Office 2007 formats with OpenOffice
You can rename the .docx or whatever to .zip and look at the .xml files, or you can use this:
OpenOffice plugin for Microsoft XML document format:
http://www.novell.com/documentation/openwg/esd/di_ooo_openxml_translator.html
Posted by
cmihai
at
2:01 AM
0
comments
Labels: Microsoft, Open Source
Monday, May 19, 2008
Disk Cleanup Wizzard in Windows Server 2008
If you want to run the Disk Cleanup Wizzard (cleanmgr) on Windows 2008 Server you need to install the "Desktop Experience" Role and restart your computer.
So basically, start the Server Manager (CompMgmtLauncher.exe) - Features - Add Feature - Desktop Experience and restart your machine. IT doesn't mention this also adds the Cleanup Wizzard though, heh.
It's a bit counter-intuitive, but that's how it is. This also adds themes, Media Player, photo management and a few other useless things.
Posted by
cmihai
at
8:08 PM
0
comments
Labels: Microsoft
Sunday, April 13, 2008
Windows 2008 Server Backup
I must say I'm quite pleased with the new Windows 2008 Server backup. A full backup of the system disk (Windows 2008 Enterprise and a few tools, about 15GB uncompressed with 3GB of SWAP. Windows Backup shows the volume as using 14GB) takes 6 minutes. Overall, a great effort, considering I'm doing this over a Firewire 400 connection.
And the backup is done:
A larger backup:
Posted by
cmihai
at
12:29 PM
0
comments
Labels: Backup, Enterprise, Microsoft
Hyper-V - Windows 2008 Virtualization
Can't say Hyper-V is much fun. It seems to fail in spectacular ways when it comes to running non-Windows operating systems. FreeBSD 7 (AMD64 and i386) builds fail to boot, OS/2, eComStation and QNX fail to install (QNX 4 installs, but fails to boot after), Solaris 10 doesn't get past the GRUB screen (at least in the 10 minutes I've waited) and other operating systems experience strange issues:
QNX in Hyper-V:
OpenBSD install:
Though OpenBSD did install after all:
So far, it seems that VMware Server (or ESX) is a safer choice. Even though it's probably possible to get some of these systems installed with some tuning, I wasn't all that pleased with graphical performance either. The Debian installer for example was very sluggish.
And it seems to crash quite often:
Still, the version in Windows 2008 RTM is actually Hyper-V RC0, so I'll wait for a release version to come out before bothering with it anymore.
Posted by
cmihai
at
12:08 AM
1 comments
Labels: Microsoft, Virtualization
Sunday, April 06, 2008
OpenSSH - Secure Shell Server and Client for Windows
SSHWindows is a minimal Cygwin build of OpenSSH for Microsoft Windows systems. It's got both a client and a server, in a small package (~ 2MB).
Get Console 2 + Terminus if you need TABS :-). Works just like KDE Konsole or Gnome-Terminal + OpenSSH in any other UNIX or Linux system.
Posted by
cmihai
at
9:56 AM
0
comments
Labels: Microsoft, Open Source, Security
Friday, April 04, 2008
Disable or Enable NX bit in Vista via commandline
Data Execution Prevention (DEP) and the NX bit (No eXecute) CPU flag on AMD processors and XD eXecute Disable on Intel processors can be of great help in buffer overflow mitigation. Of course, it can also hinder other applications.
You can disable it in Vista by starting an Administrative cmd (right click cmd - Run As Administrator) and typing:
bcdedit /set nx alwaysoffBCDEdit can be used to enable or disable DEP, PAE and more.
bcdedit /set {current} nx alwaysoff
You can also set DEP by right clicking My Computer - Properties - System Properties - Advanced System Settings - Performance - Data Execution Prevention.
Some applications don't work well unless they are selected as DEP exceptions (like Battle.NET via PVPGN or Hitachi HiTrack's JVM).
Posted by
cmihai
at
7:42 PM
0
comments
Tuesday, March 18, 2008
Windows Vista Service Pack 1 - Standalone and Windows Update released
Windows Vista Service Pack 1 was released to the general public via Windows Update and as a Standalone pack.
Download Windows Vista SP1.
Posted by
cmihai
at
7:28 PM
0
comments
Labels: Microsoft
Tuesday, March 11, 2008
SeamlessRDP - Using Two Systems and the Same Time - Solaris and Vista
Here is a demo of SeamlessRDP, using tsclient on Solaris to connect to a Vista desktop machine.
This is the Blastwave package. A simple "/opt/csw/bin/pkg-get install rdesktop" will do the trick.
Posted by
cmihai
at
5:13 PM
0
comments
Labels: Microsoft, Networking, Open Source, Solaris, Sun
Saturday, February 23, 2008
SeamlessRDP - Seamless Remote Desktop Connection Shells for Terminal Services
SeamlessRDP is basically like VirtualBox or VMware Fusion Seamless Mode, but for Windows Applications. Or like doing ssh -X, but with Windows :-). Or Citrix or Tarantella (Sun Secure Global Desktop), etc.
It works with RDesktop/TSClientX.
Posted by
cmihai
at
9:44 PM
0
comments
Labels: Microsoft, Open Source, UNIX
Thursday, February 21, 2008
PowerShell, PowerTab, PSCX, Console, Terminus and Vim
Here's something for all you Powershell / WMIC / VB / cmd script monkeys :-).
You can, of course, script in ksh, Perl or Python if that's your thing. (ActiveState Perl / Python).
Powershell + PowerTab + PSCX + Console + Terminus Programmers Fonts + VIM + VIM PowerShell Syntax Highlighting.
Here's another PowerTab Theme and PSCX (PowerShell Community Extensions):
A cyan BackColor to match my prompt:
And of course, a good color scheme and PoSH syntax highlighting in VIM is also nice:
Posted by
cmihai
at
10:35 PM
2
comments
Labels: Microsoft, Open Source, Scripting, Software Development
OpenMicrosoft
Hooray for open APIs
http://www.theregister.co.uk/2008/02/21/microsoft_goes_open/
http://blogs.cnet.com/8301-13505_1-9876027-16.html
Posted by
cmihai
at
9:14 PM
0
comments
Labels: Microsoft
Wednesday, February 20, 2008
Windows SteadyState - Free DeepFreeze alternative - now also for Vista
Microsoft Shared Computer Toolkit for Windows AKA Microsoft SteadyState helps manage shared computer systems for internet cafes, libraries, schools, etc. by preventing system changes (a reboot restores everything). It's very much similar to DeepFreeze.
It makes restricting computer access easy.
A SteadyState for Windows Vista version (2.5 beta) has also been released.
Posted by
cmihai
at
11:22 PM
0
comments
Monday, February 18, 2008
SMPlayer Vista Aero Integration - OpenGL
MPlayer is the best video player, ever. It's also open source, and more versatile than Video Lan Client (VLC). On Windows platforms, MPlayer for Windows - contains SMPlayer, MPUI, MPlayer and codecs in a convenient package.
The problem is it will revert to Aero basic when running on Vista. Here's how to fix that:
Open SMPlayer - go to Options - Preferences (Ctrl -P) - General - Output Drivers - Video - select GL:
Go to the Interface Tab and pick the "Windows Vista" style.
Go to the Advanced Tab - Check "Run MPlayer in it's own Window".
Enjoy:
Posted by
cmihai
at
10:56 PM
3
comments
Labels: Graphics, Microsoft, Open Source
NVIDIA Laptop Drivers and Vista SP1 x64
I've upgraded my laptop OS to Windows Vista SP1 Enterprise 64 bit, and I've had a hard time finding updated drivers from the manufacturer.
The trouble with NVIDIA laptop graphics adapters is that you need to use the vendor driver, instead of the one from NVIDIA.com.
I've got a 8600 GT mobile graphics adapter on this Acer 5920G laptop, and the Acer drivers are ancient (101.45), compared to 169.12 version currently available from laptop2go.
The good news is you can grab an updated copy from the LaptopVideo2Go website, copy the modified INF file, and enjoy :-).
Posted by
cmihai
at
9:17 PM
0
comments
Saturday, February 09, 2008
Windows Performance Tracing Toolkit
Windows Performance Tools Kit, v.4.1.1 helps diagnostic application start time issues, boot issues, deferred procedure calls and interrupt activity (DPCs and ISRs), interrupt storms, application resource usage and system responsiveness issues.
The toolkit includes xperf - a trace capture tool, xperfview - a visualization tool (Performance Analyzer) and xbootmgr - a boot trace capture tool.
It works great along side sysinternals tools (Process Explorer and Process Monitor) and krview for kernel tracing and profiling and Performance Monitor (perfmon.msc).
Here's a VERY simple trace (xperf -on DiagEasy, xperf -d trace.etl, xperf trace.etl). There's hunderds of knobs you can turn. You can use it for everything from getting VERY detailed system information (xperf –i trace.etl –a sysconfig) to getting advanced disk I/O info or pinpointing Registry Access bottlenecks.
Posted by
cmihai
at
8:19 PM
0
comments
Labels: Debugging, Microsoft, Software Development
Sunday, February 03, 2008
Accessing PostgreSQL and Oracle with Access and SQL Developer
Microsoft Office Access is a RDBMS that uses a GUI interface and RAD tools and a Jet Database Engine backend. It can also use external data stored in SQL servers such as MSSQL or Oracle, PostgreSQL, DB2, etc. via ODBC.
PostgreSQL is "the most advanced" open source database. It is a BSD-style licensed ORDBMS that supports advanced SQL features such as referential integrity constraints (foreign keys, column checks, etc), full ACID compliance, ANSI SQL compliance, views, rules, sub-selects, transactions, triggers, sequences, inheritance and has a built in language (PL/pgSQL) similar to Oracle PL/SQL. It also exhibits almost linear scalability up to 16 cores, being much more scalable then say, MySQL. As of version 8.3 it gets a performance and scalability boost too. The pgbench benchmark here shows an almost 50% performance boost (under certain workloads) from 8.1.
Using an ODBC connection you can use Access as a Rapid Application Development interface to develop Forms, Reports and Applications using PostgreSQL as a backend database, via PSQLODBC.
Install psqlodbc on your Access machine, and all you need to get started now is a PosgreSQL server (if you don't have one on your network you can install one on your Windows machine from:
http://www.postgresql.org/download/
Fire up Access and open up a database. We are going to create the ODBC connection and save the settings. First, let's export some table to the PostgreSQL database via ODBC. We can later link or import the table (in any database).
Create a new Data Source using the "PostgreSQL Unicode" driver. The goods database was created using "CREATE DATABASE goods OWNER cmihai ENCODING 'UTF8'" and we are planning on storing Unicode data.
Once you've selected a Server hostname (or IP), username, password and database (like the newly created "goods" database in your PostgreSQL server) you need to set some advanced options. Uncheck the "Bools as Char" box.
Check "True is -1":
Now we can Import a table using an external data source (it will import the structure and data of a Table in PostgreSQL as a table in Access. The tables will not be linked).
We can also Link tables using an external data source. This means that the data and structure of the table (schema) is only modified in the PostgreSQL database. We can link multiple applications to the same database (and tables). Just use Get External Data - Link to Data Source and select the PostgreSQL ODBC connection.
As you have noticed, PostgreSQL is case sensitive.
The linked tables are shown in the Table view with a sphere icon.
While you can use the Query Builder (in Design view or SQL view) to query data in the Access database (it can use both access tables and ODBC connected tables), there is an option to pass the SQL query directly to PostgreSQL, in Pass-Through mode.
SELECT public_clienti.nume, public_clienti.prenume, public_tari.tara
FROM public_clienti INNER JOIN public_tari ON public_clienti.tara = public_tari.tara
WHERE (((public_clienti.nume)="Gigi"))
ORDER BY public_clienti.nume, public_clienti.prenume;
The PostgreSQL query wouldn't use the public_clienti prefix, we can just do a simple Pass-Through query:

You can use Pass-Through queries in your Forms and Reports too.
Of course, you can also use Access with Microsoft SQL Server 2005 Express (freely available) or even the free Oracle 10g Express, using the SQL Developer Quick Migration tool to export MDB files to Oracle.

You can use the Quick Migration Wizzard:

Or the full blown "Oracle Migration Workbench Exporter for Access" to export your .mdb file for SQL Developer and Oracle Application Express.
Posted by
cmihai
at
9:47 AM
0
comments
Labels: Databases, Microsoft, Open Source, Oracle
Saturday, January 26, 2008
Disk monitoring and tuning with dd and S.M.A.R.T. - Reallocating bad sectors and predicting disk failure
What is S.M.A.R.T.?
Modern disk drives will automagically reallocate bad sectors on the fly, as soon as they encounter some kind of R/W/ECC error. But in order for this to happen, it must first access that sector. This is why you never see surface errors on modern disks.
Modern hard drives (ATA and SATA) have S.M.A.R.T. - Self-Monitoring, Analysis, and Reporting Technology. Once you have that enabled in BIOS (assuming you have a S.M.A.R.T. capable disk and controller) you can monitor a number of disk health and performance parameters.
What you should keep an eye on is the Reallocated Sectors Count (if the drive has a problem with a R/W/ECC error it will mark the sector "Reallocated" and transfer the data to a spare area on the disk). This will result in some performance decrease, and is a sign of imminent disk failure.
Monitoring S.MA.R.T.
ATA and SATA disks:
To monitor S.M.A.R.T. data you can use HDTune on Windows or SmartMonTools (smartd, smartctl) on Darwin (Mac OSX), Linux, FreeBSD, NetBSD, OpenBSD, Solaris, OS/2, or eComStation systems. If you're up to it, you can also use SmartMonTools on Windows.
USB Enclosures:
While in most cases you should have no trouble using HDTune or SmartMonTools, some USB drive enclosures may be resilient to monitoring with S.M.A.R.T. programs and will require vendor software. In such cases, you can download vendor software to perform monitoring, like "Western Digital Data LifeGuard Diagnostics".
iPods:
You can also get S.M.A.R.T. info on your iPod. You can either configure it to act as a pass through device (regular USB media) or boot your iPod in diagnostic mode. You can check S.M.A.R.T. disk data and perform more test on your iPod. To do so, you must reset your iPod and hold REW + Select (5G) at the Apple boot menu. For other iPod models, see here (or Google Apple Diagnostic Mode your iPod Model).
Forcing the disk to remap damanged sectors
Now you should know that if you see any problems with Reallocated Sector Count, Reallocated Event Count, Seek Error Rate, Offline Uncorrectable, UDMA CRC Error Count, Multizone Error Rate, Hardware ECC Recovered values, you should consider getting a new disk. These are all signs of a failing disk. Learn more about S.M.A.R.T. attributes and their meaning here. Note that depending on vendor, there may also be enhanced or propriotary S.M.A.R.T. attributes. Read your HDD vendor documentation.
But sometimes you just need to get a bit more life out of a disk, and force the disk to reallocated damaged sectors. You can do so easily by performing a full raw disk read and write operation. For this, you can use the UNIX "dd" tool. Make sure your target disks aren't mounted (Type "mount" to list mounted disks then use "umount disk").
You can perform a disk read operation (reading the whole disk) using a syntax similar to:
# dd if=/dev/disk of=/dev/null bs=2048You can perform a disk write operation (zero out the disk, this WILL result in data loss) using syntax similar to:
# dd if=/dev/zero of=/dev/disk bs=2048Now you may wish to perform both a read and write at the same time, and not wipe out your disk data (zero it out). You can perform such a "disk refresh" using syntax similar to:
# dd if=/dev/disk of=/dev/disk bs=1mThis will read and rewrite the data to disk in 1MB chunks to prevent presently recoverable read errors from progressing into unrecoverable read errors.
Of course, you should read the dd manpage for your OS (on Windows you could use a dd for Windows implementation or resort to some sort of Linux or BSD LiveCD). Replace /dev/disk with your disk (make sure you're using the right disk). On Linux you can find out what disk you need to use from "dmesg" or /proc/partitions:
# cat /proc/partitionsYou can also use "fdisk -l" to list partitons on your disk, see if that's the right disk
# fdisk -l /dev/hdaDo note that you need root permissions for all of this activity, so on some Linux systems you may need to use "sudo -i" to get a root shell, or precede all operations with "sudo".
While you're doing this rewrite operation, you should monitor the kernel log (dmesg). You can monitor /var/log/messages for this:
# tail -f /var/log/messagesYou usually watch out for "DriveReady SeekComplete Error status=0x51 DriveStatusError error=0x04" or some other error.
You should also keep an eye on the Reallocated Sectors and other Interesting Parameters in smartctl:
# smartctl -A /dev/hdaDo this every now and then, and note the values before you've started the operation.
Once you begin the "dd" operations you can send dd a SIGINFO signal (use pkill / kill / whatever) to make it print out I/O information (progress). Some shells / TERMS also respond to Ctrl-T by sending SIGINFO.
# pkill -SIGINFO ddOnce you're done with dd and S.M.A.R.T. tools you should also perform a filesystem check (fsck / chkdsk / whatever).
Conclusions:
- Monitor S.M.A.R.T. data with smartclt, keep an eye on Reallocs. Consider getting a new disk if you see reallocated sectors
- Perform a disk refresh with dd in order to prevent recoverable read errors from progressing into unrecoverable errors. You don't need fancy tools like SpinRite.
- You can use a simple Linux or BSD LiveCD to perform the disk refresh.
- This is NOT a data recovery procedure. If you're doing data recovery, use something like dd_recover to a separate media.
- This is NOT a step by step tutorial. Read your OS manpages to make sure you're not wiping out the wrong disk or something.
- Always monitor S.M.A.R.T. parameters in order to spot disk failure before it happens.
- Always keep backups.
Links and resources:
- Linux Harddisk Monitoring with SmartMonTools (smartctl)
- HDTune - S.M.A.R.T. tool for Windows
- Wikipedia S.M.A.R.T. page (good links)
Posted by
cmihai
at
11:55 AM
2
comments
Labels: Hardware, Linux, Microsoft, Open Source, UNIX
Thursday, January 24, 2008
Vista Vulnerability Report
Security professional Jeff Jones published a Windows Vista security report for vulnerabilities between Nov. 2006 to Nov. 2007. It also does a side by side comparison with Windows XP, RedHat and Ubuntu Linux and MacOS 10.4.
It looks like the Microsoft security features, tools and approach are finally starting to pay off.
Jeff Jones was also the author of the (somewhat controversial) Internet Explorer versus Firefox report.
Anyway, before you start criticizing, look at the quoted sources (secunia, NIST, securityfocus, securitytracker, ubuntu security notices, rhel security notices, ms security bulletins, etc). The man has a point.
Posted by
cmihai
at
7:04 PM
0
comments

