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?)
    (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:

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).


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!!)


:D :D :D


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.


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.


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


The 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.