2006-12-22

NTFS3g on OpenSuse 10.2

I have installed openSuSE 10.2 on my brand new computer (bought more than a month ago).

I'm happy with openSuSE 10.2, YaST has been improved, it gives more feedback to the user. Now there is an native KDE updater, so I don't have to install a GNOME Mono application, the source repository knows about YUM repositories, and so on and so forth.

After installing it I've noticed that my Windows XP wasn't booting anymore. The fact was that I had two NTFS partitions, the first had the boot loader and boot.ini and the second had Windows files. The second partition number had shifted after creating two linux partitions, so Windows boot loader got confused and refused to work.

Well I said, it's easy, all I have to do is to modify boot.ini and change multi(0)disk(0)rdisk(0)partition(2) to multi(0)disk(0)rdisk(0)partition(4). There was one problem, that the file resided on a NTFS file system. Linux has readonly access by default.

Eeeek, but then I remembered that there is something new out there ntfs-3g that can mount read/write a NTFS file system.

I've searched the net and found that I had to install fuse, fuse-ntfsprogs and ntfs-3g packages. The first two came with openSuSE 10.2, the latter from GURU 3rd party repository. GURU had a ntfs-3g version from 20061115, which was too old for fuse 2.6.0 that came with openSuSE 10.2. Eeeek.

The solution was to get the latest and greatest sources and the RPM spec files from fuse and ntfs-3g to create my own rpm packages.

I've got fuse 2.6.1 and ntfs-3g 20061218, after hacking the RPM spec files I've managed to create two nice rpm packages. The problem was that the command ntfs-3g /dev/hda1 /windows/C was still failing. Eeeek again.

The problem was with the fuse kernel module, it was too old. openSuSE 10.2 fuse spec file didn't create a kernel module because kernel included the fuse module. I've hacked fuse RPM spec file to --enable-kernel-module, all nice until the very last step when the packages were to be created. Because fuse.ko module was still in RPM's database, RPM could not create a new module that contained fuse.ko because of some incompatibilities later on. Tired of eeeking.

Solution was to copy the new fuse.ko module and store it somewhere, then put back --disable-kernel-module in fuse RPM spec and run a rpmbuild -ba fuse.spec. Then I've copied fuse.ko over the one from /lib/modules/linux-2.6.18.../kernel/fs/fuse/fuse.ko.
After installing fuse and fuse-devel packages I've build ntfs-3g package, installed it and the command: ntfs-3g /dev/hda1 /windows/C was working!

In order to always mount read/write I've modified /etc/fstab and instead of ntfs I've put ntfs-3g and removed the ro (read only) flag from the next option on the same line.

After modifying boot.ini and a reboot I got my Windows XP back!

In conclusion, I like openSuSE they didn't made all the things easy, most of them are easy but some issues are still to be fixed, like the one above. One can say that this is the price to pay for bleeding edge software, but every now and then it's fun to hack something, to remember the good old days of hacking Slackware to do the things you wanted.

2006-12-03

The DaVinci Code

I've just finished reading The DaVinci Code by Dan Brown. I've done this after watching the movie twice, at the cinema and the director's cut on my computer.

I've enjoyed the book more, in the movie they've made some hacks to keep the plot on the feet.

If you haven't read the book please do so ;)

2006-11-05

Winter


Winter came too soon this year, I mean it's just 5 November! and the picture was taken in the morning.

2006-08-02

DVB-T Modulator

Recently I've got to play with Fabrice Bellard's low cost analog and digital tv modulator.

It took me a while to get it working, it didn't work with nvidia cards so I've tested a ATI Radeon 9200, like Fabrice mentiones on his webpage. What Fabrice doesn't say is that you need to use "radeon" driver, not vesa, not ati.

I've used a Pinnacle 320e receiver, which can scan the two DVB-T channels but no preview.

That was sad, I was expecting it to work, but now that it doesn't work, how to debug it? you can't, Fabrice didn't publish the source code.

2006-04-29

2006-04-04

MSDN

As a C++ programmer when you want to use MSDN just for C++ and STL the filter "Visual C++" is not helping. You get all sort of matches but not the ones you need.

You need to filter just the right stuff. You need to go to Help->Edit Filters and create a new filter with these contents:
("DevLangVers" ="kbLangCPP") or ("TechnologyVers" ="kbSTL")

Now if you want to search for map, you'll get the right match.

2006-03-29

Windows XPE

I have just finished hacking my first Windows Live setup - I have accelerated video drivers, audio, I can see movies using ffdshow, Mozilla Firefox, Total Commander, Norton Ghost, DirectX.

I have used BartPE and Sherpya WinPe Stuff.

The hard part was getting NVidia drivers to work and then the sound drivers. Now I can say that I have a better undestanding of manual loading of drivers on Windows XP :)

Pretty nice stuff, but you have to work to get it working...

2006-03-17

Viewing CHM files from a Network Drive

This issue was bugging me for a long time, now I found out how to fix it.

All you need is this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions, with a DWORD entry MaxAllowedZone set to 1.

This was a side effect for a security patch from Microsoft.

2006-03-16

Root Power

Writing rootkits is fun. I needed to a device driver for Windows XP that could hide a process, disable keyboard and mouse and hide directories, these are some definitions for a rootkit.

There are some inconveniences, like resetting the operating system because you did something wrong... things don't work like in userland.

Tools like Compuware VToolsD (for Windows 9x) and Compuware Driver Studio (for Windows NT+) make your life way easier. For the first you don't have to write code in assembler, you can write code in C and C++ and for the latter you can write code in C++.

I guess my next root kit, after the one for Windows 9x and the one for Windows XP, would be for Linux, but on Linux having access to the source code of the operating system is a big bonus.

In the end it's not that hard, with proper tools and with proper knowledge you can do anything :-)

2006-03-10

Tarom

And now for my fist blog photo...

Brainbench

I've taken some Brainbench tests, now I have more than "Typing Speed & Accuracy" results :) Here is my public transcript.

And now for some pictures:

2006-01-14

xterm fonts and colours

The default settings for xterm in OpenSUSE 10 are crappy, the font is small, white background, black foreground... yucky.

Ok, it's not that obvious to configure X applications, they don't have menus, dialog boxes like the KDE applications. You have to edit ~/.Xresources and add some lines and then run xrdb ~/.Xresources (you can use -merge to merge the settings). You can find out what lines to add to ~/.Xresources by having a look at /user/X11R6/lib/X11/app-defaults/XTerm and by consulting the manual page (man xterm).

Here is what my ~/.Xresources file contains:
xterm*background: black
xterm*foreground: white
xterm*faceName: Andale Mono
xterm*faceSize: 9
xterm*geometry: 100x30
I usually use konsole, but some applications open xterm for shell access. SlickEdit is one of those applications ;)