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.
Running PHP scripts from command-line with WAMP (Windows Apache, MySQL, PHP)
On my old pc I installed Apache, MySQL and PHP singularly, and I made some PHP scripts to be runned from command-line, like this:
c:\php\php -f myscript.phpOn my new pc I installed WAMP5 1.6.4, all was running fine (phpMyAdmin, my local website, php scripts pointed to by the browser) but php scripts launched by command-line reported
Fatal error: Call to undefined function mysql_connect() in myscript.phpObviously I changed the php path to
c:\wamp\php\phpbut with no results.
Solution: change the command to
c:\wamp\php\php -c c:\wamp\apache2\bin -f myscript.phpThe -c option tells php to search php.ini in the directory specified, and that's needed because WAMP puts php.ini in Apache bin directory, while with a PHP regular installation php.ini is located in the php.exe directory.
Pausing a command
How to pause / suspend / sleep a running command in a terminal?
How to resume the paused command?
Execute a command at shutdown
To dismount TrueCrypt volumes at shutdown and reboot time, I created a script, put it in
/etc/init.d/ and symlinked it into the needed
/etc/rc?.d/ directories using
Here is the detail:
How to rename multiple files from bash
Rename all *html files to *test:
for x in `ls *html`; do mv $x `echo $x | sed -e "s/html/test/"`; done
for var in some-list ; do command ; done
This blog is born in August 2006 and it's about computing science: software reviews, configurations, tutorials, howtoes, for both Windows and Linux, hardware reviews, problems and relative solutions, tips and tricks, and everything else I get through in my computing related life.
The name ComputingArt was born as a "Computing Articles" contraction, but as pointed out by my friend csdk, it reminds to "Computing Art".