.htaccess: an example of the Apache per-directory configuration file
Using bloxsom as my weblog designing application, I had to provide some settings to the Apache
.htaccessconfiguration file to fine-tune the usage of my site:
- tell Apache to load
index.cgiin addition to the default
- rewrite the requested address adding
www.if it's omitted
- rewrite the requested address adding
index.cgiif it's omitted
- and for bandwidth reduction, forbid robots from crawling some pages
Running Windows XP in Xen from its own partition
Some months ago I made some experiments with Xen and I succeeded to install and run Windows XP as a guest using Xen 3.0. In that case Windows was located in a single file and was installed through Xen. My purpose now is to make Xen running an already installed Windows from its own partition. Just to be more specific, this is my machine configuration:
- Ubuntu Dapper Drake 6.06 is located on a SATA disk, set as first boot disk
- Windows XP is located on a EIDE disk, set as second boot disk
- Dual boot is made by grub
- Making a flat surface
- Installing - ouch, it's not compatible with some MSI K9N Platinum
Recover "Logical sector size is 0" with dd
A few hours ago while I was using my pc suddenly Windows froze completely (mouse was stuck and Ctrl+Alt+Del did nothing). It's not astonishing but I was quite surprised because such a freeze never happened since I began using Windows XP on my new pc.
The problem appeared at the reboot:
grub, the bootloader on /dev/sda, showed this error message:
At reboot I started Windows XP Recovery Console from the Windows CD and tried
CHKDSK.EXE, and this was the outcome:
I booted again linux to launch
fsckand see it fail:
Then I found the solution in ubuntu forum:
root@am2:/home/z24# dd if=/dev/hda1 of=/defmedia/bkup_fat32_hda1.img bs=512 count=2048000 conv=noerror,sync 2048000+0 records in 2048000+0 records out 1048576000 bytes (1.0 GB) copied, 43.61 seconds, 24.0 MB/s root@am2:/home/z24# dd if=/defmedia/bkup_fat32_hda1.img of=/home/z24/sector6.bin bs=512 count=1 skip=6 conv=noerror,sync 1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.011544 seconds, 44.4 kB/s root@am2:/home/z24# dd if=/home/z24/sector6.bin of=/dev/hda1 bs=512 count=1 conv=noerror,sync,notrunc 1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.030644 seconds, 16.7 kB/sExplanation:
- the first dd makes a backup of the first gigabyte of the Windows partition: I copied 1 GB only because I didn't have enough space on a ext2fs to backup all the 28 GB of /dev/hda1.
- the second dd extracts the sixth sector to a temporary file: as reported by Microsoft KB247575, "The backup FAT32 boot sector is located at sector 6 of the logical drive".
- the third
ddcopies the extracted sector 6 to sector 0 of /dev/hda1.
ddwas also checked with
mount. Thanks a lot to the ubuntuforums user Onlymee for his post!
Update 13.09.2008The same problem happened again today and gave me the opportunity to complete the series of error messages :)
The first, at boot time, was the same: Mounting the partition (
mount -t vfat /dev/sda1 /mnt):
dmesg | grep sda1But
fdisk -l /dev/sdashows the partition table.
fsck.vfat /dev/sda1(executed from Ubuntu 8.04 alternate cd) The solution was exactly the same: copy the sixth sector back to the first. And voilà, it booted.
Mounting a second fan on the back of the case (Antec SLK3000B)
With the summer approaching, I am making some experiments trying to cool my pc as much as possible while keeping it quiet. Now, airflow in the case is made by 2 fans: the intake fan, a Papst 4412 F/2GLL, pulls air inside the case from the front, the exhaust fan, a Antec Tricool coming with the SLK3000B, pushes air out to the back; in addition, the psu fan pulls air from the top of the motherboard through the psu to the back.
Since I bought a second Papst 4412 F/2GLL, I tried positioning this fan in different locations to see which one conributes the best to the cooling. One of these is the back of the case, in the bottom, where there would be additional cards: it pushes air out of the case through the back slots.
Hard disk suspension in an Antec SLK3000B
The main problem of the Antec SLK3000B case is it converts hard disk vibrations to noise, and this is the most annoying noise coming from my pc when the fans are set at the lowest speed. In the SLK3000B the hard disks lay in a cage with grommets that are supposed to dampen the vibrations of the 7200 and more rpm hard disks.
The trend spreading amongst silencing modders is to suspend the hard disks in the air to avoid contact between the case and the hard disks.
License: freeware for private use
Author: Karl Maloszek
Size: 250 KBytes (114 KBytes installer)
Requirement: Windows with COM support
Panorado Flyer is a compact program that gathers GPS coordinates from Google Earth and writes them into images EXIF information.
I'll try to answer these questions:
- What is AMD Cool'n'Quiet?
- Does it really work?
Blosxom: How to insert a fixed path for images in Blosxom
I wrote some post on my new site created with Blosxom and I wanted to insert some images that I put in a directory called
images under my website address root.
I found different solutions:
WAMP & Perl - Windows Apache, MySQL, PHP with CGI scripts written in Perl
I need Perl to run Blosxom, an open source and free CGI script to create blogs.
So I installed WAMP5 1.6.4a and ActivePerl 18.104.22.1687 with MSI installer.
I already have my site on my disk, so I told my site directory to WAMP during the setup procedure and then I pointed my browser to http://localhost/index.cgi but it displayed the cgi instead of executing it.
This is what I did to make it work:
Install and boot Windows on a second hard disk
I have a SATA disk and a EIDE disk, I installed Linux on the SATA disk and now I want to install Windows on the EIDE disk.
Because Windows must be installed on the disk that boot first, I entered BIOS and changed the boot order as this:
Then I installed Windows on the EIDE disk.
I want to configure dual boot this way:
- default choice: Linux (booting from SATA disk)
- second choice: Windows (booting from EIDE disk)
/boot/grub/menu.list(on Ubuntu or Debian; if grub is not installed try apt-get install grub):
title WinXP map (hd0,0) (hd1,0) map (hd1,0) (hd0,0) rootnoverify (hd1,0) chainloader +1That means Windows believes the EIDE disk is the first and SATA is the second, so it's happy and if I reboot and choose WinXP from grub menu it starts.