Monday, 6 October 2008

Windows Floppy dependant

Without floppy drive, Windows cannot be installed on SCSI, SATA or RAID. Not like most Linux can detect all kinds of HDD immediately.

Even for Windows 98 or other lower version of Windows with IDE HDD, it still requires to have a floppy drive there for no reason. How crap it is!

NTLDR is missing

From http://www.computerhope.com/issues/ch000465.htm

It is so annoying when it happens and you will have to re-install Windows.

Here is some solution.

*********************************************************************************

Issue:
NTLDR is Missing.

Related errors:

Below are the full error messages that may be seen when the computer is booting.

NTLDR is Missing
Press any key to restart

Boot: Couldn't find NTLDR
Please insert another disk

NTLDR is missing
Press Ctrl Alt Del to Restart

Cause:
Computer is booting from a non-bootable source.
Computer hard disk drive is not properly setup in BIOS.
Corrupt NTLDR and/or NTDETECT.COM file.
Misconfiguration with the boot.ini file.
Attempting to upgrade from a Windows 95, 98, or ME computer that is using FAT32.
New hard disk drive being added.
Corrupt boot sector / master boot record.
Seriously corrupted version of Windows 2000 or Windows XP.
Loose or Faulty IDE/EIDE hard disk drive cable.
Solutions:

Computer is booting from a non-bootable source

Many times this error is caused when the computer is attempting to boot from a non-bootable floppy disk or CD-ROM. First verify that no floppy diskette is in the computer, unless you are attempting to boot from a diskette.

If you are attempting to boot from a floppy diskette and are receiving this error message it is likely that the diskette does not have all the necessary files and/or is corrupt.

If you are attempting to install Windows XP or Windows 2000 and are receiving this error message as the computer is booting verify that your computer BIOS has the proper boot settings. For example, if you are attempting to run the install from the CD-ROM make sure the CD-ROM is the first boot device, and not the hard disk drive.

Second, when the computer is booting you should receive the below prompt.

Press any key to boot from the CD

Important: When you see this message press any key such as the Enter key immediately, otherwise it will try booting from the hard drive and likely get the NTLDR error again.

Note: If you are not receiving the above message and your BIOS boot options are set properly it's also possible that your CD-ROM drive may not be booting from the CD-ROM properly. Verify the jumpers are set properly on the CD-ROM drive. Additional information about checking the CD-ROM drive connections can be found on document CH000213.

Additional information: This error has also been known to occur when a memory stick is in a card reader and the computer is attempting to boot from it. If you have any type of card reader or flash reader make sure that no memory stick is inside the computer.

Computer hard disk drive is not properly setup in BIOS

Verify that your computer hard disk drive is properly setup in the BIOS / CMOS setup. Improper settings can cause this error. Additional information on how to enter the BIOS / CMOS setup can be found in document CH000192.

Corrupt NTLDR and/or NTDETECT.COM file

Windows 2000 users
Windows XP users

Windows 2000 users

If your computer is using Microsoft Windows 2000 and you are encountering the NTLDR error. Create the below boot.ini file on the floppy diskette drive.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Professional" /fastdetect

Copy the NTLDR and NTDETECT.COM files from another computer using the same operating system. Both of these files are located in the root directory of the primary hard disk drive. For example, C:\NTLDR and C:\NTDETECT.COM should be the locations of these files on many computers.

Please keep in mind that these files are hidden system files, if you need additional help with viewing hidden files in Windows please see document CH000516.

Once these files have been copied to a floppy diskette reboot the computer and copy the NTLDR and NTDETECT.COM files to the root directory of the primary hard disk drive. Below is an example of what commonly should be performed from the A:\> drive.

copy ntldr c:
copy ntdetect.com c:

After the above two files have been copied, remove the floppy diskette and reboot the computer.

Windows XP users

Insert the Windows XP bootable CD into the computer.
When prompted to press any key to boot from the CD, press any key.
Once in the Windows XP setup menu press the "R" key to repair Windows.
Log into your Windows installation by pressing the "1" key and pressing enter.
You will then be prompted for your administrator password, enter that password.
Copy the below two files to the root directory of the primary hard disk. In the below example we are copying these files from the CD-ROM drive letter, which in this case is "e." This letter may be different on your computer.

copy e:\i386\ntldr c:\
copy e:\i386\ntdetect.com c:\


Once both of these files have been successfully copied, remove the CD from the computer and reboot.
Misconfiguration with the boot.ini file

Edit the boot.ini on the root directory of the hard disk drive and verify that it is pointing to the correct location of your Windows operating system and that the partitions are properly defined. Additional information about the boot.ini can be found on document CH000492.

Attempting to upgrade from a Windows 95, 98, or ME computer that is using FAT32

If you are getting this error message while you are attempting to upgrade to Windows 2000 or Windows XP from Windows 95, Windows 98, or Windows ME running FAT32 please try the below recommendations.

Boot the computer with a Windows 95, Windows 98 or Windows ME bootable diskette.
At the A:\> prompt type:

sys c:


After pressing enter you should receive the "System Transferred" message. Once this has been completed remove the floppy diskette and reboot the computer.
New hard disk drive being added

If you are attempting to add a new hard disk drive to the computer make sure that drive is a blank drive. Adding a new hard disk drive to a computer that already has Windows installed on it may cause the NTLDR error to occur.

If you are unsure if the new drive is blank or not try booting from a bootable diskette and format the new hard disk drive.

Corrupt boot sector / master boot record

It's possible your computer's hard disk drive may have a corrupt boot sector and/or master boot record. These can be repaired through the Microsoft Windows Recovery console by running the fixboot and fixmbr commands.

Additional information and help in getting into the Microsoft Windows Recovery console can be found on document CH000627.

Seriously corrupted version of Windows 2000 or Windows XP

If you have tried each of the above recommendations that apply to your situation and you continue to experience this issue it is possible you may have a seriously corrupted version of Microsoft Windows. Therefore we would recommend you reinstall Microsoft Windows 2000 and Windows XP.

If you are encountering this issue during your setup you may wish to completely erase your computer hard disk drive and all of its existing data and then install Microsoft Windows 2000 / Windows XP. Additional information about erasing the computer and starting over can be found on document CH000186.

Loose or Faulty IDE/EIDE hard disk drive cable

This issue has been known to be caused by a loose or fault IDE/EIDE cable. If the above recommendation does not resolve your issue and your computer hard disk drive is using an IDE or EIDE interface. Verify the computer hard disk drive cable is firmly connected by disconnected and reconnecting the cable.

If the issue continues it is also a possibility that the computer has a faulty cable, try replacing the hard disk drive cable with another cable and/or a new cable.

Additional information:
See our NTLDR dictionary definition for a complete definition on this term.

Wednesday, 27 August 2008

Windows Password Recovery

For some reason if you cannot log into the system as administrator, you may have to use one of the hacking tools.

Recently one of the PCs has its password changed and no one knows it, so I have to find a good tool to get it recovered.

The Windows stores the login information in two files under system32\config, which are SAM and system. You might not be able to get into Windows if you just have this account. You can use a bootable CD and copy these two files to another system. Then use the tool called 'Saminside' to get the password. This is the only software works for me so far.

Monday, 28 July 2008

nLite for SATA

Windows still fails to work with SATA or RAID adaptor without additional piece of driver. When you have a SATA or RAID in your PC it is a nightmare for Windows installation without a floppy drive. Linux can easily recognize the configured RAID or SATA without asking for extra driver.

nLite is a very good free tool for solving this problem by integrating the drivers into the installation CD. It is good to make Windows free from floppy drive.

But why MS Windows just cannot improve their products!

Tuesday, 15 July 2008

Ubuntu behind proxy server

Computer service department just cannot do anything right. Restricting people using Internet makes them feel that they are doing the job. Now I have to go through the proxy server to connect Ubuntu to the internet.

This link is useful. (http://ubuntuforums.org/showpost.php?p=3340662&postcount=25)

Install NTLMAPS first from http://packages.ubuntu.com/feisty/web/ntlmaps

Make some change of /etc/ntlmaps/server.cfg

1. Provide proxy IP for PARENT_PROXY
2. Give the right port number to PARENT_PROXY_PORT
3. Leave LISTEN_PORT: 5865
4. Under the [CLIENT_HEADER] section, comment out the first Accept and User-Agent part (Windows 9x, and then uncomment the next part (Windows 2000 emulation).
5. Fill in NT_HOSTNAME and NT_DOMAIN
6. Put the username in USER and password in PASSWORD
7. Restart ntlmaps: /etc/init.d/ntlmaps restart
8. Make a file: /etc/apt/apt.conf
Acquire::http::Proxy "http://127.0.0.1:5865";
9. Insert 8 into: System -> Preferences -> Network Proxy
10. In Synaptics: System -> Administration -> Synaptics -> Settings -> Preferences -> Network:
Manual proxy configuration: 127.0.0.1 port 5865 (no authentication)

Job done. Damn the ICT!

Thursday, 10 July 2008

Ubuntu Dialin

In work, I was asked to set up a dialin server.

Ubuntu 8.04 LTS, Hardy Heron, is the OS installed on the PC. Modem is USB modem MT5634ZBA from MultiTech.

Googled for help to set up the service, this is the one very useful, http://ubuntuforums.org/showthread.php?t=150339.

Install mgetty first.

Ubuntu does not have inittab any more, so in my case add this file under /etc does not work at all.

The usb modem is ttyACM0. Add a file called ttyACM0 under /etc/event.d and the contents are,

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

respawn /sbin/mgetty ttyS0

Then restart the service and it works!

For Ubuntu 10.04, there is no event.d any more.
Under /etc/init, create a new file called ttyACM0.conf and add following into this file.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/mgetty -n 2 ttyACM0

Start mgetty by "start ttyACM0".

Friday, 4 July 2008

Screen resolution

Original source: https://help.ubuntu.com/community/FixVideoResolutionHowto

Just installed the new version of Ubuntu, 8.04 LTS. The system only give 1024x768. To improve the resolution, I follow the instructions.

dpkg-reconfigure xserver-xorg does not work for me, so I go for the next solution.

Backup the /etc/X11/xorg.conf first. Then look for the section "Monitor". Google your monitor's HorizSync and VertRefresh, then add them into the file.

For example,

Section "Monitor"
Identifier "FLATRON 995F"
Option "DPMS"
HorizSync 30-96
VertRefresh 50-160
EndSection

By the way I found rdesktop is a quick cool tool under Linux which allows you to login the Windows system remotely. If you want to have the full screen, type
rdesktop -f ipaddress.

Wednesday, 18 June 2008

X Error: BadDevice, invalid or uninitialized input device 168

Original source

Seems a lot of users are getting the below errors when running applications from the console:

Code:

X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 148
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 148
Minor opcode: 3
Resource id: 0x0
Failed to open device


To fix this, look for the lines posted below, or similar to, and comment them out of your /etc/X11/xorg.conf file:

Code:

# Section "InputDevice"
# Driver "wacom"
# Identifier "stylus"
# Option "Device" "/dev/wacom" # Change to
# # /dev/input/event
# # for USB
# Option "Type" "stylus"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
#EndSection

#Section "InputDevice"
# Driver "wacom"
# Identifier "eraser"
# Option "Device" "/dev/wacom" # Change to
# # /dev/input/event
# # for USB
# Option "Type" "eraser"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
#EndSection

#Section "InputDevice"
# Driver "wacom"
# Identifier "cursor"
# Option "Device" "/dev/wacom" # Change to
# # /dev/input/event
# # for USB
# Option "Type" "cursor"
# Option "ForceDevice" "ISDV4" # Tablet PC ONLY
#EndSection


Then also a bit further down in the file you need to look for the below lines, or ones similar to these:

Code:

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
EndSection


**WARNING** If you fail to comment the lines below that are commented out, then X will *NOT* start when you go to restart the X server.

Once you comment those things out then a restart of X is needed. Once X is back up and running again you shouldn't see those errors anymore.

Wednesday, 11 June 2008

NFS installation Guide

A very good and detailed guide is https://help.ubuntu.com/community/SettingUpNFSHowTo

You can set up NFS following the guidance from the link above.

To simplify it, here is the steps:

1. Install NFS using apt-get or Synaptic Package Manager;

2. Add the IP and name of hosts into /etc/hosts;

3. Add the following line to /etc/hosts.deny:
portmap mountd nfsd statd lockd rquotad : ALL

4. Add the following line to /etc/hosts.allow:
portmap mountd nfsd statd lockd rquotad : list of IP addresses

5. Edit /etc/exports and add the shares:
/home 192.168.0.10(rw,sync,no_subtree_check) 192.168.0.11(rw,sync,no_subtree_check)
/usr/local 192.168.0.0/255.255.255.0(rw,sync,no_subtree_check)

The above shares /home and /usr/local to two clients with fixed ip addresses. Best used only with machines that have static ip addresses.

6. After setting up /etc/exports, export the shares:
sudo exportfs -ra

7. Restart Services
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-kernel-server restart


8. At NFS client, install portmap and nfs-common;

9. Add the following line to /etc/hosts.deny:
portmap : ALL

10. Add the following line to /etc/hosts.allow:
portmap : NFS server IP address

11. Mount the shared folder by:
sudo mount ServerIP:/folder/already/setup/to/be/shared /home/username/folder/in/your/local/computer

12. In /etc/fstab, add lines for shares such as:
servername:dir /mntpoint nfs rw,hard,intr 0 0

FreeNX

This is a remote desktop for Linux. There is a commercial version from www.nomachine.com and if you like a free version FreeNX is the choice.

Add following lines into /etc/apt/source.list

deb http://mirror.ubuntulinux.nl feisty-seveas freenx
deb-src http://mirror.ubuntulinux.nl feisty-seveas freenx

Add a link to solve the NX colour missing problem,

sudo ln -s /etc/X11/rgb.txt /usr/X11R6/lib/X11/

the nxagent application provided with FreeNX package searches for rgb.txt in an another location.
For more information about FreeNX, please refer to http://wiki.debian.org/freenx

Monday, 9 June 2008

Crontab Fails To Run Shell Script

The shell script runs fine under command window. When it is added into the crontab, it won't run at all.

The problem is that some environment variables won't be recognized in crontab file. To solve this, you can add the full path or add the environment variables into the script directly.

Wednesday, 4 June 2008

Error starting the GNOME Settings Daemon Using NX

Error message turns up when log into Ubuntu using nxclient.

"There was an error starting the GNOME Settings Daemon.

Some things, such as themes, sounds, or background settings may not work correctly.

The last error message was:

Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

GNOME will still try to restart the Settings Daemon next time you log in."

To fix this, at least temporarily, tick the box 'Enable multimedia support' in nxclient configuration.

Reboot Sun Workstation

In work, I have a few old Sun workstations. Some of them have poor HDD.

Sometimes they fail to boot up. Usually the booting stage won't be able to finish, so the screen stops at the middle of booting.

To fix this,

If you have a Sun keyboard, you can press 'Stop' + 'A'.

Then 'ok?' prompt will come up.

Type 'boot -s', so you can boot the system as single user.

Login as root and type 'fsck -y' to check and correct error on the HDD.

If this cannot fix the problem, probably you need to replace the hard drive.

Wednesday, 23 April 2008

Ubuntu Installation

Ubuntu is Debian-like Linux. You can use different setting/versions for your own purpose. From Ubuntu official website (http://www.ubuntu.com), you can choose Ubuntu (Gnome), Kubuntu (KDE), Xubuntu, and edubuntu.

You will also be able to choose whether you'd like to have a desktop version or server version etc.

Installation is quite simple.
1. Download the ISO file and burn it on a CD;
2. Boot the system up using the CD; (Set up the boot up sequence 'CD ROM' to be the first in BIOS if you have other OS installed)
3. Choose 'install Ubuntu' when it boots up and you will get into the Live CD mode;
4. Double Click the installation icon and follow the instructions you can have Ubuntu installed;
5. Reboot the system once the installation is finished;
6. Update the system by clicking the small icon on your up-right corner of the screen;
7. The first account you created during the installation can be acted as root when you need to install software or create new users;