Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Friday, May 29, 2009

Acceso remoto: Virtual Network Computing

TightVNC Software
TightVNC is a free remote control software package. With TightVNC, you can see the desktop of a remote machine and control it with your local mouse and keyboard, just like you would do it sitting in the front of that computer. TightVNC is:
  • free, GPL-licensed, with full source code available;
  • useful in remote administration, remote customer support, education, and for many other purposes;
  • cross-platform, available for Windows and Unix, compatible with other VNC software.

Announcements
[Mar 05, 2009] TightVNC 1.3.10 is available for download. This version fixes various bugs, includes a number of impovements and introduces a version of TightVNC for U3 flash drives. Read the complete announcement...

[Oct 23, 2008] TightProjector 1.1.0 is available for download. TightProjector is a solution for broadcasting the desktop of a Windows computer over the local-area network. Read more and/or download... (opens new window)

Download Now!
Visit the download page to get your free copy of TightVNC.

tightvnc-1.3.10-setup.exe (Windows executable)
tightvnc-1.3.10_javabin.zip Java (viewer only)

Recommended Add-ons

  • To achieve best performance under Windows 2000, Windows XP and above, download and install DFMirage mirror display driver (free download). TightVNC Server can use this driver to detect screen updates and grab pixel data in a very efficient way.


VNC -the original cross-platform remote control solution

Diagram of how VNC works across a network.

VNC is remote control software which allows you to view and fully interact with one computer desktop (the "VNC server") using a simple program (the "VNC viewer") on another computer desktop anywhere on the Internet. The two computers don't even have to be the same type, so for example you can use VNC to view a Windows Vista desktop at the office on a Linux or Mac computer at home. For ultimate simplicity, there is even a Java viewer, so that any desktop can be controlled remotely from within a browser without having to install software.
VNC is in widespread active use by many millions throughout industry, academia and privately. There are several versions to choose from, including a free version and some substantially enhanced commercial versions.
You can read more about how VNC can be used here.
VNC Free Edition for Windows XP-2003

Saturday, May 23, 2009

Windows Vista editions

Compare
Wikipedia Info

Development of Windows Vista

Microsoft began work on Windows Vista, known at the time by its codename Longhorn in May 2001, five months before the release of Windows XP. It was originally expected to ship sometime late in 2003 as a minor step between Windows XP and Blackcomb, which was planned to be the company's next major operating system release. Gradually, "Longhorn" assimilated many of the important new features and technologies slated for Blackcomb, resulting in the release date being pushed back several times. Many of Microsoft's developers were also re-tasked to build updates to Windows XP and Windows Server 2003 to strengthen security. Faced with ongoing delays and concerns about feature creep, Microsoft announced on August 27, 2004 that it had revised its plans. The original Longhorn, based on the Windows XP source code, was scrapped, and Longhorn's development started anew, building on the Windows Server 2003 Service Pack 1 codebase, and re-incorporating only the features that would be intended for an actual operating system release. Some previously announced features such as WinFS were dropped or postponed, and a new software development methodology called the Security Development Lifecycle was incorporated in an effort to address concerns with the security of the Windows codebase.

After Longhorn was named Windows Vista in July 2005, an unprecedented beta-test program was started, involving hundreds of thousands of volunteers and companies. In September of that year, Microsoft started releasing regular Community Technology Previews (CTP) to beta testers. The first of these was distributed at the 2005 Microsoft Professional Developers Conference, and was subsequently released to beta testers and Microsoft Developer Network subscribers. The builds that followed incorporated most of the planned features for the final product, as well as a number of changes to the user interface, based largely on feedback from beta testers. Windows Vista was deemed feature-complete with the release of the "February CTP", released on February 22, 2006, and much of the remainder of work between that build and the final release of the product focused on stability, performance, application and driver compatibility, and documentation. Beta 2, released in late May, was the first build to be made available to the general public through Microsoft's Customer Preview Program. It was downloaded by over five million people. Two release candidates followed in September and October, both of which were made available to a large number of users.

While Microsoft had originally hoped to have the consumer versions of the operating system available worldwide in time for Christmas 2006, it was announced in March 2006 that the release date would be pushed back to January 2007, in order to give the company–and the hardware and software companies which Microsoft depends on for providing device drivers–additional time to prepare. Development of Windows Vista came to an end when Microsoft announced that it had been finalized on November 8, 2006. Windows Vista cost Microsoft 6 billion dollars to develop.

Wednesday, May 20, 2009

SNAP RAID Recovery using SNAP OS

April 11, 2007 by Dick Correa
Filed under SNAP Server File System
SNAP Server NAS RAID Data Recovery

SNAP Appliance, now owned by Adaptec was one of the pioneers of the Network Attached Storage (NAS) technologies. Through the use of the Berkeley Software Distribution (BSD) and the UNIX File System (UFS), SNAP developed a reliable and easy method for using a mass storage device through a shared network. In order to do this SNAP used an abbreviated version of the file system in conjunction with a set of hard coded variables that allowed for a fast boot up, easier recovery facilities within the spectrum of the operating system, and a ROM based web interface that was closely tied to several of the standard UNIX/Linux/BSD recovery tools. However, that being said, when it came to catastrophic recovery this particular OS/FS marriage made it virtually impossible for any third party standard file system handler, or tool, to recover lost, or deleted data. The following is an outline of one of the basic data structures, the Super Block, and how it differs from the standard UFS file system. These differences are the ‘fly in the ointment’ when it comes to using standard UFS data recovery tools. Read my article on SCO Unix RAID Data Recovery for more insight on the UFS.

On-disk file system data structures are the key to data recovery. The knowledge of how a file system resides on the disk is the only way to recover from catastrophic data loss. Using on-disk data structures and their relationship with each other will help a recovery expert piece together lost data on a file system that will not mount. In essence, the data recovery technician creates a virtual file system using key data elements from the on-disk structure. These data elements go through a mathematical and geometrical scrutiny. This evaluation of the data must be strict enough to allow for corrupt data parsing, but flexible enough to build the file system from a partial data structure. In other words, a sort of ‘artificial intelligence’ is used to compare, evaluate, and assign data values to key data elements through the use of file system structure placement. A basic element of the file system in this particular case is the Super Block.

The Super Block is a broad spectrum definition of the entire file system. Although not defining file placement, and block usage, the Super Block is the crux of on-disk data element placement that will lead the data recovery technician to file name, inode definition, and ultimately data block placement. Data fields that reveal such values as total inodes, total data blocks, total cylinder groups, can be used to define a cohesive file system and in many cases rebuild a corrupted data structure. The Super Block defines coarse data that can be used to calculate cylinder group definitions that inevitably lead to directory definitions, and a methodology to build a file tree.

The Super Block is defined across the disk in each cylinder group. This fact alone can aide the trained data recovery technician in the alignment of the file system. Once aligned, it is a simple matter of back tracing directory name, inode definition, and data block in order to build a file tree. As an example the Super Block designates the primary inode block. When parsing the first cylinder group inode 0, and 1 are undefined and the 128 byte data elements are zeroed. However, inode 2 is defined, and can be traced to the root of the directory structure. Using recursion, one can easily define a full tree by using this single data element.

SNAP UFS File System Data Recovery

There are many more data elements that are an integral part of the SNAP UFS, however, the one basic element that is needed in order for third party UFS handlers to function is missing. Each on-disk data structure maintains an element that is unique to its particular type. This element is defined as a ‘MAGIC NUMBER’. This magic number, however derived, is a tell tale element that can be used by the technician to find certain data structures. For whatever reason, SNAP decided to ignore the magic number and it is not stored on-disk. This may be an indication that the SNAP file system designers did not want to carry extra data elements that were superfluous to the functionality and definition of the file system. It is a good strategy for saving precious space in a ROM perhaps, but is not a sound strategy if one is trying to piece together a file system and has no idea where to start. I am not trying to second guess the SNAP Appliance designers, it is merely a fact of the on disk structure and must be dealt with.

If a software engineer wishes to design, code and implement a SNAP Appliance UFS recovery handler then the magic number must be taken into consideration. There are several other data elements of the super block structure that must have certain values. These values can be boundary tested, and used to find other data elements that have a more traditional on-disk data structure. In other words, if the super block cylinder group element points to a particular sector on the disk, that sector can be loaded and masked with a cylinder group on-disk structure. The structure can then be boundary tested and if the testing proves positive then the original super block placement may be correct. Of course, several other elements must be tested, but if the tests return in a positive manner, it is very likely that you may have found your super block without the use of a magic number.

In the final analysis it is up to the data recovery technician to evaluate each SNAP Appliance, and the possibility of recovery. However, with calculator in hand, and hex editor on screen, a well versed data recovery technician can find the super block, and in that, use that key to unlock his clients lot data.

Install and boot 145 OS in a PC

How to install and boot 145 operating systems in a PC

This is the "howto" I promised to write after this thread.
The 145 systems are:-
3 Dos
5 Windows
137 Linux
I have also installed most of the PC-based BSD and Solaris together with a Darwin x86 too but these systems dislike to co-exist with a large number of other systems so I have to keep them off in another PC until I find a way to tackle the technical issues. (edited : latest arrangement in Post #32, #33 and #34)
There are only 3 steps in this howto.

Step 1 – A simple hardware scheme
An operating system needs to reside in a home. That is a partition to me. I used 2x300Gb Pata disk and 2x200 Sata Disk to set up 152 partitions. I always put one operating system in one partition. As an extended partition of each hard disk has no storage of its own, one data-only partition is needed for my personal data, another data-only partition to house the common boot loader and one Swap partition is needed for all the Linux I ended up losing 7 partitions leaving 145 partitions to house the 145 operating systems.

Step 2 – A simple boot scheme
I put Grub in a data-only partition, created a boot menu to boot all the partitions before any of the operating systems was installed. When a partition is filled the system inside becomes bootable instantly. This scheme is dead simple, technically sound, perfectly applicable is every situation but can be viewed unconventional to some PC users. For those who know nothing about Grub it is just one of the two boot loaders commonly used in Linux. The other one is called Lilo possibly used by less than 40% of the Linux distros at the begining of 2007.
In a nutshell I use this Grub to boot up the boot loader of any of the 145 systems that I choose to use. Afterward it is the duty of the second boot loader that brings up its master.

Step 3 – A simple installation scheme
It is really simple. I just installed each system inside a single partition. For MS systems there is more work as I had to install each as a stand alone system so that it always boot to a “C” drive. I then moved the disks with the MS systems to the final position and edit Grub's menu file to boot it back to a “C” drive status.
My scheme depends every system having a boot loader inside its root partition. This is inherent in every MS systems and other operating systems that rely on booting from a bootable primary partition. For Linux it is an optional choice.

Hardware used
The PC is a self-assembled unit using the cheap components available. Nothing to write home about. Just average for an ordinary PC user say 5 years behind the latest technology as this is all I can afford.
Motherboard : Asrock 939NF4G-SATA2
CPU : AMD 939 64 +3200
Ram :1025Mb
Video : Onboard integrated NV44 graphics DX9.0 VGA
Hard disk 2x300Gb Maxtor 133/Mb/s Pata Diamond Max 10
2x200Gb 150Mb/s Sata-I Maxtor Diamond Maxline III
Sound card : SoundBlaster 5.1
Network card : Generic Realtek 8139 10/100 Entrnet
Keyboard : Generic PS/2 keyboard
Mouse : Generic PS/2 mouse

Essential tools
(1) A bootable Grub floppy or a bootable Grub CD.
(2) A Linux Live CD. Ideally one that has Grub inside.
(3) A Dos 6 or above bootable floppy with fdisk.exe inside
(4) A Win2k or XP installation CD
For the production of the Item (1) above and how to use the rest see the last link of my signature.

Partition tables
Here is the details of the partitioning scheme as output by “fdisk-l” Linux command.
Code:
Warning: omitting partitions after #60.
They will be deleted if you save this partition table.

Disk /dev/hda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 122 979933+ 16 Hidden FAT16
/dev/hda2 123 244 979965 16 Hidden FAT16
/dev/hda3 245 366 979965 16 Hidden FAT16
/dev/hda4 367 36483 290109802+ 5 Extended
/dev/hda5 367 609 1951866 82 Linux swap
/dev/hda6 610 1217 4883728+ 83 Linux
/dev/hda7 1218 1825 4883728+ 83 Linux
/dev/hda8 1826 2433 4883728+ 83 Linux
/dev/hda9 2434 3041 4883728+ 83 Linux
/dev/hda10 3042 3649 4883728+ 83 Linux
/dev/hda11 3650 4257 4883728+ 83 Linux
/dev/hda12 4258 4865 4883728+ 83 Linux
/dev/hda13 4866 5473 4883728+ 83 Linux
/dev/hda14 5474 6081 4883728+ 83 Linux
/dev/hda15 6082 6689 4883728+ 83 Linux
/dev/hda16 6690 7297 4883728+ 83 Linux
/dev/hda17 7298 7905 4883728+ 83 Linux
/dev/hda18 7906 8513 4883728+ 83 Linux
/dev/hda19 8514 9121 4883728+ 83 Linux
/dev/hda20 9122 9729 4883728+ 83 Linux
/dev/hda21 9730 10337 4883728+ 83 Linux
/dev/hda22 10338 10945 4883728+ 83 Linux
/dev/hda23 10946 11553 4883728+ 83 Linux
/dev/hda24 11554 12161 4883728+ 83 Linux
/dev/hda25 12162 12769 4883728+ 83 Linux
/dev/hda26 12770 13377 4883728+ 83 Linux
/dev/hda27 13378 13985 4883728+ 83 Linux
/dev/hda28 13986 14593 4883728+ 83 Linux
/dev/hda29 14594 15201 4883728+ 83 Linux
/dev/hda30 15202 15809 4883728+ 83 Linux
/dev/hda31 15810 16417 4883728+ 83 Linux
/dev/hda32 16418 17025 4883728+ 83 Linux
/dev/hda33 17026 17633 4883728+ 83 Linux
/dev/hda34 17634 18241 4883728+ 83 Linux
/dev/hda35 18242 18849 4883728+ 83 Linux
/dev/hda36 18850 19457 4883728+ 83 Linux
/dev/hda37 19458 20065 4883728+ 83 Linux
/dev/hda38 20066 20673 4883728+ 83 Linux
/dev/hda39 20674 21281 4883728+ 83 Linux
/dev/hda40 21282 21889 4883728+ 83 Linux
/dev/hda41 21890 22497 4883728+ 83 Linux
/dev/hda42 22498 23105 4883728+ 83 Linux
/dev/hda43 23106 23713 4883728+ 83 Linux
/dev/hda44 23714 24321 4883728+ 83 Linux
/dev/hda45 24322 24929 4883728+ 83 Linux
/dev/hda46 24930 25537 4883728+ 83 Linux
/dev/hda47 25538 26145 4883728+ 83 Linux
/dev/hda48 26146 26753 4883728+ 83 Linux
/dev/hda49 26754 27361 4883728+ 83 Linux
/dev/hda50 27362 27969 4883728+ 83 Linux
/dev/hda51 27970 28577 4883728+ 83 Linux
/dev/hda52 28578 29185 4883728+ 83 Linux
/dev/hda53 29186 29793 4883728+ 83 Linux
/dev/hda54 29794 30401 4883728+ 83 Linux
/dev/hda55 30402 31009 4883728+ 83 Linux
/dev/hda56 31010 31617 4883728+ 83 Linux
/dev/hda57 31618 32833 9767488+ 83 Linux
/dev/hda58 32834 34049 9767488+ 83 Linux
/dev/hda59 34050 34657 4883728+ 83 Linux
/dev/hda60 34658 35265 4883728+ 83 Linux

Disk /dev/hdc: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 122 979933+ 16 Hidden FAT16
/dev/hdc2 123 730 4883760 1c Hidden W95 FAT32 (LBA)
/dev/hdc3 731 3162 19535040 17 Hidden HPFS/NTFS
/dev/hdc4 3163 36483 267650932+ 5 Extended

/dev/hdc5 3163 3770 4883728+ 83 Linux
/dev/hdc6 3771 4378 4883728+ 83 Linux
/dev/hdc7 4379 4986 4883728+ 83 Linux
/dev/hdc8 4987 5594 4883728+ 83 Linux
/dev/hdc9 5595 6202 4883728+ 83 Linux
/dev/hdc10 6203 6810 4883728+ 83 Linux
/dev/hdc11 6811 7418 4883728+ 83 Linux
/dev/hdc12 7419 8026 4883728+ 83 Linux
/dev/hdc13 8027 8634 4883728+ 83 Linux
/dev/hdc14 8635 9242 4883728+ 83 Linux
/dev/hdc15 9243 9850 4883728+ 83 Linux
/dev/hdc16 9851 10458 4883728+ 83 Linux
/dev/hdc17 10459 11066 4883728+ 83 Linux
/dev/hdc18 11067 11674 4883728+ 83 Linux
/dev/hdc19 11675 12282 4883728+ 83 Linux
/dev/hdc20 12283 12890 4883728+ 83 Linux
/dev/hdc21 12891 13498 4883728+ 83 Linux
/dev/hdc22 13499 14106 4883728+ 83 Linux
/dev/hdc23 14107 14714 4883728+ 83 Linux
/dev/hdc24 14715 15322 4883728+ 83 Linux
/dev/hdc25 15323 15930 4883728+ 83 Linux
/dev/hdc26 15931 16538 4883728+ 83 Linux
/dev/hdc27 16539 17146 4883728+ 83 Linux
/dev/hdc28 17147 17754 4883728+ 83 Linux
/dev/hdc29 17755 18362 4883728+ 83 Linux
/dev/hdc30 18363 18970 4883728+ 83 Linux
/dev/hdc31 18971 19578 4883728+ 83 Linux
/dev/hdc32 19579 20186 4883728+ 83 Linux
/dev/hdc33 20187 20794 4883728+ 83 Linux
/dev/hdc34 20795 21402 4883728+ 83 Linux
/dev/hdc35 21403 22010 4883728+ 83 Linux
/dev/hdc36 22011 22618 4883728+ 83 Linux
/dev/hdc37 22619 23226 4883728+ 83 Linux
/dev/hdc38 23227 23834 4883728+ 83 Linux
/dev/hdc39 23835 24442 4883728+ 83 Linux
/dev/hdc40 24443 25050 4883728+ 83 Linux
/dev/hdc41 25051 25658 4883728+ 83 Linux
/dev/hdc42 25659 26266 4883728+ 83 Linux
/dev/hdc43 26267 26874 4883728+ 83 Linux
/dev/hdc44 26875 27482 4883728+ 83 Linux
/dev/hdc45 27483 28090 4883728+ 83 Linux
/dev/hdc46 28091 28698 4883728+ 83 Linux
/dev/hdc47 28699 29306 4883728+ 83 Linux
/dev/hdc48 29307 29914 4883728+ 83 Linux
/dev/hdc49 29915 30522 4883728+ 83 Linux
/dev/hdc50 30523 31130 4883728+ 83 Linux
/dev/hdc51 31131 31738 4883728+ 83 Linux
/dev/hdc52 31739 32346 4883728+ 83 Linux
/dev/hdc53 32347 32954 4883728+ 83 Linux
/dev/hdc54 32955 33562 4883728+ 83 Linux
/dev/hdc55 33563 34170 4883728+ 83 Linux
/dev/hdc56 34171 34778 4883728+ 83 Linux
/dev/hdc57 34779 35386 4883728+ 83 Linux
/dev/hdc58 * 35387 35994 4883728+ 83 Linux
/dev/hdc59 35995 36483 3927861 83 Linux

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 6315 9767520 83 Linux
/dev/sda3 6316 6923 4883760 83 Linux
/dev/sda4 6924 24792 143532742+ 5 Extended
/dev/sda5 6924 7531 4883728+ 83 Linux
/dev/sda6 7532 8139 4883728+ 83 Linux
/dev/sda7 8140 8747 4883728+ 83 Linux
/dev/sda8 8748 9355 4883728+ 83 Linux
/dev/sda9 9356 9963 4883728+ 83 Linux
/dev/sda10 9964 10571 4883728+ 83 Linux
/dev/sda11 10572 11179 4883728+ a9 NetBSD
/dev/sda12 11180 11787 4883728+ 83 Linux
/dev/sda13 * 11788 12395 4883728+ 83 Linux
/dev/sda14 12396 23916 92542401 c W95 FAT32 (LBA)
/dev/sda15 23917 24792 7036438+ 83 Linux

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1216 9767488+ 7 HPFS/NTFS
/dev/sdb2 1217 1338 979965 1b Hidden W95 FAT32
/dev/sdb3 1339 1460 979965 83 Linux
/dev/sdb4 1461 24792 187414290 f W95 Ext'd (LBA)
/dev/sdb5 1461 2676 9767488+ 83 Linux
/dev/sdb6 2677 3892 9767488+ 83 Linux
/dev/sdb7 3893 6324 19535008+ 83 Linux
/dev/sdb8 6325 8756 19535008+ 83 Linux
/dev/sdb9 8757 11188 19535008+ 83 Linux
/dev/sdb10 11189 13620 19535008+ 83 Linux
/dev/sdb11 13621 16052 19535008+ 83 Linux
/dev/sdb12 16053 18484 19535008+ 83 Linux
/dev/sdb13 18485 20916 19535008+ 83 Linux
/dev/sdb14 20917 23348 19535008+ 83 Linux
/dev/sdb15 23349 24792 11598898+ 83 Linux
My hda has partitions hda61, hda62 and hda63 but they are not shown by fdisk program.
Continued with next post
__________________
Last edited by saikee; 04-08-2009 at 04:45 PM.
Technical details
Hard disk considerations
Most MS systems are designed to reside in a primary partition and there can be a maximum of four of 4 primaries in each hard disk. To get more partition a user “must” give up one primary to turn it into an extended partition. In Linux a Pata (or IDE) disk can have 63 partitions maximum and the limit of a Sata or SCSI disk is 15.

The number of partition plus the whole disk itself make up 64 and 16 devices repeactively.
(Updated note: Since the publication of this thread Linux kernel 2.6.20 and newer have ceased to support Pata disk names and the 63 partitions limit, stated in the blue text above, is no longer supported. Please read Post #21 for further explanation)

Latest 8 Apr 09 - Kernel 2.6.28 and later have decided to breach the maximum 15 partitions per hard disk. The number of partitioins is currently open-ended. This is because the number of logical partition in a hard disk, since Dos era, is also bottomless. However the individual software has not yet been updated to cope with the new changes. The 130+ partitions have not been rejected by MS systems and Linux with the new kernel. More information will be offered later.

An extended partition also consume a device name but cannot be used for storage because it is just the border defining the beginning and the finishing points of the logical partitions.
Linux can be installed and booted from either a primary or a logical partition so it pays to give the primaries to MS systems that dependent on them.
Linux always name the first logical partition as the 5th partition in any hard disk. Therefore theoretically in a Pata disk, say a hda, the maximum usage is hda1, hda2 and hda3 as the primaries, hda4 being the extended partition holding a maximum 59 logical partitions inside (from hda5 to hda63).
In practice some Linux programs stop to display beyond the 60th partition and some distros, like those from the Red Hat family, do not show partitions beyond the 15th, even the distros itself has been installed beyond this limit.
The maximum number of partition one can get out of 2 Pata and 2 Sata is 2*(63+15)= 156. Thus I could have 4 partitions more if I want.

The partitioning scheme
I let the MS systems to have all the primary partitions and Linux are house mainly in logical partitions. One swap, also in a logical partition, to serve all the Linux. For BSD and Solaris systems I use separate hard disks.
As a rule I always install an operating system in a single partition. It is easier to maintain, to boot and to understand. It may not the optimum solution but it works in every Linux I installed.
Here are the partition sizes I allocate to each system
(a) Dos in 1 or 2Gb (primary, type fat16 or fat32)
(b) XP and Vista in 25Gb and 20Gb (primary, type NTFS)
(c) For Win2k I used 15Gb (primary, type NTFS)
(d) For Win98 I used 5Gb (primary, type fat32)
(e) Linux 5Gb (majority) and 10Gb ( say for a few for big distros) (logical, either Ext3 or Reiserfs filing types)
(f) One swap 1 Gb common to all Linux
(g) Personal data 95Gb large fat32

Actual sizes can be seen in the fdisk -l output in Post #1.
I use exclusively one Linux partitioning tool “cfdisk” and use “fdisk” as a second check. Both programs are standard tools in a Linux Live CD. I specify the partition type number of 83, 82, 6, c and 7 for native Linux, swap, fat16, fat32 and ntfs partitions respectively. In using cfdisk for partitioning the partition type is 83 by default and this is recognised by every Linux installer.
I never format the partitions myself as every installer wouldn’t trust me and likes to format its own home.
At a later date I started to use a free partitioning tool called “gparted” which has been branched into “Parted Magic”. They are available as free downable iso files that could burn into a CD.
I believe it is a good strategy to have the partition ready and in the correect partition type so that it is recognised by the system installer. If you you make life easier for the installer. In return it will give musch less trouble.

The mother of all booting schemes - Grub in a data-only partition
This is really my suggestion and is completely unnecessary to a normal Linux user, who can lay his/her hand on the first Grub he/she comes across and make this Grub to do all the things I say below. However my proposal carries the following advantages if taken up
(1) Grub is not attached to any operating system and so it can be used manually as a mini operating system.
(2) Every operating system can be booted indirectly (known as chain loading) using an identical set of commands with only difference in the partition reference. It works for all the operating systems regardless it is a Dos, Windows, Linux, BSD or Solaris.
(2) Every MS system and Linux can control Grub if it is installed in a partition, say type fat16 or fa32, which every system can read, write and alter its boot menu.
(3) Grub is the only boot loader that can be arranged to boot a partition even before its is created, formatted and installed with an operating system. That has to be the coolest thing in booting.
(4) The data-only partition, where Grub resides, has no operating system inside but can be booted by any Linux. Any Dos or Windows MBR can also boot this Grub if it is housed in a “primary” partition with the bootable flag set active.

It should be understood that I propose to install Grub “WITHOUT” being attached to any operating system! Grub cannot read a ntfs filing system so it should be installed into a fat16 or fat32 partition. I put it in the 3nd partition of my 1st Pata disk. In Linux it is known as hda3, as my 1st, 2nd, 3rd and 4th disks are hda, hdc, sda and sdb respectively.

To install Grub into a data-only partition involving the following steps
(A) Format the data partition first say in fat16 format. Best way is boot up a Linux Live CD, click terminal mode and issue the command for formatting a partition hda3 in fat16
Code:
mkdosfs –F16 /dev/hda3
Alternatively the partition can be formatted by a Dos floppy, downloadable from Bootdisk.com, in a Dos command prompt with command
Code:
format c:/
, assuming any partition before hda3 is non-Dos or hidden.

The use of Fat16 is deliberate because with such a filing system a Dos cannot address hard disk beyond 2Gb, cannot recognise a Sata but we can still use Grub there to boot 145 systems in the PC.
(B) The next task is to get hold of 3 files Grub needs for installation. They are called stage1, stage1.5 and stage2, which are held together in a directory, and are available in any Linux Live CD that supports Grub. So just boot up a Live CD and ask Linux to report to you their position by command
Code:
find / -name stage1
you will find these files are typically held in the following directories

Red Hat, Fedora C2 to C6
/usr/share/grub/x86_64-redhat/stage1
/usr/share/grub/i386-redhat/stage1

Mandriva
/lib/grub/i386-mandriva/stage1

Mandrake
/usr/local/lib/grub/i386-pc/stage1
/usr/lib/grub/i386-pc/stage1


Suse
/usr/lib/grub/i386-suse/stage1

Gentoo, Knoppix, Mepis, Xubuntu, Ubuntu, Kubuntu, Debian
/lib/grub/i386-pc/stage1


Frugalware, Kanotix
/usr/lib/grub/i386-pc/stage1

Next stage is to create a temporary directory in the directory /mnt of the boot-up Live CD Linux, mount the data-only hda3 partition, create /boot/grub directory inside it, copy all the Grub’s stage1, stage1.5 and stage2 files into it, invoke a Grub shell, setup Grub in the MBR and exit. Using Ubuntu CD as an example the commands would be
Code:
mkdir /mnt/hda3
mount /dev/hda3 /mnt/hda3
mkdir /mnt/hda3/boot
mkdir /mnt/hda3/boot/grub
cp /lib/grub/i386-pc/* /mnt/hda3/boot/grub
grub
root (hd0,2)
setup (hd0)
quit
On a reboot the hda3 will be booted to a Grub prompt and nothing else. This indicates Grub is now in charge of the MBR, linked to partition hda3 and is controllable by the configurator file always named “menu.lst” if there is one in the /boot/grub or /boot directory of hda3. When Grub can't find it it defaults to a Grub prompt.

Note some versions of Grub, especially in the Red Hat family, can be modified to read "Grub.conf" instead.

Although the Grub Manual does not claim it but it is in my experience no PC operating system cannot be booted by a Grub prompt. It doesn’t look much at the first sight but there is seldom something so simple can be so powerful.

(C) Now is the time to write a menu to boot 145 systems. It is just a text file must named menu.lst to be stored in the subdirectory /boot/grub. Grub boots each system iy 3 lines as follow:-

A “title” statement to display the name of the system in the screen. Any ttext after the word "title" is displayed and has consequence to the booting except to remind you what the system is.

A “root” statement specifies the root of the operating system. This means the partition the target system residing. Grub counts everything from 0 so to boot a system at the 9th partition of the 2nd disk is “root (hd1,8)”. Similarly (hd0,0) mean the 1st partition of the 1st disk.

A “chainloader” statement which always ends with “+1”.

So you see there is nothing to it. Even a simpleton like me can cope with this.

Being lazy I wrote a small program to generate the booting menu because it is just doing 4 loops, each loop per hard disk in my case.

Therefore my menu.lst initially will look like this
Code:
title Empty @ hda1
chainloader (hd0,0)+1

title Empty @ hda2
chainloader (hd0,1)+1

title Empty @ hda3
chainloader (hd0,2)+1

title Empty @ hda4
chainloader (hd0,3)+1

and so on
The menu is edited whenever I wish to update it with the name of the operating system replacing the word “Empty”. Life could be so simple except the MS systems which needs extra work. That I shall go into later.

The simplified installation scheme
Linux is easy to install so I describe it first.
Linux rarely need to defrag its filing system because it makes use of a scratch area call swap. Thus a swap partition is needed for the first Linux system. Thereafter all the other Linux will proceed to use it without saying a thank you. There is nothing needed done except to create it using the Linux cfdisk program, to the size about twice the physical memory, and select it partition type as 82. Every Linux installer will know how to use it. Some insist on checking it, others ask you for permission to format it and many don’t even tell you what they do with it. I create one in partition hda5 so whenever an installer asks for it I just respond with “hda5”.

In the installation of every Linux we can “instruct” the installer to place Linux in any partition we want. This is done by nominating a single partition to mount the root or “/” of the Linux. If no more than one partition is given to an installer it will place a Linux's directories of /boot, /home, /usr…..as subdirectories to "/" inside the single partition, stacking them back to back so that you only need to worry only if the accummulative content starts to excced the overall partition capacity.

The choice of the boot loader, usually either Lilo or Grub, is immaterial to the proposed scheme.
When it comes to the location of the boot loader it is another matter. Every Linux installer would let the boot loader installed either in (a) the MBR or (b) the root partition of the Linux being installed. My proposed scheme “ONLY” works if the latter is chosen. Some naughty Linux could omit giving you a choice and steals the MBR position. You could also having tea and press the wrong button to lose the MBR. In such a case you can claim the original MBR back again by booting up the Live CD (with Grub inside), click terminal and fire these commands to restore Grub
Code:
root (hd0,2)
Setup (hd0)
which literally asking Grub to “source” the necessary file from the specified root and install itself in the whole of disk (hd0) and that could only be the MBR.

A word of caution on Linux’s ability to be installed/booted at high-number partitions or beyond 137Gb barrier in a hard disk

The systems that I arranged can all be booted as per menu.lst. Some older distros will have difficulties to recognise partitions higher than 16, not anticipating device names for high-number partitions and can’t access beyond 137 Gb in the hard disk. These distros have to be installed at the lower-number partitions and inside the first 137Gb of the hard disk. If you find a distro refuses to boot or install take a look at my menu.lst and check the partition position it is known to work.

Dos and Windows systems

There are many ways to install MS systems. For simplicity, ease of control and maintenance I recommend each system to be installed in a “C” drive as a stand-alone independent system. This is to say no dual booting among the MS systems by NTLDR. I have a mobile rack system so I can pull out all the other hard disks and leave only one to install a MS system. Thus every MS system in my case was installed as the first bootable disk. Once installed I do not change its partition position but can put hard disk in other positions. Grub has a facility to re-map the hard disk order on-the-fly and gives back the first bootable disk status to a MS system.

To install a MS system in a “C” drive means there should be no partition recognised by the installer except the partition for installation so it can rightfully claim the first partition status. If there is a partition the MS can recognised, say a Dos partition, then this can be overcome by hiding it, using the Live CD again. If one wants to hide the first disk’s 1st partition, unhide the 2nd partition and make it bootable for a MS system the command in Grub prompt are
Code:
hide (hd0,0)
Unhide (hd0,1)
Makeactive
Hiding a partition in a PC doesn’t physically hide the partition away. It just alters its partition type number. Normally a digit “1” is added. Thus if a fat32 and ntfs partition with type c and 7 will become invisible to a MS system when the type number is altered to 1c and 17 respectively. To unhide it is to strip off the digit “1”. It is the oldest trick in a PC, invented at the time Dos was the de facto operating system, to allow a user to bootmore than one operating system.

A MS system may need its own MBR for an installation. It has come to my notice that the MS systems share a common MBR. This MBR's function is to search each of the 4 primary partitions and load the one with the booting flag switched on.

As an example these are brief steps of how I installed Windows Vista in hdc3

Removed disk hda, sda and sdb disks and slide hdc into the rack previously occupied by hda. The original hdc3 partition is know as (hd0,2) to Grub.

Boot up a Dos floppy and restore the MS MBR into the hard disk by command
Code:
fdisk /mbr
Boot up a Grub floppy and hide the first two partitions and then check disk geometry
Code:
hide (hd0,0)
Hide (hd0,1)
Geometry (hd0)
The geometry command is to check everything is in order before installation. Hda3 should have already been created with sufficient space in type 7 for ntfs filing system.
Install Windows Vista and select the 3rd partition for its home.
Check Vista working satisfactory on a reboot after installation.
Power down the PC, add the hard disk that is intended for the permanent home for the Vista, say this is a slave drive called hdc already has in the third primary position a partition with identical size as hda3, insert a Live CD, boot up the system and clone the Vista system across by root terminal command
Code:
dd if=/dev/hda3 of=/dev/hdc3 bs=32768
I then power down again, restore all the hard disk, boot up a Live CD again and use it to amend the /boot/grub/menu.lst in hda3 with the following entries for booting hdc3 partition
Code:
title        Vista @ hdc3
root (hd1,2)
hide (hd0,0)
hide (hd0,1)
hide (hd0,2)
hide (hd1,0)
hide (hd1,1)
unhide (hd1,2)
makeactive
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
The two map statement instructed Grub to swap the (hd0) and (hd1) position so that when Vista boots it will find itself still in the first bootable disk as per the original installation. The 5 hide statements are necessary to hide the 5 Dos and Windows partitions which if Vista picks up can upset its “C” drive status.
I used the same principle on every other MS systems and managed to get 3 Versions of Dos and 5 versions of Windows in the same PC. More MS systems can be accommodated but these are all I got.

Ending notes
My original intention was to learn Linux, understand how it work and be able to boot it. It was a huge surprise to see how easy and logical in a Linux world. It almost seems everything I could not understand how a computer works, after all these years with MS systems, suddenly become comprehensible in Linux when the inner working of the system is a published public knowledge.

People can say anything they like about Linux but my 2.5 years with it has taught me using one of the oldest partition (fat16) to house an obsolete boot loader (as the Grub described here is known as the Grub legacy that the GNU/Grub maintainers had already declared cesation of support to move their effort to the new Grub 2 at the time I started Linux) to boot the 145 operating systems I can access. The scheme is laughingly simple.

I am hugely indebted to many GNU/Linux volunteers who unselfishly maintain and develop the open source software. I come to know some of them could risk litigations from the money-grabbing corporation because their effort has reduced our dependency on the commercial software.
From the 2.5 years into Linux I witnessed a huge leap in functionalties and user-friendliness in Linux. I am also inspired by so many nations contributing efforts in bringing this operating system to the public. Many of their distros are technically outstanding.

TestDisk Livecd

TestDisk on Live rescue CDs

Tuesday, May 19, 2009

Free Data Recovery Tools

Source

GParted Live CD aims to be fast, small in size (~50mb), and use minimal resources to get that disk partitioned the way you want it. GParted Live CD is based on Gentoo-catalyst, and uses Xorg, the lightweight Fluxbox window manager, and the latest 2.6 Linux Kernel. The CD also offers the following programs: parted and fdisk vi, ntfs-3g, partimage, testdisk, Terminal and Midnight Commander. GParted is written in C++ and uses gtkmm for its Graphical User Interface (GUI). The general approach is to keep the Graphical User Interface as simple as possible.

KNOPPIX is a bootable CD with a collection of GNU/Linux software, automatic hardware detection, and support for many graphics cards, sound cards, SCSI and USB devices and other peripherals. It can be used as a Linux demo, educational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk. Due to on-the-fly decompression, the CD can have up to 2 GB of executable software installed on it.

System Information for Windows (SIW) is a tool that gathers detailed information about your system properties and settings and displays it in an extremely comprehensible manner. It can create a report file (CSV, HTML, TXT or XML), and is able to run in batch mode (for Asset Inventory Tracking, Software and Hardware Inventory, PC Audit, Software Audit, Software License Compliance Management). SIW is a standalone utility that does not require installation (Portable Freeware) - one less installed program on your PC as well the fact that you can run the program directly from an USB flash drive, from a floppy, from a network drive or from a domain login script.

The Ultimate Boot CD will be of great help if you want to run floppy-based diagnostic tools from CDROM drives, consolidate as many diagnostic tools as possible into one bootable CD. Avoid digging into the dusty box to look for the right floppy disk, but simply run them all from a single CD.

Undelete Plus is a quick and effective way to retrieve accidentally deleted files, files removed from the Recycle Bin, in a DOS window, from a network drive, from Windows Explorer with the SHIFT key held down.
It works under Win 95/98/Me/NT/2000/XP/2003/Vista operating systems. The program supports all Windows file systems for hard and floppy drives.

The Magical Jelly Bean Key Finder is a freeware utility that retrieves your Product Key (cd key) used to install windows from your registry. It has the options to copy the key to clipboard, save it to a text file, or print it for safekeeping. It works on Windows 95, 98, ME, NT4, 2000, XP, Server 2003, Windows Vista, Office 97, Office XP, and Office 2003.

Ghost for Linux is a hard disk and partition imaging and cloning tool similar to Norton Ghost. The created images are optionally compressed and transferred to an FTP server instead of cloning locally.

USB PC Repair Kit is a list of programs. The programs are loaded onto a USB Pen Drive to help fix your computer. The Kit contains the programs that can tell you if you really need to reboot after installing a program or permanently erase sensitive data from your hard drive that may still exist after using the windows delete feature.

TestDisk is a powerful free data recovery software. It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting your Partition Table). Partition table recovery using TestDisk is really easy.

FSBackup is a shell script that automates the execution of backups using the tar archiving utility. It is designed for use by technically knowledgeable users (programmers, system administrators, or other power users), for backing up a small network or individual computers.

SuperDuper is a program that makes recovery painless, because it makes creating a fully bootable backup painless. Its incredibly clear, friendly interface is understandable, easy to use, and SuperDuper’s built-in scheduler makes it trivial to back up automatically. And it runs beautifully on both Intel and Power PC Macs. It is an indispensable tool, specially if your hard drive starts making that horrible clicking noise, your most important day-to-day application isn’t working with the system update you just applied, or you need to restore a stable copy of your system, but don’t want to lose what you’ve been working on, or other similar cases.

Corruption Corrector is a program designed for fixing corrupt files. It is for situations when you have (downloaded) many copies of the same file, but all of the copies are a bit corrupt. If the corruptions are in different parts of the file, it is possible to combine the good bytes from each file and get an uncorrupted copy of the file.

myrescue is a program to rescue the still-readable data from a damaged hard disk. It is similar in purpose to dd_rescue, but it tries to quickly get out of damaged areas to first handle the not yet damaged part of the disk and return later.

SystemRescueCd is a Linux system on a bootable CD-ROM for repairing your system and recovering your data after a crash. It aims to provide an easy way to carry out admin tasks on your computer, such as creating and editing the partitions of the hard disk.

Relax and Recover is a highly modular disaster recovery framework for GNU/Linux based systems, but can be easily extended to other UNIX alike systems. The disaster recovery information (and maybe the backups) can be stored via the network, local on hard disks or USB devices, DVD/CD-R, tape, etc. The result is also a bootable image that is capable of booting via PXE, DVD/CD and tape (OBDR).

RAID types

Source

RAID 0 – Striped Set

RAID 0 optimizes drive space and disk I/O but has no data redundancy. RAID 0 writes alternate blocks of data on each drive using a defined stripe size. Not only do you get the full use of all disk space but I/O is spread across all the drives in the array. This makes for faster reads and writes.

In order for a recovery from this type to be successful all the drives must have the capability of being addressed.

Standard stripe size is 128K, 256K.

RAID 1 – Mirrored Set.

RAID one is a popular configuration for end users. It allows for total data redundancy with a minimum of performance degradation. The theory is that if one of the drives in the array degrades the other drive takes over totally and the user is notified with either an alarm from the card and possibly an email.

The problems we at DTI have seen when recovering a mirrored set are as follows.

1. Mirrors get corrupted. Bad data from one drive may propagate itself onto the mirror.

2. Mirror breaks and try to boot from single drive. Operating system still does not boot due to mirror meta data.

3. Upon a rebuild the wrong drive is pointed to on the rebuild.

Standard block size is 64K, 128K

RAID 5 – Alternating parity

RAID 5 optimizes drive space and allows for a great deal of data redundancy. There is a throughput bonus since there are multiple disks, but there are some calculations that are made in order to create a parity block.

RAID 5 uses a stripe, broken into blocks. One block in each stripe is not a data block, it is a parity block. Using XOR mathematics it is possible to lose one drive and still run. Once a second drive is lost the array fails.

There are several problems involved in this type of RAID recovery.

1. One drive is marked as drive by the card as bad and the array is degraded. The drive is forced online and the data gets corrupted.

2. One drive is marked by card as bad and the array is degraded. Drive is not replaced and the array continues to function. Second drive goes down and array goes down. It is not clear which drive went down first and it becomes difficult to determine which drive has stale data.

3. An automatic rebuild is started and the wrong drive is used as a rebuild point.

4. Drives are taken out of array and put back in enclosure out of order.

There are many other problems associated with RAID 5 data recovery, but the above are the most prevalent.

What a RAID (Redundant Array of Independent Disks) is:

RAID 0 Striped Set:

All the disk devices are organized alternatively so that blocks are taken equally from all disks alternatively, in order to reach higher efficiency. Since the probability of finding a block of a file is identical for all disks, there are force to work simultaneously thus making the performance of the meta disk almost 10 times that of a single disk.

RAID 1 Mirror:

In this mode, the goal is to reach the highest security of the data. Blocks of data are duplicated in all physical disks (each block of the virtual disk has a duplicate in each of the physical disks). This configuration provides 10 times the reading performance of a single device, but it degrades writing operations. Read operations can be organized to read 10 blocks simultaneously, one from each device at a time. Similarly when writing 1 block it has to be duplicated 10 times, one for each physical device. There is no advantage in this configuration regarding storage capacity.

RAID 4:

In this mode the ultimate goal is to balance the advantages of the type RAID 0 and RAID 1. Data is organized mixing both methods. The physical 1 to N-1 are organized in striping mode (RAID0) and the Nth stores the parity of the individual bits corresponding to blocks 1 to N-1. If any of the disks fails, it is possible to recover by using the parity information on the Nth hard disk. Efficiency during read operations is N-1 and during write operations is 1/2 (because writing a data block now involves writing also to the parity disk). In order to restore a broken hard disk, one only has to re-read the information and re-write it (it reads from the parity disk but it writes to the newly install hard disk).

RAID 5:

This type is similar to RAID 4, except that now the information of the parity disk is spread over all the hard disks (no parity disk exists). It allows to reduce the work load of the parity disk, that in RAID 4 it had to be accessed for every write operation (now the disk where parity information for a track is stored differs for every track)

Why should I not use RAID 5?

Hard disks: Technology & Failure

Source
How and why a hard drive works leads us to understand why they and how hard drives fail.
Mechanisms implemented to avoid loosing data caused by certain hard disk failures:
  1. S.M.A.R.T. This system was notifies the user when the drive may be failing. Several components such as drive speed, track to track time, head placement and many other tests are performed on the drives daily. These tests are used in a comparison over time and can show a pattern of device failure. During the degradation cycle there is a manufacturer assigned percentage used that will alert the user of impending data loss. For instance, if a drive has been spinning at 7200 RPM for several months, then over the last several weeks the RPMs drop to 7000 RPM, this may be flagged as an impending problem and the user will be notified that possible data loss may occur in the near future. It is up to the user to backup the data and replace the failing hard disk drive or prepare for data recovery.
  2. Sector Map. The sector map consists of two lists. The primary list, which is set at factory, maps all bad sectors out. These bad sectors are found and mapped before the drive is sold. In other words, hard drives are expected to have bad sectors. There is no such thing as a perfect hard drive. A hard disk drive would cost several thousand dollars to the consumer if manufacturers created the means to make a perfect hard drive. In order to keep costs down, drive remapping is used. Now, once the list of all the bad sectors are made at the factory the drive is then shipped and sold. As the drive performs its day to day functions more bad sectors will appear. It is inevitable. These bad sectors are then mapped to another list. Both of the bad sector lists are mapped to a reserved area of the hard drive. There are only so many reserved area sectors for the firmware to remap to. Once these sectors are exhausted the firmware cannot remap and the bad sectors become part of your live data.

Signs that a drive has used its reserved sector area are:
slow reads, slow boot sequence, operating system may seem to lock, may have to reboot several times before the operating system comes up.
A chronic bad sector problem will eventually cause file loss, and ultimately the drive will not be able to identify itself to the BIOS and your data is either lost, or you will need hard drive recovery services.

The hard disk drive has one or more platters that are made of glass or aluminum coated with magnetic iron oxide particles. The platters spin continuously as the heads travel in and out along a seek pattern. A typical hard drive contains several of these 3.5-inch platters, which can contain tens of billions of individual bits.

The higher the areal density of the hard disk’s platters, the more bits that can be packed into each square inch of platter real estate. A platter is segregated into tens of thousands of concentric tracks.
Because tons of information can be stored in one track, the tracks are broken down into smaller units called sectors.
Each sector can hold about 512 bytes of data. Disk platters are mounted in a stacked formation on a spindle A spindle motor turns the platters at very high speed, typically between 5,400 and 7,200 rotations per minute, but as fast as 15,000 rotations per minute(RPM). The platters spin so that the appropriate sector or sectors containing the data can be positioned underneath one of the drive’s reading heads. There’s one head per platter, and all the heads move in unison.

Heads
Each head in the hard drive is mounted onto a slider, which is mounted onto an arm. A mechanical device called an actuator controls each hard drive arm. The actuator moves the arm to the correct position on the spinning platter, which puts the head in the correct position. The reading head ( reading and writing heads are separate) floats about 2/1,000,000 of an inch above the disk surface. As it passes over the appropriate disk sectors, it interprets the magnetic pulses and converts them to electrical pulses that can be interpreted as 1s and 0s.

Although the head may look large, actually the sensitive part of the head is defined by micro lithographic methods so that the actual exposed portion of the head,which can either read or write the information on the disk,is very small-comparable to the dimensions of features on a microchip! As the manufacturing technology has improved over the years they have been able to shrink this area down to smaller and smaller sizes, and that is how the hard disk memories have risen to such large figures now. In addition they have increased the density of magnetic particles on the disk which makes the storage capacity larger.
For example in 1991 the density of storage memory was about 0.l3 Gbits/square inch.
In 1998 it was up to around 4 Gbits/square inch (30X!).
At the same time the lithography limit of the sensitive head area was about 4.5 uMeters in 1991, and in 1998 was down to 0.5 uMeters, reduced by a factor of 9. So that is how the storage density of the disks is now up to 200 GB or higher.

Any deviation in the platter or head can cause the hard drive to start clicking. If it starts clicking you will need hard drive recovery.

Monday, May 18, 2009

Damaged Hard Disk

Source
Bad sectors are the most common form of harddisk physical damage. They are early signs of disk crash as it deteriorates over time. A bad sector is a sector on the disk which data cannot be written or read due to a physical damage or inconsistencies of parity checking bits on disk (CRC or Cyclic Redundancy error). To recover your data, the best method is to copy its data to another hard disk before attempting to recover its data.
The new disk must be at least exactly the same size (check the number of LBA sectors) or larger; when larger, it's usually not a problem because the number of heads per cylinder and sectors per head will be the same if both disks use LBA mode. Windows may have some problems in dealing with bad sectors on a damaged hard disk, so the best solution is to use a Linux OS to copy data to another hard disk.
You can also use TestDisk to help analyze the sectors copied from a hard drive with physical problems onto a good drive.

TestDisk

TestDisk is OpenSource software and is licensed under the terms of the GNU Public License (GPL).

TestDisk is a powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.

TestDisk can

  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3 Backup SuperBlock
  • Undelete files from FAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, NTFS and ext2/ext3 partitions.

TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to collect detailed information about a non-booting drive which can then be sent to a tech for further analysis. Those more familiar with such procedures should find TestDisk a handy tool in performing onsite recovery.

Recovery of cdrom session

Source

With multi-session cdrom, it is possible to delete files of previous session. Because the files are not really deleted, it is possible to recover them. To read files from the first session, run under Linux

mount /dev/cdrom /mnt/cdrom -t iso9660  -o session=0

Recovery of a lost and damaged NTFS

Source
Analyse Disk 81 - CHS 2434 255 63 - 19092 MB (Enh BIOS mode)
No partition is bootable

No partition is available.

Analyse Disk 81 - CHS 2434 255 63 - 19092 MB (Enh BIOS mode)
L FAT32 1275 1 1 2433 254 63 18619272 [NO NAME]

Only the second NTFS partition is found during Quick Search. Select Deeper Search to try to find more partitions.

Analyse Disk 81 - CHS 2434 255 63 - 19092 MB (Enh BIOS mode)
* HPFS - NTFS 0 1 1 1274 254 63 20482812
L FAT32 1275 1 1 2433 254 63 18619272 [NO NAME]

Both partitions have been found, but the first NTFS has been found using backup boot sector, we need to restore the boot sector. Choose Write and next choose Backup BS to copy backup boot sector over boot sector.

More:

Partition of a drive

Source
....
The criteria that Microsoft uses when partitioning a drive is as follows.
The boot sector always resides at sector zero, this is and industry requirement and not from Microsoft.
All OS boot partitions reside on a head boundary.
In the past there was a cylinder, head, sector layout for hard drives. This comes from before LBA addressing and when drives were extremely slow.
It was always advantageous that when a drive did a seek it would do as much work as possible while it was out on the platter since seek times were horrible.
So, in a single platter, dual head drive on bootup the drive would seek to Cylinder 0, Head 0, and Sector 1, read the bootstrap code at that address and execute it.
The bootstrap would have a table that included where the OS boot data was located.
Instead of seeking to a new area on the drive, the drive would just switch heads and read from Cylinder 0, Head 1, Sector 1.
That is where the OS boot record would normally be. In other words, it is by design that you lose the first 63 sectors of a drive.
In addition, every additional partition will start on a head boundary, so again you lose 63 sectors. If you are using extended partitions you will lose 126 sectors as one starts on head boundary 1 and the other starts on head boundary 0.
There is no way to avoid this, and even after LBA addressing was instituted and drive platter and head numbers became irrelevant. Microsoft, and the industry as a whole, kept this formula. I for one am glad as it makes data recovery much easier when there are a set of rules and these rules can be applied when looking for file system components.
In reference to partition sizes all partitions end on head 254.
The tools that create a partition know that and so when you type in you want your drive ‘C’ to be a 16 GB partition the following formula is used.
There are 63 sectors per track, and 255 tracks per cylinder.
There are 2048 sectors per megabyte of storage and 2097152 sectors per gigabyte of storage. Multiply 63 sectors time 255 tracks you get 16065 sectors per cylinder.
You want 16 GB, so you multiply 16 times 2097152 and that equals 33554432 sectors.
Now we divide 33554432 sectors by 16065 and we get 2088,666791 cylinders.
Truncate the value to 2088 and then take that value and multiply that times 16065 and that value is the actual space Microsoft will allot you for your partition.
In this case 15,99489212 GB of allocated partition space.
Sometimes fdisk will do something weird to optimize the storage but this calculation is fairly close.
In reference to the cluster size the smaller the cluster more of the disk is used, however, you sacrifice speed for small cluster sizes for two reasons.
How the OS buffers depending on cluster size and secondly smaller clusters tend to fragment more as it is easier to use all the space when the areas you can store things in is smaller.
In other words it is easier to store a mouse than an elephant.

Corruption of Master File Table

Source
[partial NTFS corruption following NDIS.SYS blue screen of death]

Symptom: Every time I cold boot the notebook, chkdsk will commence repair process. The screen displays ‘Inserting an index entry into index $o of file 25′ line after line until it said ‘Insufficient disk space to correct error in the index $o of file 25′. The Windows XP then allow me to logon but popup error message saying such and such folders is corrupted and unreadable. Some applications work fine but I noticed that while you can create/save file on C: drive, you can no longer delete nor change it. C: drive file system seems like being completely locked.

Answer A
Well repairing the partition is not going to help because the partition is intact. If the partition was not the drive would not boot. It sounds as if you may have some bad sectors on the drive. It was also interesting when chkdsk indicated that there was not enough disk space on the drive to reallocate index allocations. Sometimes it is best to get your data off of the drive to another media before it goes bad. So, that said, I would back up whatever important data you have to another drive ( external usb, DVD, CD etc ) Then I would check the amount of space used on the drive. If you disk is totally full I would delete whatever you can live without and uninstall any programs you don’t use. The run chkdsk again. If chkdsk can not resolve you problem then I would suggest starting from scratch.

Answer B
The problem exists with the file system itself and not the Master Boot record, or OS boot record. The Master File Table is corrupt and chkdsk is trying to repair. The situation with chkdsk is that it will destroy inodes and file pointers to the point where data cannot be recovered.
You sound like you may have one of two general problems. First, you may have bad sectors on the drive, and because they cannot be read it will show as a corrupt file system and chkdsk will try to run. Second, data was written to the MFT area of the file system and has corrupted the table. This can happen for so many reasons that it would not be prudent to list them here.
In order to solve this problem, I would pull the drive from the machine, place it in a USB sleeve and try to recover the data using DART for XP
http://www.dtidata.com/free_data_recovery_software/DART.zip
.
If DART hangs then that usually means there are bad sectors on the drive, then you may want to use Speed Clone
http://www.dtidata.com/free_data_recovery_software/Speed_clone_Demo.zip
.
To image the drive to another drive and then recover the data.

NTFS Partition Recovery

... with Free Partition Recovery

All things must start somewhere, when it comes to operating systems’; the partition sector is the single most important component in the boot sequence. When the partition sector is missing, corrupt, or set up improperly it can wreak havoc with the booting of your operating system. The partition sector is vulnerable to virus attacks, operating system anomalies, bad sector reads, and an ever increasing set of tools, fdisk included, that when used incorrectly can and will totally destroy an operating systems boot sequence.

In order to more clearly understand how the partition sector fits into the boot sequence, the following is a standard garden variety boot up.

When you turn on your computer several things happen. The first of which is the BIOS (Basic Input Output System) is executed by the CPU (Central Processing Unit). The CPU knows to load the BIOS on power up as there is a flag set at power on. The BIOS then jumps to a set of routines that will execute the POST (Power On Self Test). The POST will look at memory, some peripheral devices, and do some other house keeping procedures. The most important of these is determining the boot device. The boot device is stored in non-volatile read/write memory. If the boot device is set to a hard drive, then an industry standard interrupt 0×19 is called. This routine loads the first 512 bytes of the boot device, which in this case the hard drive, into memory location 0×7C00. The 512 bytes is a standard sector size. It then jumps to that address (0×7C00) and executes whatever it finds there.

If all goes well, the set of instructions executed will look at the partition entry data. The partition entry data is used to determine which partition is the boot partition. If it finds a boot partition in the partition entry list the instructions will then load a secondary set of instructions which the partition entry has pointed to. In the case of Windows the OS (Operating System) pre loader is now loading itself into memory. This type of OS loader is called a two phase loader and is very common. Take a look at the table below to help better understand the role of the partition sector entry data.

The format of a partition sector entry is as follows:
1.) Byte 1 Boot Partition Indicator (0×80 is bootable, 0×00 is not)

2.) Byte 2 Starting Head of the partition (255 or less)

3.) Byte 3-4 Starting Sector and Cylinder of the partition
This is set up as 10 bits for the Cylinder and
6 bits for the Sector (Sector Max 63, Cylinders Max 1024)

4.) Byte 5 File System Type (NTFS, FAT32 etc)

5.) Byte 6 Ending Head of the partition (255 or less)

6.) Byte 7-8 Ending Sector and Cylinder of the partition
This is set up as 10 bits for the Cylinder and
6 bits for the Sector (Sector Max 63, Cylinders Max 1024)

7.) Bytes 9 -12 Relative Sector to the partition sector. In other
words, where the actual partition starts.

8.) Bytes 13-16 Total sectors for this partition.

If any of this data is outside the stated parameters the partition will fail and consequently the boot sequence will stop. In order to clearly understand what happens when the partition sector is corrupt or damaged, the following is a list of scenarios.1. Boot Failure: System Halted
An error message that comes from the BIOS. Certain BIOS versions, especially the most recent revisions, take a look at the partition sector. The BIOS will perform some preliminary tests and one of the tests is the Partition Identifier. At the end of every partition sector is the value 0xAA55. If this indicator is missing then the BIOS assumes that this is not a partition sector and the aforementioned error message will be issued.

2. System reboots over and over
Although this is not an error message, it can happen if the relative sectors point to an invalid OS pre loader. A trap is set and if the data that is loaded is not executable machine most BIOS’s will reboot.

3. Invalid Partition Table
This error message comes from the partition boot code. If there are no boot devices then the boot code will enter an infinite loop after this message is displayed.

4. Error Loading Operating System
After a valid partition is found the LBA sector pointed to by the partition entry table will be loaded using INT 13. This is the operating system loader. If the code cannot be loaded into memory then the above message is normally displayed.

5. Missing Operating System
Once the operating system boot code is loaded it is checked for the 0xAA55 identifier in the same manner that the partition sector is tested. If this test fails, then the above message will be displayed.

Over the years the BIOS writers have gotten smarter, personal computer as well as operating system standards have been set and are normally followed. So many of the messages, as well as error checking is now handled by the BIOS. The messages I have mentioned are just a few, but, are very common; however, from BIOS to BIOS the messages as well as the error handling can differ greatly.

As you can clearly see the partition sector is of primary importance in the boot sequence. Without it nothing happens. In the future there may be ways to overcome the use of a partition sector, one would be to store the partition entry data in the BIOS, this would eliminate boot sector viruses as well as the possibility that the boot sector goes bad and becomes unreadable. However for now, we will work with what we have. The next segment will discuss how to do partition recovery using a simple piece of software.

How To Use The Software

Free Partition Recovery is an extremely powerful tool for anyone to use but this statement must be caveated with the fact that with power comes a degree of responsibility. In other words, use this tool with extreme caution as it can destroy your file system to the point of massive and possibly permanent data loss. That being said lets take a look at how we can put this tool to good use.

First, the software should be run from a master drive. There should be two drives in the system, your boot drive from where the software is executed, and the damaged drive. The damaged drive being the one with the corrupt or missing partition. Free Partition Recovery is designed to work on Windows XP type operating systems, so make sure that you have unzipped the file onto that type of operating system.

Once the Free Partition Recovery has been executed you will see in Figure 1.

Figure 1

The top row displays all the physical drives currently active in your system. This will also include any external devices that can be mounted as a physical block device. An example of this would be the 80 GB Maxtor USB device. Once you choose a physical drive all partition entry data will be displayed as in Figure 2.

Figure 2

The partition entry data for this particular drive gives us a clear example of a drive that has been configured with one NTFS logical drive with the standard offset of 63 sectors, start head and sector of 1 and ending cylinder of 1023. These are classic values for a normal single logical drive setup.
The other three entries are clear and not in use. These entries will be ignored by the OS loader. There is one other important item in this configuration. On the far left of Figure 2 of the first partition entry is the boot flag “No”. This indicates that this partition is ‘Not Bootable’. You can change that value buy using the drop down list (Figure 3)

Figure 3

Once you have configured all of the partition entries to reflect the correct values all you need do is press the “Write” button. You will be presented with the following message box in Figure 4. A word of caution, once you write the data down to the partition sector, you must live with it. Please exhibit extreme caution.

Figure 4

You can download the free NTFS partition repair software here. For more info about freeware data recovery visit our free data recovery software page.