Skip to main content

Reinstalling GRUB Legacy after windows reinstall

After Windows reinstall the windows would overwrite the GRUB. If using Ubuntu 9.10 or later or have the GRUB2 installed then see here -

If using older GRUB legacy version then the situation is a little bit tricky but not hard. There are two ways to do this.

A) Use older LiveCD, possibly of Jaunty.

1. Make a bootable USB. Use unetbootin and not the Startup disk creator otherwise you will have the error

vesamenu.c32: not a com32r image


2. Boot into LiveCD.

3. Run grub

sudo grub

4. Find where Grub is.

grub> find /boot/grub/stage1
(hd0,5)

This may or may not be the correct partition where grub resides. If there is /boot partition in addition to a root partition then there might two locations where grub is installed for e.g. /dev/sda5/boot/grub and /dev/sda6/boot/grub. The one that contains the menu.lst is the one that is to be used. Figure out which one has this menu.lst file.

5. Then tell GRUB which partition your Grub is on by entering

grub> root (hd0,4)

Note the GRUb is really installed in /dev/sda5/boot/grub and not in dev/sda6/boot/grub as find claimed.

6. Commit it to MBR as well generate the boot menu. (Adding the kernel and initrd images manually is not needed.)

grub> setup (hd0)

should give a message that the menu is generated correctly. If the menu.lst is not found retry with other partitions.

7. Exit

grub> quit

B> Use newer LiveCD, like Maverick.

1. Make LiveCD. It does not have the syslinux problem.

2. Boot into LiveCD.

(next 3 points are from

3. Mount the /boot partition. Go to 'Places'-->'Removable Media' or just 'Places' and look under 'Computer' for the disk or partition you want to mount and click on it.

You should see an icon for it on your desktop, but what you may not see is the 'mount point', which will normally be located in your /media directory. We will need to know the file path and name of the mount point.

4. Find the name of the mount point,

ls /media

The file path that is returned from the above command will be needed for making up the next command. The name of the mount point might be a file system LABEL or UUID number. For my example I'll just use the word 'disk' for short.

5. Run the grub-setup command, inserting the -d option and specifying the path to the /boot/grub directory of the operating system you're trying to fix,

sudo grub-setup -d /media/disk/boot/grub /dev/sda

The -d option tells GRUB to use files from the specified directory.
Please substitute the word 'disk' with the name of your own mount point as found in step 3)
The '/dev/sda' part tells grub-setup to install GRUB to MBR in the first hard disk, which is called '/dev/sda'.
You may use the same command to install GRUB in any other disks in your computer by replacing the /dev/sda part of the command with /dev/sdb or /dev/sdc and so on.

- If the command fails with feedback about not being able to access a device.map file, you might need to try again and specify the exact device.map file to use with the -m option.
sudo grub-setup -d /media/disk/boot/grub -m /media/disk/boot/grub/device.map /dev/sda
The -m option tells GRUB what device.map you want to use.

6. Now, the GRUB2 is installed into MBR. But chances are that only stage 1.5 is installed and not the boot menu.

7. Reboot. If the menu shows fine otherwise it would drop to the grub> prompt. Then follow steps from A> 4. above onwards (finding the grub etc.).




Comments

Popular posts from this blog

Fastest way to send multiple drafts from gmail

People claim that the fastest way to send multiple email drafts is to use Gmail IMAP with email client like Outlook or Evolution or Thunderbird. But I have found this is not true. Because Thunderbird and Evolution etc. email clients treats the drafts as emails still to be edited. So it is not just simple select all and hit send. Each email draft has to be opened and sent separately. That is a lot of clicks and mouse movements, wasting precious time and energy. I have a better solution which involves minimum keystrokes and mouse usage. Efficiency booster technique for sending emails. If someone is feeling adventurous and want to try it from the Gmail interface itself, here's how to do it in the fastest possible manner. It involves using the mouse once. Select the first draft. Gmail would open a new email box and put the cursor inside the box to write. Press TAB once to go the Send button. Press ENTER to send. Now Gmail sends it and the box is gone but the highlight goes to the last

LYRICS OF CHANDRABINDOO

___________________________________________________________________ SWEET HEART FROM AAR JAANI NAA(T-SERIES) -- SWEETHEART -- Pratham college-er din ta Aajo thik e mone poRey scene ta Dada didi haath dhorey siNRi tei bose poRey Aamar chokh ta ghorey bon bon bon bon Sweetheart, I am seating alone Sweetheart, for me there is none DhoNk gile chole gelo pratham maas Meye dekhlei feli deergho-shwash DhoNk gile chole gelo pratham maas Meye dekhlei othe nabhishwash Meyera bheeshan smart poRey chhoto mini-skirt Aamar e je sheet korey kon kon kon kon Sweetheart, I am seating alone Sweetheart, for me there is none Taarporey kete gelo maas chaar Fuse holo je kato future Bandhura purse khule eke oke taake tole Aamar pran ta korey chon mon chon mon Sweetheart, I am seating alone Sweetheart, for me there is none Ekdin lawn theke beriye Ek tanayaar dike taakiye Hawt korey ki je holo magaj ta ghurey gelo Taar kaaner saamne kori ghyan ghyan ghyan ghyan Sweetheart, I am seating alone Sweethea

Changing the font size of section headings in LaTex

You have several ways to do so: 1.- A direct redefinition of \section: \makeatletter \renewcommand\section{\@startsection{section}{1}{\z@}%                                   {-3.5ex \@plus -1ex \@minus -.2ex}%                                   {2.3ex \@plus.2ex}%                                   {\normalfont\large\bfseries}} \makeatother 2.- By means of the titlesec package: \usepackage{titlesec} \titleformat{\section}{\large\bfseries}{\thesection}{1em}{} 3.- By means of the sectsty package: \usepackage{sectsty} \sectionfont{\large} source : http://www.latex-community.org/forum/viewtopic.php?f=4&t=3245   Now, I would explain the titlesec package a bit more (because it seems easier to me and with more options) : To change the section fonts with this package put the following lines in the preamble - \usepackage{titlesec} \titleformat{\ section }{\ large \ bfseries }{\thesection}{1em}{} Options available are- a> Font size - \normals