I Screwed Up The Menu.lst File


Recommended Posts

OK, I should know better but I deleted something in the menu.lst file and now

Ubuntu is the ONLY thing that will boot when I start windows. I had wiped the 2nd HD and then partitioned it so I could use some for WinXP backup, and I made a 10 Gig partition in FAT 32 so I could transfer files and then installed Ubuntu (again)

into the unallocated space.

I was trying to edit the menu.lst file so I could get windows XP to boot

by default like I did before because my wife uses the computer, too, and she

doesn't get along with Linux.

Long story short......I fixed it good!!

What I did THEN was repair the MBR but now I don't have the dual boot option

anymore. Is it possible to JUST install the grub loader from the Ubuntu CD without having to do a whole reinstall? If so, how do I go about this.

Thanks......jim

Link to post
Share on other sites

There shouldn't be any reason for you to reinstall Ubuntu, or grub for that matter. Im alittle unclear on if you dont have an entry for windows in menu.lst or if it just isn't the default. Respectively you can add a line similar to

title           Microsoft Windows XP Home Edition
root            (hd0,0)
savedefault
makeactive
chainloader     +1

to add windows to the list, or change the 'default' line to your windows entry (try 4). Let me know if I misunderstood you. (hd0,0) is the first partition on first hard disk, change this if your win partition isn't there.

Edited by naraku9333
Link to post
Share on other sites

That sounds doable, however, I redid the MBR and lost the ability to dual boot and now have no way to boot into Linux so I can't edit the menu.lst file.

Any other suggestions?

Link to post
Share on other sites

You will need to chroot your system. Just boot with any live version of linux. Then open up a terminal and change to root user. then do

#mkdir /mnt/ubuntu
#mount /dev/hd* /mnt/ubuntu
#mount -t proc proc /mnt/ubuntu/proc
#chroot /mnt/ubuntu
#source /etc/profile

this line mount /dev/hd* /mnt/ubuntu will have to be changed to your main ubuntu / partiition, for example it may be /dev/hd3

now that your system is chooted. you can install grub.

#grub
grub>root (hd0,0)    #this will change you to a grub prompt
grub>setup (hd0)     # this command installs grub to your mbr
grub>quit

the line root (hd0,0) will have to be changed to reflect the location of your /boot partition. hd0 is your first ide device and hd1 is you second ide device. ,0 represents the first partition of that device. For example if you boot partition is on you third partition of your first ide device it would be called hd0,2

now the following code will unmount everything

#exit
#umount /mnt/ubuntu/proc
#umount /mnt/ubuntu
#reboot

here is a link to the doc for setting up grub

http://www.gentoo.org/doc/en/handbook/hand...?part=1&chap=10

Edited by shanenin
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...