Saturday, June 4, 2011

NTFS vs FAT

To NTFS or not to NTFS—that is the question. But unlike the deeper questions of life, this one isn't really all that hard to answer. For most users running Windows XP, NTFS is the obvious choice. It's more powerful and offers security advantages not found in the other file systems. But let's go over the differences among the files systems so we're all clear about the choice. There are essentially three different file systems available in Windows XP: FAT16, short for File Allocation Table, FAT32, and NTFS, short for NT File System.

FAT16
The FAT16 file system was introduced way back with MS–DOS in 1981, and it's showing its age. It was designed originally to handle files on a floppy drive, and has had minor modifications over the years so it can handle hard disks, and even file names longer than the original limitation of 8.3 characters, but it's still the lowest common denominator. The biggest advantage of FAT16 is that it is compatible across a wide variety of operating systems, including Windows 95/98/Me, OS/2, Linux, and some versions of UNIX. The biggest problem of FAT16 is that it has a fixed maximum number of clusters per partition, so as hard disks get bigger and bigger, the size of each cluster has to get larger. In a 2–GB partition, each cluster is 32 kilobytes, meaning that even the smallest file on the partition will take up 32 KB of space. FAT16 also doesn't support compression, encryption, or advanced security using access control lists.
FAT32
The FAT32 file system, originally introduced in Windows 95 Service Pack 2, is really just an extension of the original FAT16 file system that provides for a much larger number of clusters per partition. As such, it greatly improves the overall disk utilization when compared to a FAT16 file system. However, FAT32 shares all of the other limitations of FAT16, and adds an important additional limitation—many operating systems that can recognize FAT16 will not work with FAT32—most notably Windows NT, but also Linux and UNIX as well. Now this isn't a problem if you're running FAT32 on a Windows XP computer and sharing your drive out to other computers on your network—they don't need to know (and generally don't really care) what your underlying file system is.

The Advantages of NTFS
The NTFS file system, introduced with first version of Windows NT, is a completely different file system from FAT. It provides for greatly increased security, file–by–file compression, quotas, and even encryption. It is the default file system for new installations of Windows XP, and if you're doing an upgrade from a previous version of Windows, you'll be asked if you want to convert your existing file systems to NTFS. Don't worry. If you've already upgraded to Windows XP and didn't do the conversion then, it's not a problem. You can convert FAT16 or FAT32 volumes to NTFS at any point. Just remember that you can't easily go back to FAT or FAT32 (without reformatting the drive or partition), not that I think you'll want to.
The NTFS file system is generally not compatible with other operating systems installed on the same computer, nor is it available when you've booted a computer from a floppy disk. For this reason, many system administrators, myself included, used to recommend that users format at least a small partition at the beginning of their main hard disk as FAT. This partition provided a place to store emergency recovery tools or special drivers needed for reinstallation, and was a mechanism for digging yourself out of the hole you'd just dug into. But with the enhanced recovery abilities built into Windows XP (more on that in a future column), I don't think it's necessary or desirable to create that initial FAT partition.

Windows Password Files Torn Apart

All, Windows, users would probably be familiar with the infamous ‘pwl’ files or the files where the Windows login passwords are stored. Well, this manual is aimed at, simplifying how the authentication works when you type in your User name And password, what exactly .pwl files contain, where exactly they come into the picture and a whole lot of related things.

The *.pwl files are basically files in which the Windows Login Passwords are stored in. These files can be found in the \Windows directory by the name of the User, whose password it contains. For Example, if your Windows login Username is ankit, then the corresponding password would be stored in c:\windows\ankit.pwl Get it? These .pwl files are readable in any text editor like Notepad, but they are definitely not understandable. A typical example, of the contents of a .pwl file is as follows:

ã‚...-
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿR

p u.ÐX+|rÐq"±/2³ Êå¡hCJ‚D × `ÍY¥!íx}(qW¤ãƱ
#include

typedef struct tagPASSWORD_CACHE_ENTRY {
WORD cbEntry; // size of this entry, in bytes
WORD cbResource; // size of resource name, in bytes
WORD cbPassword; // size of password, in bytes
BYTE iEntry; // entry index
BYTE nType; // type of entry
BYTE abResource[1]; // start of resource name
// password immediately follows resource name
} PASSWORD_CACHE_ENTRY;

char *buf, *ob1;
int cnt = 0;

BOOL CALLBACK pce(PASSWORD_CACHE_ENTRY *x, DWORD)
{
cnt++;
memmove(buf, x->abResource, x->cbResource);
buf[x->cbResource] = 0;
CharToOem(buf, ob1); // for non-English users
printf("%-30s : ", ob1);

memmove(buf, x->abResource+x->cbResource, x->cbPassword);
buf[x->cbPassword] = 0;
CharToOem(buf, ob1);
printf("%s\n", ob1);

return TRUE;
}

void main()
{
buf = new char[1024];
ob1 = new char[1024];
puts("There is no security in this crazy world!\n"
"Win95 PWL viewer v1.01 (c) 1997, 98 Vitas Ramanchauskas\n"
"************\n"
"!DISCLAIMER!\n"
"!This program intended to be used for legal purpose only!\n"
"************\n\n"
"This program shows cached passwords using standard (but undocumented)\n"
"Windows API on local machine for current user (user must be logged in).\n"
"You may invoke pwlview in this way: pwlview >> textfile.txt\n"
"to save passwords in file (don't forget to press enter twice)\n"
"Press Enter to begin...\n");
getchar();

HINSTANCE hi = LoadLibrary("mpr.dll");
if(!hi)
{
puts("Couldn't load mpr.dll. This program is for Windows 95 only");
return;
}
WORD (__stdcall *enp)(LPSTR, WORD, BYTE, void*, DWORD) =
(WORD (__stdcall *)(LPSTR, WORD, BYTE, void*, DWORD))GetProcAddress(hi, "WNetEnumCachedPasswords");
if(!enp)
{
puts("Couldn't import function. This program is for Windows 95 only");
return;
}
(*enp)(0,0, 0xff, pce, 0);
if(!cnt)
puts("No passwords found.\n"
"Probably password caching was not used or user is not logged in.");
FreeLibrary(hi);
puts("\nPress Enter to quit");
getchar();

Create A Password Reset Disk

Here's an important tip… If you are using a password protected user account in Windows XP (and you really, really should be ) you might be nervous about forgetting your password. Well here's a way to put your mind at ease, at least a little bit. Windows XP allows users to create a password reset disk specific to their user account. This disk can be used at the welcome screen to reset your password in the event that you do forget it.
To create the disk:
Go to start\control panel\user accounts. Select the account you are currently logged in as. Under the 'related tasks' heading in the top left corner, click 'prevent a forgotten password' to open the forgotten password wizard. Insert a blank floppy disk and follow the instructions to create your password reset disk.
To use the password reset disk in case of emergency:
Once you have created a password reset disk for a specific user, the next time the password for that user is entered incorrectly at the welcome screen, a message will pop up asking if you have forgotten your password. At this point you can elect to use your password reset disk. Follow the instructions to reset your password.
Note: There are a couple of possible problems with the above procedure. For one, if you have used Windows XP's built in encryption feature to encrypt some of your files and folders, but have not yet updated to service pack 1, do not reset your password, as you will lose access to all the encrypted data. Once you have got service pack 1, it is safe to use the disk. Also, you cannot gain access to the reset feature if you have disabled the welcome screen on XP by using tip #31 above.
Keep your reset disk in a safe location, because anyone else can also use it to reset your password...

Use Your Computer Hard Disc As RAM

Everybody knows how costly is to buy a new RAM. SO, in order to get almost equal performance, we can also use some memory from our Hard Disc as virtual memory, which acts as a substitute to RAM. Follow the simple steps stated below to do so....
1. Right Click on My Computer & go to Properties
2. Click on Advanced Tab & go to Settings in the Performance Section.
3. Select the next "Advanced" Tab on the "Performance Options" window. On the advanced tab, click the "Change" button in the "Virtual memory" section.
4. Comprehend the implications of the virtual memory settings. On the "Virtual Memory" window, the "initial size" is the minimum amount of hard drive space Windows will allocate to virtual memory. The "maximum size" is the largest size to which Windows will allow your virtual memory to grow. If you set this setting too low and Windows requires more virtual memory than the maximum, Windows will likely crash or freeze and you will need to reboot. Thus, you should select (or keep the selection as) "System managed size." By allowing Windows to manage the virtual memory, Windows will increase and decrease the size of the virtual memory as-needed. It is not recommended under any circumstances to select "No paging file" because this can cause system instability.

5. Choose your virtual memory settings. On the "Virtual Memory" screen, you may modify your virtual memory settings in accordance with Step 4. Once you have made your settings, click the "Set" button. Windows will ask you to reboot. Once you do, your virtual memory settings will be changed.

REPARTITION YOUR HARD DRIVE WITHOUT FORMATING IT

If you are logged in as an administrator, you can repartition your hard disk by using the Shrink feature in Disk Management. You can shrink an existing partition or volume to create unallocated disk space, from which you can create a new partition or volume. (Note that the terms partition and volume are often used interchangeably.)
  1. Open Computer Management by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Computer Management.‌ Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
  2. In the left pane, under Storage, click Disk Management.
  3. Right-click the volume you want to shrink, and then click Shrink Volume.
  4. Follow the instructions.

REPARTITION YOUR HARD DRIVE WITHOUT FORMATING IT FOR WINDOWS XP

Friends, this post is specifically for people who are using Windows XP and want to repartition their Hard Drives without formatting them. All the Windows 7 & Windows Vista users can do it in a simpler way using Disc Management tool. For more info. you can visit the link: Repartition your Hard Drive w/o formatting it.
For all XP users, here's the procedure:
When you buy a new computer, the hard drive partitions are usually already set up for you. If you put in a new hard drive, you need to decide on the partitioning at set up time. The problem with both of these situations is that things change. You may decide you don't want everything in one big partition for a variety of reasons, but Windows gives you no options for changing your partitions other than reformatting and losing all of your data. There are excellent programs, like Partition Magic, that will let you resize and create partitions without losing data. But Partition Magic costs around $60 and it isn't a program you are going to use everyday.
There is a way to change your partitions without reformatting and without buying any additional software.
It uses a Linux live CD to boot your computer and prepare for a Linux installation. Don’t worry; you are not actually going to install Linux. Every Linux CD includes a program to resize your Windows partition to make room for Linux because Windows usually takes up the whole hard drive. Once we create the space for Linux, we can actually format it as a Windows partition, either NTFS or FAT32.
First, you need to download the Linux live CD. I recommend Simply MEPIS 3.3, available here: http://iso.linuxquestions.org/distro.php?distro=11 . These directions will assume you are using Simply MEPIS. Download the ISO and burn it to a CD as an ISO image. Check your CD burning software for info on burning an ISO. Once you have your CD, you are ready to begin.
Before you start- it is recommended to do a disk clean up, get rid of unnecessary files and defragment your hard drive to create as much continuous free space as possible. If your drive is very fragmented, you may want to defragment twice.
WARNING- backup all important files. Although unlikely, it is possible to lose data. Even the programs like Partition Magic give you this warning.
Set your computer BIOS to boot from the CD drive as the first option. Most computers get into the BIOS by hitting the DELETE key during start up. The start up screen will usually tell you what to hit to enter set up. Look for something that deals with boot options; it is often under advanced bios options. Boot from the Simply MEPIS CD, choose the 2.6 option unless you have a CPU under 1Ghz. It will take a couple of minutes, but you will eventually have a sign in screen. Sign on as root with the password as root. It will boot to a red MEPIS Linux screen (actually running from the CD)




Click the K gear wheel (lower left). Move the mouse to System, File system, QTParted





Click on QTParted, that will open the program you are going to use.

Click on the drive you want to change. If you have only one drive, it will probably be /dev/hda. That will open a window with info about your hard drive. (My screen shot shows several partitions because I have Linux installed)




RIGHT click on the partition you want to resize and choose “RESIZE”. The free space will be created after the existing partition. Fill in the amount of free space you want. Remember to leave enough space on the existing partition for anything you may save in the future plus about 20% extra for free space. Then click OK.





No changes are being made to your hard drive yet, so you can change your mind. To make the change- click on FILE, the COMMIT.





The changes will be made to your hard drive. Click on your hard drive again in the left column. The free space should now show in the display in the right column. Right click on the free space, choose FORMAT, then either NTFS or FAT32. Click on FILE, COMMIT. The partition will be formatted as a Windows partition.

Shut down by clicking on the K gear wheel, logout, and restart.
Before it reboots, you will need to remove the MEPIS CD, it should now reboot to Windows, your computer will probably give you a message about new hardware being found and require you to reboot one more time. The new partition should now show up and be fully usable.

Understand (and Get Rid of) the Mysterious Small Partition

If you install Windows 7 on a clean disk with no existing partitions, it creates a System Reserved partition at the beginning of the disk and uses the remainder of the unallocated space to create your system drive.That small partition isn’t assigned a drive letter, so you won’t even know it exists unless you look in the Disk Management console or use a low-level utility, such as Diskpart, to inspect the disk structure.

This “stub” of a partition, which is new in Windows 7, serves two functions. First, it holds the Boot Manager code and the Boot Configuration Database. Sec¬ond, it reserves space for the startup files required by the BitLocker Drive Encryption feature. If you ever decide to encrypt your system drive using BitLocker, you won’t have to repartition your system drive to make it possible.

If you’re confident you’ll never use BitLocker and prefer to do without the additional complexity of this System Reserved partition, your best bet is to make sure it’s never created. For a truly clean installation starting from an unformatted hard drive, you must use a different disk-management utility, such as the setup disk available from many hard-disk manufacturers or a startup disk from Windows Vista. Create a single primary partition using all unallocated space, and then point the installer to the newly created partition as the setup location. (Note that you cannot use the graphical disk-management tools available from the Windows 7 DVD to perform this task.) After you use the alternative tool to create a partition on the drive, you can point the Win¬dows 7 installer to that location and it will proceed.

If you’re comfortable with command-line disk management tools, you can use the Diskpart utility from the setup program to create the necessary partition. At the begin¬ning of setup, before you select the location where you want to install Windows:
  1. Press Shift+F10 to open a Command Prompt window
  2. Type diskpart to enter the Diskpart environment
  3. Assuming you have a single clean hard disk, use select disk 0 and create partition primary to manually create a new partition
  4. Proceed with the Windows 7 setup, using this new partition as the setup location