Showing posts with label Partition. Show all posts
Showing posts with label Partition. Show all posts

Mar 23, 2008

Common Problem With Hard Disk

The most common problems originate
from corruption of the master boot record, FAT, or directory.
Those are soft problems which can usually be taken care of
with a combination of tools like Fdisk /mbr to refresh the
master boot record followed by a reboot and Norton disk doctor
or Spinneret.

The most common hardware problems are a bad controller, a bad
drive motor, or a bad head mechanism.

1. Can the BIOS see and identify the hard drive correctly? If
it can't, then the hard drives onboard controller is bad.

2. Does the drive spin and maintain a constant velocity? If it
does, that's good news. The motor is functioning.

3. If the drive surges and dies, the most likely cause is a
bad controller (assuming the drive is cool). A gate allowing
the current to drive the motor may not be staying open. The
drive needs a new controller.

4. Do you hear a lot of head clatter when the machine is
turned on and initialized (but before the system attempts to
access the hard drive). Head clatter would indicate that the
spindle bearings are sloppy or worn badly. Maybe even lose and
flopping around inside.

5. There is always the possibility that the controller you are
using in the machine has gone south.


1. If the drive spins, try booting to the A> prompt, run Fdisk
and check to see if Fdisk can see a partition on the hard
drive. If Fdisk can see the partition, that means that it can
access the drive and that the controller electronics are
functioning correctly. If there is no head clatter, it may be
just a matter of disk corruption which commonly occurs when a
surge hits you machine and overwhelms the power supply voltage
regulator. It commonly over whelms the system electronics
allowing an EM pulse to wipe out the master boot record, file
allocations table, and primary directory. Fdisk can fix the
master boot record and Norton Disk Doctor can restore the FAT
and Directory from the secondaries.
2. The drive spins but Fdisk can't see it. Try the drive in
another system and repeat the test to confirm that Fdisk can't
read through the drives onboard controller. If it sees it in
another system, then your machines hard drive interface is
bad. You can try an upgraded or replacement controller card
like a Promise or CMD Technologies (there are others) in you
machine after disabling the integrated controller in the BIOS,
but if the integrated controller went south, it may just be
symptomatic of further failures and you'd be wise to replace
the motherboard. Trying the drive in another machine also
eliminates the variable that your machines 12 volt power
output being bad

3. If you get head clatter but a constant velocity on the
drive motor (no surging), you might try sticking the hard
drive in the freezer for about 12 hours. This is an old trick
from back in the days of the MFM/ESDI driver era. This can
cause the drive components to shrink enough to make the track
marker align with the tracks. We don't see that kind of
platter spindle wear much anymore, but back in the old days,
the balancing and bearings weren't as good. Still, under the
right circumstances, it might help. It would depend on how old
the drive is and how many hours of wear have occurred. You
have to be quick to get your info off the drive when it works.
Back then, the drives were much smaller, so there wasn't so
much to copy. So, go after the important data first.

4. The drive doesn't spin. Either the onboard controller is
bad or the motor is bad (assuming you did try the drive in
another machine). It's time to hit the net and local
independent shops to see if you can locate another drive of
the same make and model that's good. Since the drive is
probably an older drive and no longer in distribution, your
best bet is to find an identical used drive. If you know
someone with the same make and model, you might be wise to try
and persuade them to sell you their drive with an offer of
providing them with a free upgraded drive. If you can locate
an identical drive, start with the controller replacement ...
this is the simplest and least invasive. If swapping the
controller doesn't produce the desire result, you can tear
into the drive and swap the motors. While you have both drive
opened up to accomplish this, scrutinize the platters, heads
and armatures. You might even hook the drive up and power it
from a system with both drives attached. This way, you could
see anything that deviates between the actions of both drives
when they are initialized. Swapping patters is unlikely to
produce any positive result. They are a balanced system like
the tires on your car and I suspect that the balance will be
different for each drive as will other variables.

5. There's always Ontrack Corp. who will attempt to recoup
your info starting at $500 and going up from there. They don't
fix and return the drive either.

If the info is all that important to you, I would seek some
professional and experience technician in your locality who
makes his living from servicing and building computer systems
... not just selling them. If you have had much experience
salvaging information from bad hard drives, your likelihood of
success is low. In the case of soft corruption, all utilities
have their eccentricities. Often times, Norton Disk Doctor
will go too far (if you let it). It's wise to just let those
utilities small steps and then have a look at the drive and
see if you can copy it off. Norton will go so far as to rename
directories and files, and even delete them or break them up
into fragments which are useless.

Jan 25, 2008

A step-by-step guide to installing FreeBSD 5

A step-by-step guide to installing FreeBSD 5. It assumes moderate experience with linux and leaves you with a fully updated FreeBSD system.

FreeBSD Installation

A. 5.x vs 4.x
The first thing to understand about FreeBSD is that there are two lines of development. The -STABLE branch is marked with a 4.x version number and the most recent version is 4.10. It is well tested and very solid, but does not include the most recent technology. The -CURRENT branch, marked with a 5.x version, is the “unstable” branch. However, it is nicely stable at the moment and is coming along quite well. Most users should go with 5.x and these instructions are only valid for that tree.

NOTE: DragonFlyBSD ( www.dragonflybsd.org ) is a continuation of the 4.x line. It uses lock-less (no mutexes) SMP support and a Light Weight Kernel Threading system. It has a lot of promise and is developing at a breakneck pace, but it should still be thought of as “R/D.”

B. Getting Media
I am not going to say much about this. There are links to various ftp mirrors at www.freebsd.org and the directory structure is fairly self-explanatory. There are however several choices for ISO. You should choose the miniinst ISO. It is small and will include everything you need for the base system.

C. Starting Installation
After, the CD boots up you will enter the...ahh.....majestic sysinstall. You can safely ignore most of the options and just choose a standard installation. Most of the install process is pretty easy and anyone who has some experience with linux or unix will be able to handle it without much stress. However, creating partitions and dealing with drives will seem very odd to your standard linux user.

D. Hard Disc Management in FreeBSD
Ok, the first thing to get used to here is that IDE drives are not hda, hdb...etc. They are ad0, ad1 and so forth. SCSI discs are da0, da1...and so on. There is one other thing that is going to freak some people out. You create slices, not partitions, on the disc and then create partitions within those slices. For example, the first partition in the first slice on the first IDE disc would be ad0s1a. Just accept it.

E. Partitioning
Sysinstall will lead you through the partitioning and its fairly easy to understand. The first part will ask you to choose a disc or discs to partition and then will show you a "slice editor." This is where you will create your slice. I advise you to only make one. While multiple slices are easy to deal with, it just adds complication. If this is not your first installation of a BSD type OS, then you can ignore me and why are you reading this again?

After creating your slice, you will be prompted to choose the drive(s) to install an MBR on. The FreeBSD boot loader is nothing to write home about, but it tends towards working. After this step, you can create partitions. There is not much to say here. At the top of the screen it will show your slice(s) and when one of them is selected you can use the controls to create a partition on it. You will need at least a root and swap partition. On the non-swap partitions it is usually a good idea to enable soft-updates.

F. Distribution Sets
This is a simple section, select minimal.

G. Continue Installation
The rest of this is pretty simple. Make sure you install from the CD and not the Internet. The bulk of the install is now done. After it copies files to your disc, it will start the configuration process. This is all pretty self-evident, but there are a couple things you should know.

Network Configuration

Don't be scared by the names, in *BSD devices are named after their drivers. There is also a short description after the name, so you should be able to choose the right one. The rest of the network config is easy, just follow the prompts.

System Console Configuration

You can pretty much ignore this, you may want to look around for your own knowledge and of course you could pick a nice screen saver here, but other then that I would leave it alone for now.

Time Zone

All I have to say here is that if you live in the US, after you choose “America – North and South” hit the end key. The US is at the bottom of the list and hitting end is the quickest way there.

Linux

Say no, we will do this later and with an updated linux_base.

Mouse
OK, welcome to the wonderful and amazing world of moused. Answer the first question truthfully, and then you can tweak the settings in the “Please configure your mouse” dialog. Whatever you do, be sure to enable the daemon. Also, for most users that is all you will have to do. You can safely ignore the other options.

Package Installation

At this point, the installer will ask you to install binary packages. Say no. These binaries are out of date and not included on our CD.

Of users and roots

This isn't the most thrilling section, add a user when it asks you to and set a root password after that. The only thing I have to say about this process is when the new user dialog comes up leave the “Group:” box unchanged and add “wheel” to the Member groups. You also might want to set your shell to /bin/tcsh. As for setting the root password, if you can't handle that we have bigger problems.

Rebooting

Ok, next it will ask if you would like to visit the general config area. Select no and you will be brought back to the main menu. Exit the install, reboot without the CD in and enjoy the boot messages.

H. The Real Post-Install
At this point, I am going to assume that you are now looking at a login prompt and thinking “my my...FreeBSD boots quite quickly doesn't it.” Well, our task is not done yet...there is a reason we did a minimal install. We are going to do most of it ourselves. First, lets upgrade to -CURRENT. This isn't a practice I would usually recommend, but 5.x is close to being tagged stable and -CURRENT is rather solid at the moment. First, I need to explain how things are done in the BSD world.

Sup?

CVS up; you up; we all CVSUP. Cvsup is a very interesting program that I am not going to explain in detail here. All you really need to know is that it updates source trees. You see, that is the thing. You may be used to /usr/src not doing much. In BSD it has a job, it holds the source for the entire base system. However, we did a minimal install and no source is there. It wouldn't be up2date anyway. So, lets fix that. Login as root and type the following: pkg_add -r cvsup-without-gui

pkg_add is the binary installer for FreeBSD and the -r argument tells it to fetch binaries from the net. It will also fetch any deps that you might need. Switch to another console while this is happening and login as root. Do the following:

cd /etc

cp /usr/share/examples/etc/make.conf /etc/make.conf

cp /usr/share/examples/cvsup/standard-supfile /usr

cp /usr/share/examples/cvsup/ports-supfile /usr

chmod u+w /etc/make.conf /usr/standard-supfile /usr/ports-supfile

What was that? Well here is the rundown. Make.conf is the file that controls the building of programs from source on FreeBSD and the supfiles tell cvsup where to get the source for the base system and the ports system, also where to put said source. They come out of /usr/share/examples without the write bit set and that gets annoying. So we set that. Now switch back to the first console and type rehash. This tells tcsh to check its path for new programs. Now, edit the standard supfile that is in /usr. You can either use ee or vi. I like vi. Scroll down to the line that looks a bit odd. It will be something like:

*default host=CHANGE_THIS.FreeBSD.org

The “CHANGE_THIS” is where you put what cvsup server to use. Choose a number between 1 and 9, like 4, and put cvsup4 where CHANGE_THIS is. So it would end up being:

*default host=cvsup4.FreeBSD.org

Now exit your editor and run cvsup /usr/standard-supfile

If everything goes correctly, you will see a lot of text scrolling on the screen. If it says something about a bad connection, try another number.

Make.conf

Now 'tis the time for all good men (and women) to edit their make.conf . This is not difficult, in fact have a look around the file. It may be long, but it is pretty simple. Now, uncomment the CPU setting and the CFLAGS setting. Set the CPU to your CPU (there will be a list in the comments above the setting) and set the CFLAGS to -O2. (NOTE: If the base system fails to build, downgrade your CFLAGS back to -O).

Build Your World

When CVSUP finishes (it will be awhile...go get some coffee), cd to /usr/src and run make buildworld. That command will do exactly what it sounds like. It builds your world, or base system. While its doing that, lets get you a kernel. First, cd to /usr/src/sys/i386/conf then cp GENERIC to some file of your choosing. Any name you want. However, be aware that this is going to show up in a uname -a. Now, crack open your new file and take a look at what a FreeBSD kernel config is like. There are many things you can do here that will improve performance and subtract in size. However, lets keep it simple. Near the top of the file will be the name GENERIC. Change that to your new name. You can now look through the file and you will find several sections that are just for debugging. These will indeed add size and slow down the kernel a bit, but I would leave them for now. Go to the end of the file and make a new line. Add the following:

device pcm

This will add sound support to the kernel. Be aware that you don't need to do this, you can load binary modules at boot or after boot, but this way is easy and sound is used often. Save the file and exit. Go back to your buildworld console and when its done execute make buildkernel KERNCONF=YOUR_KERNEL_CONFIG_NAME

NOTE: NOT THE PATH OF THE KERNEL CONFIG..it knows to look in /usr/src/sys/i386/conf

Installing Your World

This isn't that difficult. First run make installkernel KERNCONF= your config name. Now here is the interesting part. Run mergemaster -p, this program looks through your etc and updates it to match the new /etc in /usr/src. It will display changed files to you, press q and it will give you options. Something like i (install), m (merge) etc. Pick merge and it will open a nice little screen that shows you one file on the right and one on the left. It will go section by section, showing the areas that have changed. Press r or l to choose which section to keep. Its pretty easy to see which section has new stuff and which does not. After the merge, it will prompt you with options for the newly merged file. One of these will be install and this is the one you want. In the latest current, most of what you will be showed is user and group files. Make sure you do select the sections with the new users and groups. After this is done, it will ask you a couple questions that you can say yes to. Now that your /etc is updated run make installworld then reboot.

NOTE: You usually don't need to run mergemaster. However, 5.2.1 is a pretty old release and -CURRENT has come a long way.


I. Ports

Welcome to running current. The rest is easy. cd back to /usr and edit the ports supfile the same way you did the standard one. Run cvsup on it and wait. After its done, you will have a full ports tree. There is not much left to say. You now have a working system and a fully updated one too. To install software from ports cd to /usr/ports/category/softwarename/ and run make install clean . If you want linux binary support, install the linux_base port. To find where it is cd to /usr/ports and run make search name=linux_base | less . Enable loading the kernel modules for linux binary support by editing /etc/rc.conf. Just add the line linux_enable="YES" to the file and your set. If this is a desktop system, I would recommend installing /usr/ports/x11/xorg and your choice of /usr/ports/x11/gnome2 or kde3. Have fun .

Get it from:

http://www.madpenguin.org/cms/?m=show&id=1853

Jan 10, 2008

Converting to NTFS


Your hard drive must be formatted with a file system such as FAT, FAT32 or NTFS so that Windows can be installed on to it. This system determines how files are named, organised and stored on the drive. If you’re not using it already, NTFS (New Technology File System) is recommended for Windows XP because of the additional functionality it offers. If your PC came with Windows XP pre-installed then there’s a chance that you’re already using NTFS. If you’ve upgraded from Windows 98 or Windows Me you may still be using FAT or FAT 32. The option to change over to NTFS would have been available during the upgrade process. Don’t worry if you skipped this as it’s possible to convert at any time from within Windows XP without losing any data.

The recommended option
There are a number of features in Windows XP that will only work if the NTFS file system is present, which is why it’s suggested you make use of it. File and folder permissions, encryption and privacy options are just some of those you’ll be able to access. In particular, those of you who have set up user accounts will find NTFS invaluable. For instance, if you continue to use FAT or FAT32 anyone with physical access to the drive will be able to access the files and folders that are stored there. However, with NTFS you’ll be able to use a level of encryption (Professional Edition only) that will enable you to protect your data.

You’ll also find NTFS more reliable in that it’s more able to recover from disk errors than its FAT or FAT32 counterparts. A log of all disk activity is kept so should a crash occur, Windows XP can use this information to repair the file system when your PC boots up again. To find out what file system you’re using, open My Computer, right-click your main hard drive and choose Properties. Take a look at the General tab to see confirmation of the file system that’s in use.

Convert now
You can use the convert tool in Windows XP to change the file system on your hard disk from FAT or FAT32 to NTFS. The whole process is safe and your existing data won’t be destroyed. To begin, click Start -> Run, type cmd and press [Return]. At the command prompt type convert c: /fs:ntfs and press [Return] (where ‘c’ is the letter of the drive you’re converting). When you try and run the convert utility, it’s likely that Windows XP will be using your paging file so the process won’t be completed immediately. Therefore, you’ll see a brief message on screen informing you that the conversion will take place instead the next time Windows starts up. Having restarted, the Check Disk utility will run, the conversion will be performed automatically and you may find that your PC will reboot twice more.

The benefits
With your drive now running NTFS, it’s time to take advantage of the new options that are available. Having created a number of different user accounts you can now control the level of access that’s granted to individual users. For example, there are going to be certain files and folders that you’ll want some users to be able to access but not others. If you have Windows XP Professional Edition you can do this immediately.

Right-click any file or folder, choose Properties and select the Security tab. A dialog will be displayed showing the names of all your users. Alongside will be two columns which enable you to select levels of access for each of them, the permissions include Full Control, Modify, Read and Write. You can then check the appropriate box to determine whether or not to Allow or Deny a particular permission. For Windows XP Home Edition users, the Security tab won’t be immediately available. To access this option you’ll need to restart your PC, pressing [F8] until a menu appears. Next select Safe Mode and wait for Windows XP to start up. You can then set your options in the same way.

Another feature is NTFS compression. It’s quick and seamless as your file or folder is decompressed automatically when you access it. (Don’t confuse this with a Zip compression utility where the files need to be extracted before they can be accessed.) Although you may have used NTFS compression on a file or folder, there’s no way of telling just by looking at it. To remedy this, open My Computer, click Tools -> Folder Options and select the View tab. Under Advanced settings, scroll down and check the option ‘Show encrypted or compressed NTFS files in color’, then click Apply and OK. Take a look at your compressed items in My Computer and you’ll see the text label has changed from black to blue. Something else that’s exclusive to Professional Edition users is the Encrypting File System (EFS). You can use this to protect your important data so that no one else can read it. Your encrypted files and folders will only be accessible when you have logged into your user account successfully.

Google