Saturday, August 14, 2010

Recovering Boot Loader

Hi everyone!! I am back with my second blog… This time it’s regarding recovering boot loader. I have tried to be short & precise....

It may happen that if you have windows installed on your system and you install Linux natively on it, your Windows boot loader gets lost. Your whole data will be there, just that you need to restore the boot loader… This is how you can do it:
  • Insert your Windows installation CD (I tried with Windows 7).
  • When you get to the second screen (after you choose your language) go to ‘Repair your computer’.
  • Go to command prompt and type this in without the quotes (") :
    "bootrec /fixmbr”
  • Press enter.
  • Type this in without the quotes (") :
    "bootrec /fixboot"
  • Press enter
  • Restart

In case you install Windows after Linux (in my case, Ubuntu version), Linux boot loader (here, Grub) wont exist anymore. Here’s the quick and easy way to re-enable Grub:

  • Boot off the Live CD
  • Open a Terminal and type in the following commands, noting that the first command will put you into the grub “prompt”, and the next 3 commands will be executed there.

    sudo grub

    find /boot/grub/stage1
    root (hd?,#)
    setup (hd?)
    quit
    (where hd?,# is returned from find command)
  • Reboot (removing the CD)

There are high chances that when you restore windows boot loader, the MBR would be rewritten (since windows doesn't want to recognize any other OS!). So its preferrable that windows should be installed first and then linux.

Queries & comments are always welcome!! :)

Installing linux without using cds or pen drives...

I have gotten all the info. from the following link:

http://www.instantfundas.com/2007/08/install-any-linux-distro-directly-from.html

All i have done is simplified the language and cut out the unnecessary details.(There may be a mixture of we's and you's that clearly indicate some of it has been typed and some of it has been simply copy pasted. i will not try to fool you guys into thinking i typed the whole thing).

I HAVE JUST TRIED TO MAKE ALL THE INFORMATION EASIER TO COMPREHEND AND AVAILABLE HERE SO IT IS EASY TO ACCESS)

This is mainly for installing linux on computers with windows already installed.

It's main use is if you want to constantly upgrade to a newer version of linux without wasting cds.
Almost all Linux installers uses two files to boot the computer: a Linux kernel(about which sir talked about recently in SM class), and an initial root file system containing a minimal set of directories that is mounted prior to when the real root file system is available. This initial root file system is also called Ram disk (initrd). We will use these two files to boot our PC.

1. First we need to copy the ISO file of Linux to our hard disk . Make sure that the partition is FAT32 unless the distro( you are installing has native NTFS read/write support. It's best to copy the iso to the root of the partition because otherwise, the setup might not be able to detect it.

2. Use Winrar to open the ISO file and extract the two files mentioned earlier(kernel and the root file system one). They are usually found inside a directory called isolinux. They are in different places depending on the distro so we need to search for them(it's not that difficult ;) ). btw they are also named differently depending on distro. The files that you will need to search and extract are: (the kernel file is shown in green and the Ram disk is shown in red)

Fedora: vmlinuz and initrd.img

Suse: linux and initrd

Mandriva: vmlinuz and all.rdz

Ubuntu: vmlinuz and initrd.gz

Gentoo: gentoo and gentoo.igz

Knoppix: vmlinuz and initrd.img

Slackware: bzImage and initrd.img

Debian: vmlinuz and initrd.gz

3. After you have extracted the two files, copy them to c:\boot (you will need to create the folder "boot")

4. Now download the file called grub4dos. The source from which i got this info. said the newer versions aren't working but version0.4.1 works. Direct download link Extract the folder "boot" and the file "grldr" from the downloaded zip file. Inside the folder "boot" is another folder called "grub"; copy the folder "grub" to c:\boot. Copy the file "grldr" to c:\

5. Open c:\boot\grub\menu.lst and add these following lines. (Notice that hd0 refers to the first hard drive. If you have more than one hard drive, they will be named hd1, hd2 etc. Replace hd0 with the proper hard drive number incase you have windows installed on another drive.) Replace Linux_kernel and Ram_disk with the appropriate file names below. (the ones you copied to c:\boot)


title Install Linux
kernel (hd0,0)/boot/Linux_kernel
initrd (hd0,0)/boot/Ram_disk


6. Now you have to add grub to your c:\boot.ini file. You can open boot.ini by clicking on Start>Run and typing c:\boot.ini. If Windows does not allow the file to be modified, then go to Control Panel>System and click on the Advanced tab. Now under Startup and Recovery click Settings and then under System Startup click Edit. Open boot.ini and add this line in the end.

C:\grldr=”Start GRUB”

7. You are now ready to install Linux. Restart your PC and from the boot screen select "Start GRUB". This will load GRUB. From the grub screen select "Install Linux". During the setup you will be asked the source of installation. Choose hard disk and then select the hard drive partition where you copied the ISO files. Sometimes you might have to type the whole path of the partition and the exact name of the ISO. So write it down before you begin.

Honestly I haven't personally tested anything but again the source from where i got this info said"I have personally tested this with Fedora, Suse and Mandriva and it works without problem. I have no doubt it will work for others too" so i think everything should be fine.

Hope you guys found it helpful. I tried my best.(First blog EVER!!)

THE END

I REALLY NEED TO GET SOME SLEEP NOW..............
:D :D :D

NTFS VS FAT -- WHICH ONE IS RIGHT FOR YOUR PC ?

since, we were taught about the file systems in the last lecture, so i am blogging on it.

                                                                      NTFS or FAT, which one is better? For most users running Windows XP, NTFS is the obvious choice. It's more powerful and offers security advantages not found in the other file systems. But let's check the differences among the files systems so we're all clear about the choice. There are essentially three different file systems available in Windows XP: FAT16, short for File Allocation Table, FAT32, and NTFS, short for NT File System.


FAT16

The FAT16 file system was introduced way back with MS–DOS in 1981. It was designed originally to handle files on a floppy drive, and has had minor modifications over the years so it can handle hard disks, and even file names longer than the original limitation of 8.3 characters, but it's still the lowest common denominator.
                               The biggest advantage of FAT16 is that it is compatible across a wide variety of operating systems, including Windows 95/98/Me, OS/2, Linux, and some versions of UNIX.
                              The biggest problem of FAT16 is that it has a fixed maximum number of clusters per partition, so as hard disks get bigger and bigger, the size of each cluster has to get larger. In a 2–GB partition, each cluster is 32 kilobytes, meaning that even the smallest file on the partition will take up 32 KB of space. FAT16 also doesn't support compression, encryption, or advanced security using access control lists.

FAT32

The FAT32 file system, originally introduced in Windows 95 Service Pack 2, is really just an extension of the original FAT16 file system that provides for a much larger number of clusters per partition. As such, it greatly improves the overall disk utilization when compared to a FAT16 file system.
                                                                However, FAT32 shares all of the other limitations of FAT16, and adds an important additional limitation—many operating systems that can recognize FAT16 will not work with FAT32—most notably Windows NT, but also Linux and UNIX as well. Now this isn't a problem if you're running FAT32 on a Windows XP computer and sharing your drive out to other computers on your network—they don't need to know (and generally don't really care) what your underlying file system is.

NTFS

The NTFS file system, introduced with first version of Windows NT, is a completely different file system from FAT. It provides for greatly increased security, file–by–file compression, quotas, and even encryption. It is the default file system for new installations of Windows XP, and if you're doing an upgrade from a previous version of Windows, you'll be asked if you want to convert your existing file systems to NTFS. Don't worry. If you've already upgraded to Windows XP and didn't do the conversion then, it's not a problem. You can convert FAT16 or FAT32 volumes to NTFS at any point. Just remember that you can't easily go back to FAT or FAT32 (without reformatting the drive or partition), not that I think you'll want to.
                                                The NTFS file system is generally not compatible with other operating systems installed on the same computer, nor is it available when you've booted a computer from a floppy disk. so, it is, recommended that users format at least a small partition at the beginning of their main hard disk as FAT. This partition provided a place to store emergency recovery tools or special drivers needed for re-installation.

When to Use FAT or FAT32

If you're running more than one operating system on a single computer , you will definitely need to format some of your volumes as FAT. Any programs or data that need to be accessed by more than one operating system on that computer should be stored on a FAT16 or possibly FAT32 volume. But keep in mind that you have no security for data on a FAT16 or FAT32 volume—any one with access to the computer can read, change, or even delete any file that is stored on a FAT16 or FAT32 partition. In many cases, this is even possible over a network. So do not store sensitive files on drives or partitions formatted with FAT file systems.

                          if you have anything to say about my blog, feel free to comment.

Monday, August 9, 2010

Are you buying the right PC?

Acknowledgements
I would like to thank my SM teacher for giving me this opportunity to write this blog and also those of you dumb enough to read beyond this point. You guys really made my effort worth it. Also, the following sites have really been helpful.


http://www.google.com/
http://computers.toptenreviews.com/gaming/


This blog is more or less a rough guide for those of you looking to buy a laptop or PC suitable to your gaming needs, if any. I'm a fan of PC games and the biggest problem that I've encountered while buying my laptop is the variety that is available in the market. Lets face it, there are just too many options to choose from and they've certainly had me thinking way more than I normally would. There are way too many numbers and facts thrown at you when you go in the market to buy a laptop and half of these are just petty marketing schemes, determined to sell their product. The question is, what are the things that really matter and what are the things that one should ignore while buying a laptop or a PC suited to his or her needs.

Like I said, I'm a fan of PC games so this blog will mainly tell you what you should look for, if you're thinking of buying a laptop for similar needs. The following is a general list of the things that are of importance in a gaming PC and that affect its performance :-

Processor
A fast CPU, or processor is very important. Some systems include powerful quad-core processors also(only in PCs, not in laptops though).

Memory
Large amounts of memory allows the computer to quickly access frequently used information or programs which is a critical component for gaming. A good gaming PC/laptop should have at least 1 GB of RAM and sufficient hard drive space to have multiple games installed at a time.

Video
A game is only as good as the graphics card supporting it. Many games have life–like, real–time images that require a powerful graphics card. ATI and nVidia graphics cards are the most common amongst gamers, and at least 256MB of proprietary video RAM is needed for most current games.

This is more or less, a general overview of what matters in a gaming machine. I would also like to tell you what really matters to you, as a buyer. As far as the processor is concerned, the latest versions available in the market are Celeron Dual Core i3 and Intel Core 2 Duo i5 and Xeon i7. Xeon i7 is used mainly as a server and is of not of much use. The main choice is between Dual Core i3 and Core 2 Duo i5. I talked to my uncle who is in a related field and other people with relatively more knowledge of this subject than me and most of them advised me to buy i5. Some even said that its better to buy just Core2Duo instead of dual core i3 but these are just personal opinions that may vary from 1 person to another. I'm sure you must be having views of your own which would probably differ from what I'm writing here. Apart from processors, even the graphics card or the video card plays a vital role. There are two main brands in this field, ATI and nVIDIA. In case of laptops, I've been suggested the following video cards :-
          
          ATI Mobility Radeon HD 5470 1 GB GDDR3
          NVIDIA GT230M 1 GB/512 MB GDDR3
 
Also make sure that you buy a hard disk with sufficient space. High end games do take up space around 10 GB. I would suggest a 320GB hard disk which rotates at around 5400 rpm. This is the specification that I'm  going to buy. I would also suggest, if possible, that you get your laptops from US. There is a price difference of around 15-20 thousand rupees and you get a larger variety and customization options there.I've been looking at Dell laptops mainly. They have their Alienware series of laptops which are exclusively for gaming but this series is a bit expensive. It'll cost you 40K and more even if you buy it from US and much much costlier here. You can check out the laptops of other brands and let me know if there is something I should know on this issue. Thank you for your time.

Sushant Mehta
roll no. 2010088

Saturday, August 7, 2010

POST ON P.O.S.T.(Power-on self test)

i am blogging on power on self test which we did in our 2nd lab session.

The first thing that the BIOS does when it boots the PC is to perform what is called the Power-On Self-Test, or POST for short. The POST is a built-in diagnostic program that checks your harware to ensure that everything is present and functioning properly, before the BIOS begins the actual boot. It later continues with additional tests (such as the memory test that you see printed on the screen) as the boot process is proceeding.
                                                     The POST runs very quickly, and you will normally not even noticed that it is happening--unless it finds a problem (amazing how many things are like that, isn't it?) You may have encountered a PC that, when turned on, made beeping sounds and then stopped without booting up. That is the POST telling you something is wrong with the machine. The speaker is used because this test happens so early on, that the video isn't even activated yet! These beep patterns can be used to diagnose many hardware problems with your PC. The exact patterns depend on the maker of the BIOS; the most common is  AMI BIOSes. This part of the Troubleshooting Expert will help you figure out what the POST beep codes mean and what to do about them, if you are having this problem.
Note: Some POST errors are considered "fatal" while others are not. A fatal error means that it will halt the boot process immediately (an example would be if no system memory at all is found). In fact, most POST boot errors are fatal, since the POST is testing vital system components.

                                                        Many people don't realize that the POST also uses extended troubleshooting codes that you can use to get much more detail on what problem a troublesome PC is having. You can purchase a special debugging card that goes into an ISA slot and accepts the debugging codes that the BIOS sends to a special I/O address, usually 80h. The card displays these codes and this lets you see where the POST stops, if it finds a problem. These cards are obviously only for the serious PC repair-person or someone who does a lot of work on systems.

Below are the AMI BIOS Beep codes that can occur. However, because of the wide variety of different computer manufacturers with this BIOS, the beep codes may vary.
Beep CodeDescriptionsDocument
1 shortDRAM refresh failureCH000996
2 shortParity circuit failureCH000607
3 shortBase 64K RAM failureCH000996
4 shortSystem timer failureCH000607
5 shortProcess failureCH000607
6 shortKeyboard controller Gate A20 errorCH000383
7 shortVirtual mode exception errorCH000607
8 shortDisplay memory Read/Write test failureCH000607
9 shortROM BIOS checksum failureCH000607
10 shortCMOS shutdown Read/Write errorCH000239
11 shortCache Memory errorCH000607
1 long, 3 shortConventional/Extended memory failureCH000996
1 long, 8 shortDisplay/Retrace test failedCH000607
  This table is also present in the slides available on amarjeet sir's website but links are given here . the following links show the problem, the cause of the error and how to correct it.
                          for any questions or queries, please do write .

Thursday, August 5, 2010

INSTALLING LINUX ON DUAL BOOT MODE

Hi I am new to writting blog so I am just giving the link to a very good article describing an accurate method to install linux/xp/vista or any other operating system on dual boot mode :

http://apcmag.com/how_to_dualboot_vista_with_linux_vista_installed_first.htm


PS: the last page is a little bit difficult to understand for a non technical user , but just follow the instructions, you can also ignore the last page

Wednesday, August 4, 2010

PARITY BIT

SORRY, THIS BLOG CAME 1 DAY LATE.

                             I WOULD LIKE TO START THE BLOG BY RAISING A QUESTION - WHAT IS PARITY BIT ?         
                                   PARITY BIT IS A BIT THAT IS ADDED TO THE CODE FOR THE DETECTION OF ERROR DURING THE TRANSMISSION OF THE CODE.
                                                        PARITY BIT IS GENERALLY ADDED TO THE LEFTMOST SIDE OF THE CODE.
                                           
                                      THERE ARE TWO TYPES OF PARITY-EVEN PARITY AND ODD PARITY. IN EVEN PARITY, THE BIT ADDED IS SUCH THAT THE NUMBER OF 1s IN THE CODE IS EVEN AND IN ODD PARITY, THE BIT ADDED IS SUCH THAT THE NUMBER OF 1s IN THE BINARY CODE IS ODD.
                                             
                                          NOW, I WOULD TO THROUGH SOME LIGHT ON HOW PARITY BIT CAN BE USED FOR THE DETECTION OF ERROR DURING THE TRANSMISSION OF THE CODE. GENERALLY, AN EVEN PARITY IS CREATED AT THE TRANSMISSION END BY THE ADDITION OF DESIRED BIT. THEN, THE CODE IS TRANSMITTED AND THE PARITY OF THE CODE IS CHECKED AT RECEIVING END. IF THE PARITY OF THE CODE HAS CHANGED FROM EVEN TO ODD, THEN, IT MEANS THAT EITHER 1 OR 3 OR AN ODD NUMBER OF BITS ( EXCEPT THE PARITY BIT ) IN THE CODE HAVE  CHANGED THEIR VALUES DURING TRANSMISSION.
                                       
                                                            BUT, IF THE PARITY OF THE CODE REMAINS SAME, THEN THERE ARE TWO POSSIBILITIES THAT EITHER THE CODE IS SAME (MORE PROBABLE) OR AN EVEN NUMBER OF BITS HAVE CHANGED THEIR VALUES DURING TRANSMISSION( LESS PROBABLE ). THIS IS THE LIMITATION OF THE PARITY BIT. BUT THE CASE OF EVEN CHANGES OF BITS HAPPENS QUITE LESS TIMES, HENCE, THE PARITY BIT METHOD IS A GOOD WAY TO DETECT ERROR IN THE CODES DURING TRANSMISSION.
                           I WOULD LIKE TO EXPLAIN THE ERROR DETECTION PROCESS BY AN EXAMPLE - SUPPOSE 0110001 IS THE CODE TO BE TRANSMITTED(NOTE THAT NUMBER OF 1s IN CODE IS ODD ). NOW, BY ADDING 1 TO THE LEFT OF THE CODE, THE CODE BECOMES EVEN PARITY AND THE NEW CODE IS 10110001. THIS CODE IS TRANSMITTED TO THE RECEIVER WHERE ITS PARITY IS CHECKED. IF THE CODE RECEIVED IS 10100001, THEN , IT MEANS THE PARITY HAS BECOME ODD WHICH CAN BE DETECTED. BUT, IF THE CODE RECEIVED IS 11100001, THEN, THOUGH TWO BITS HAVE CHANGED THEIR VALUES DURING TRANSMISSION, BUT THE PARITY OF THE RECEIVED CODE IS SAME , SO SUCH KIND OF ERRORS CANNOT BE DETECTED USING PARITY BIT.

                           IF YOU HAVE ANY QUESTION TO ASK OR ANY ADVICE ON HOW TO MAKE THIS BLOG MORE INTERESTING, THEN FEEL FREE TO COMMENT .