|
1. Are you wondering if Windows XP Home with SP2 can be ghosted on to a 700MB CD?
It can be done, not so much by ghosting (a perfect replica of your system) but more as "slipstreaming" Windows XP with Service Pack 2 (SP2).
Slipstreaming integrates SP2 with your standard install CD on a brand new CD. There's a great step by step guide.
Things you will need.
1. Windows XP Professional CD 2. Service Pack 2.
Step 1
Open Windows Explorer and click Tools--> Folder Options Then click on the View tab. Show hidden files and folders radio button MUST be selected and hide protected operating system files MUST be unchecked.
Copy all of the contents of your windows CD to C:winxp
Step 2 Move the SP2 file you downloaded to a folder named C:winxp-sp2
Step 3
Click start --> Run C:XP-sp2XPSP2.exe -s:c:winxp
This will extract all of the files to a temp directory. After it is done extracting all of the files it will update all of the files on your windows CD for you.
**NOTE** If You're unable to get the instructions above to work then here's an alternate: (skip if above worked) 1.)C:XP-sp2XPSP2.exe -x 2.)You'll get a box asking you where you want to extract the data. 3.) Use C:XP-sp2 4.) Copy the C:XP-sp2i386 directory to c:winxp overwriting the old i386 directory
Step 4 In order to make this new CD bootable we'll need to pull out ISOBuster . when you open the app select which drive your CD is in and browse to where it says bootable CD. Then you'll see the files listed below. The one you need is the MS Corp one. Right click on it. and select extract. Save it to a folder called C:winxp-boot. That's all we need from ISObuster.
Step 5
Burn baby burn!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EZ CD 5
File --> New CD --> Bootable CD
On that screen set bootable CD type to no emulation Load Segment to 0x7c0 Sector Count to 4 Click Browse Browse to C:winxp bootMicrosoft Corporation.img Click on open
File --> CD Project Properties
The Volume Label MUST be set Win XP Pro should be WXPCCP_EN Win XP Home should be WXHCCP_EN Win XP Home OEM should be WXHOEM_EN Win XP Pro OEM should be WXPOEM_EN
File system must be ISO9660 Physical Format; Mode 1: CDROM
On the file types tab; Select Add all files Uncheck the Do not add boxes
Put all the files in and burn using disc at once.
Nero
File--> New then select boot cd
Under source of boot image data select image file and browse to the file C:winxp bootMicrosoft Corporation.img file Set kind of emulation to no emulation. Load segments to 07C0 Number of loaded sectors to 4
Switch to the ISO tab
This is where you set the Volume Lable Win XP Pro should be WXPCCP_EN Win XP Home should be WXHCCP_EN Win XP Home OEM should be WXHOEM_EN Win XP Pro OEM should be WXPOEM_EN
Select Burn and choose disc at once and put all the files in and BURN!
Download the (full) "Network Install" of the Service Pack (English version [266 MB]) from:
http://download.microsoft.com/download/1/6/5/165b076b-aaa9-443d-84f0-73cf11fdcdf8/WindowsXP-KB835935-SP2-ENU.exe
Download ISOBuster from:
http://www.smart-projects.net/isobuster/
2. WHAT IS HOTLINKING AND BANDWIDTH THEFT?
Bandwidth theft or "hotlinking" is direct linking to a website's files (images, video, etc.). An example would be using an <IMG> tag to display a JPEG image you found on someone else's web page so it will appear on your own site, journal, weblog, forum posting, etc.
Bandwidth refers to the amount of data transferred from a website to a user's computer. When you view a webpage, you are using that site's data transfer to display the files. Since web hosts charge based on the amount of data transferred, bandwidth is an issue. If a site is over it's monthly bandwidth, it's billed for the extra data or taken offline.
A simple analogy for bandwidth theft: Imagine a random stranger plugging into your electrical outlets, using your electricity without your consent, and you paying for it.
HOW DO I KNOW I'M HOTLINKING?
Think about how you display an image graphic in HTML on your web page:
<IMG src="image.jpg" height="350" width="200">
This tag tells the site to request the image.jpg file from the same server as the rest of the site. But if you were to hotlink an image from an outside server it might look like this:
<IMG src="http://notmysite.com/image.jpg" height="350" width="200">
Every time the page is loaded, the outside server has to use it's bandwidth to display the image. To avoid this problem, don't link to files on servers that don't belong to you. To share images and files on your own web page, upload them to your own server or to one of the many free website providers.
WHY SHOULD I STOP HOTLINKING?
Hotlinking can have a lot of undesirable consequences. One outcome is the so-called "switcheroo". If you've linked to an image on someone's server, what's to prevent them from changing the image you linked to? This can have humorous results. Since most sites, forums, etc. have strict policies about offensive images, it wouldn't take much for an aggravated webmaster you've been stealing bandwidth from to shut you down completely with an unwanted "switcheroo".
Displaying an image or file that doesn't belong to you is often a violation of copyright, making you open to litigation. The owner of the copyright could utilize DMCA law to have your site shut down and your information given for use in legal proceedings.
3. Understanding "grub.conf" file of Linux.
GRUB (GRand Unified Bootloader)
Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to an operating system kernel software (such as Linux). The kernel, in turn, initializes the rest of the operating system (e.g. a GNU system). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
default=0 timeout=30 splashimage=(hd0,2)/grub/splash.xpm.gz
title GNU/Linux Fedora Core 1 (2.4.22-1.2188.nptl) root (hd0,2) kernel /vmlinuz-2.4.22-1.2188.nptl ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi apm=off acpi=on vga=788 initrd /initrd-2.4.22-1.2188.nptl.img
#title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl) #root (hd0,2) #kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb #initrd /initrd-2.4.22-1.2174.nptl.img
title GNU/Linux Mandrake 9.2 kernel (hd0,6)/vmlinuz root=/dev/hda8 devfs=mount hdc=ide-scsi resume=/dev/hda9 initrd (hd0,6)/initrd.img
title Microsoft Windows 98 SE & XP Pro rootnoverify (hd0,0) chainloader +1
List of commands,
default=0 My default boot system is, of course, Fedora.
timeout=30 Fedora will boot in 30 seconds if you don't touch anything.
splashimage=(hd0,2)/grub/splash.xpm.gz Generally the splash image is in your /boot partition. In my case, hd0,2 is where I have the image.
title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl) The name of your OS that will appear in your menu at starup, you can write anything you want.
root (hd0,2) This is your /boot partition specifies which partition contains your Linux kernel image. So "root (hd0,2) tells GRUB that the kernel is on the 3rd primary partition of my first hard disk (I have two), in my case (hd0,2).
kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb Tells GRUB where to find your kernel, my kernel version is 2.4.22-1.2174, you have to type your kernel version.
rhgb Red Hat Graphical Boot
apm=off acpi=on I had to add 'apm=off acpi=on' to my kernel parameters to get power-off to work properly.
initrd /initrd-2.4.22-1.2174.nptl.img Tells where your init ramdisk image is located.
title Microsoft Windows 98 SE & XP Pro As I said, I have Windows 98 in hd0,0 and Windows XP in (hd0,1).
rootnoverify (hd0,0) rootnoverify tells GRUB to boot from the Windows partition, but not to attempt to mount it. (hd0,0) is where Windows XP puts the boot.ini to boot into Windows 98 and XP.
chainloader +1 chain-load is the mechanism for loading unsupported operating systems by loading another boot loader. It is typically used for loading DOS or Windows. chainloader tells GRUB to chain to Windows' boot loader which will start Windows.
Other options you can use:
map If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one.
Map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive. Here is an example:
grub> map (hd0) (hd1) grub> map (hd1) (hd0)
This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.
makeactive Set the active partition on the root disk to GRUB's root device. This command is limited to primary PC partitions on a hard disk.
Code:
title Windows 98 SE
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
rootnoverify (hd1,0)
chainloader +1
hide Hide the partition partition by setting the hidden bit in its partition type code. This is useful only when booting DOS or Windows and multiple primary FAT partitions exist in one disk.
unhide Unhide the partition partition by clearing the hidden bit in its partition type code. This is useful only when booting DOS or Windows and multiple primary partitions exist in one disk.
Explanation and examples of the hide and unhide commands
If you installed more than one set of DOS/Windows onto one disk, they could be confused if there are more than one primary partitions for DOS/Windows. There is a solution if you do want to do so. Use the partition hiding/unhiding technique.
If GRUB hides a DOS (or Windows) partition, DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition, DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition.
Here's how to create two installations of Windows, hda1 and hda2 or (hd0,0) and (hd0,1), using the commands hide and unhide.
For Windows 98 SE "My Entry":
Code: title My Entry
unhide (hd0,0)
hide (hd0,1)
rootnoverify (hd0,0)
makeactive
chainloader +1
For Windows 98 SE "Family Entry"
Code: title Family Entry
unhide (hd0,1)
hide (hd0,0)
rootnoverify (hd0,1)
makeactive
chainloader +1
I did not have to use the 'hide' or 'unhide' command 'cause Windows XP, 2000 or NT have a boot manager (boot.ini) included. So, I only had to point where this boot.ini is. In my case, Windows XP copies this boot.ini where Windows 98 is installed, (hd0,0) You should definitely use the 'hide' or 'unhide' command if you have,for example, two installations of Windows 98 or ME.
If everything went just fine, voila, GRUB now becomes your main boot manager for your multi OS system.
GRUB and Linux Partitions
First of all, GRUB requires that the device name be enclosed with ( ). Please, note that the partition numbers are counted from zero, not from one.
(hd0) in GRUB = is hda in Linux Here, 'hd' means it is a hard disk drive. The first integer '0' indicates the drive number, that is, the first hard disk.
(hd1) in GRUB = is hdb in Linux The first integer '1' indicates the drive number, that is, the second hard disk.
(hd0,1) in GRUB = is hda2 in Linux This expression means the second primary partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk.
(hd0,4) in GRUB = hda5 in Linux This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from '4', regardless of the actual number of primary partitions on your hard disk.
(hd0,5) in GRUB = hda6 in Linux This is the first logical unit of the extended partition of the the first hard disk.
(hd1,0) in GRUB = is hdb1 in Linux This is the first primary partition of the second hard disk.
4. Understanding NTFS and mounting NTFS in Linux ( How to read/write to NTFS ).
What is NTFS?
NTFS is an abbreviation for New Technology Filesystem. NT because it was originally used in Windows NT and a filesystem is just how the computer stores files on disk. Different operating system, stores files in different ways.
NTFS is used by Windows NT, 2000, XP and Windows Server 2003
Versions of NTFS:
They will look similar, but newer versions have extra features. For example, Windows 2000 has quotas.
| NTFS |
Windows Version |
| v1.2 |
NT 3.51, NT 4 |
| v3.0 |
2000 |
| v3.1 |
XP, Server 2003 |
Version 1.2 is sometimes known as 4.0. Versions 3.0 and 3.1 are sometimes referred to as 5.0 and 5.1.
NTFS's limits:
BIG. NTFS supports files up to 263 bytes in size. NTFS Volumes can be up to 263 clusters and each cluster can be up to 64KiB long. This gives NTFS an upper limit of approximately 500 trillion gigabytes.
Which versions of NTFS can Linux read:
The Linux Driver can read all the versions of NTFS. Each version is slightly different, but the driver only has to interpret the files and directories. All the indexes that NTFS maintains can be safely ignored.
When the driver becomes able to write to an NTFS Volume, then it may be that the abilities will vary according to the version of NTFS it is writing to.
How to mount NTFS in Linux:
1. Login as root by running from a terminal su followed by typing the root password.
2. Create a directory in your /mnt folder. This can be done by running mkdir /mnt/windir where windir is the name of the directory where the NTFS partition will be mounted.
3. Run fdisk -l and note the name of the device file for the NTFS partition. Lets say the device file name is found to be /dev/Y.
4. Open the file /etc/fstab.
5. On a new line at the bottom of the file, add the line:
/dev/Y /mnt/windir ntfs users,owner,ro,umask=000 0 0
6. Save and quit the file /etc/fstab
7. Then run mount -a and the NTFS partition will be mounted. It will also be mounted automatically after reboot so that you do not have to do anything after you reboot.
This will allow all users READ ONLY access to the NTFS partition. Write access to NTFS partitions is very risky.
Why Write access is risky?:
There are two drivers, currently. The original driver, in 2.4 has some write code in it, but it is extremely dangerous to use it. The possibility of destroying your filesystem is very high.
The new driver, introduced in 2.5.11, has some write code, but it's very limited. The driver can overwrite existing files, but it cannot change the length, add new or delete existing files.
Adding write support will take a long time. NTFS is built like a database. Any changes you make, necessitate making changes in many places, for consistency. Make a mistake and the filesystem will be damaged, make too many mistakes and the filesystem will be destroyed. Also, the current developers are only working on NTFS as a hobby, during their free time.
So here I'm not providing help to mount NTFS for writing.
5. JAR file creation.
All JAR files contain something called a manifest file which holds information Java wants to know. One piece of information a manifest file may contain is the name of a class that will be run if the JAR file is executed.
There are different ways to create a JAR. Here I'm describing a simple and effective way.
The first thing you must do is create a text file that lists the "main" class - the class that has the main method you want executed when the JAR is executed. Lets create the mainfest file:
Type these lines in a text file:
Manifest-Version: 1.2 Main-Class: ClassName Created-By: Rahat
Now lets talk about different parts of the mainfest file:
First line: put any version number you want. Second line: here type exactly the name of the file that contains the main function. DONT use the file extension like ClassName.java Third line: you can use any name.
Save the file as "mainfest". Note that the file has no extension!!!
compile all the java classes. you might use the command: " javac *.java " to compile. Now we are ready to create the JAR file.
Command to create the JAR:
jar cvfm ClassName.jar mymanifest ClassName.class ClassName$1.class ClassName$2.class
There in the red portions type the name of the class that contains the main function.
I used "cvfm" option with the command. It means create new archive + generate verbose output on standard output + specify archive file name + do not create a manifest file for the entries Puzzled? dont worry. here is a list of options that you can use while creating JARs:
- c create new archive - t list table of contents for archive - x extract named (or all) files from archive - u update existing archive - v generate verbose output on standard output - f specify archive file name - m include manifest information from specified manifest file - 0 store only; use no ZIP compression - M do not create a manifest file for the entries - i generate index information for the specified jar files - C change to the specified directory and include the following file
Multiple options can be used together. They all must appear after the "jar" command with no white space separating them.
To run the JAR use the command:
java -jar ClassName.jar
|