Link to home
Start Free TrialLog in
Avatar of gvsbnarayana
gvsbnarayana

asked on

Linux and Vista dual boot

Hi,
  This is my situation.
1. Installed Windows Vists
2. Install Linux on a different partition on the same SATA drive. Boot sequence prepared in Linux using GRUB
3. Re-install Vista on it's own partition
4. Try editing Boot Loader using Easy BCD
Now, I am not able to access linux, as the MBR is over-written by Vista installation.
I try to boot using the original DVD and I am able to see all the files of Linux but I am not able to create a boot loader using the Grub.
Can you please let me know, how I can fix this problem?
Thanks in Advance,
Regards,
Badri.
Avatar of LeeTutor
LeeTutor
Flag of United States of America image

From this page, it seems that you cannot use the Vista bootloader, but must use Grub:

http://www.pronetworks.org/forum/about78184.html
How to: Dual-boot Windows Vista and Linux
Avatar of gvsbnarayana
gvsbnarayana

ASKER

Hi,
    Sorry, I was getting a grub prompt when I try to boot after creating a boot menu with Easy BCD. Any command I give results in a error.
The above links are not much of use.
Can you please guide me in detail? I am a beginner in Linux.
Thanks and Regards,
Badri.
You could possibly install vmware server and run one of the operating systems as a virtual machine
Hi Badri,

I'm not clear on what you can/can't do at the moment.  Perhaps you could clarify?

When trying to boot:

a) Do you get the grub menu?
b) Can you boot to Windows (Vista)?
c) Can you boot to Linux?

Specifically, what errors do you get when trying to boot?

In Linux, perhaps you could also list the contents of either /boot/grub/grub.conf or /boot/grub/menu.lst.

If you can't boot to Linux to find this information, boot Linux from a Live CD (most distros have Live CDs now).  You would then need to mount the Linux / or /boot partition to read the info.  If you don't know how to do this, then I think you should not be dual-booting.  Instead, follow adolphus850's advice and install VMware server (free from www.vmware.com) and install Linux into VMware instead.

Regards,
Steve :)
Hi Steve,
  1. Immediately after re-installing Vista (on existing Vista and Linux on a different set of partitions), I was not able to see any boot menu.
2. I edited the boot loader using Easy BCD tool and now, I can see prompt to select OS while booting.
3. When I select Linux, then I am presented with grub> prompt after the system tried to boot using Linux.
4. I tried creating a boot sector using
root (hd5,0)
root (hd0,5)
I keep on getting errors. I will post the exact error in few minutes ..(Don't have that system at hand)
I am having little doubt, whether I am trying to create grub on right partition or not. I have got more than 10 partitions (some physical and some logical) and is there any way to know, how I can find out the exact partition my Linux is installed?


I tried booting the system using the CD .. Linux Enterprise shows me some options and I choose
"Linux rescue" which mounted the file systems under /mnt/sysimage
I can see all the files of Linux in the same directories but mounted on /mnt/sysimage
for ex: /opt/oracle is now visible as /mnt/sysimage/opt/oracle

Installing MVWare :-> Sorry, I would prefer my system to be dual boot rather than a virtual machine.

Thanks in Advance,
Regards,
Badri.
As you can boot the system using the CD - you data is fine.
Run cat /boot/grub/menu.lst
Post what that outputs to the Q.

You should see the correct values that you need to type in:
root (hdx,x) (as above - but the correct partitions)
Before that, though run [fdisk -l] (no square brackets) to check out your partition table.
Could you post the output of that to this question as well?



Why did you do #3 as stated in the question? Re-installing windows mangled the bootloader. I think the way of less pain is to do it over again, doing only #1 and #2 in your list. Let windows use only part of the hard drive, or let Ubuntu resize the windows partition during install; both should work OK. Any partitions needed for Ubuntu will be created during install procedure.
/RID
ASKER CERTIFIED SOLUTION
Avatar of sda100
sda100
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi and235200,
   This is the content of menu.lst (pointing to grub.conf)
default=2
timeout=5
splasimage=(hd0,4)/grub/splash.xpm.gz
hiddenmemu
title Enterprise(2.6.9-42.0.0.0.1.Elsmp)
      root(hd0,4)
      kernel /vmlinuz-2.6.9.42.0.0.0.1.ELsmp  ro root=LABEL=/ rhgb quiet)
      initrd /initrd-2.6.9-42.0.0.0.1.ELsmp.img
 title Enterprise-Up (2.6.9-42.0.0.0.1.El)
      root(hd0,4)
      kernel /vmlinuz-2.6.9.42.0.0.0.1.ELsmp  ro root=LABEL=/ rhgb quiet)
      initrd /initrd-2.6.9-42.0.0.0.1.ELsmp.img
title Vista
     root(hd0,2)
    chainloader +1


****
Output of fdisk -l  (listing im. columns only)
device       Boot
/dev/sda1                                                Dell Utility
/dev/sda2   *                                           HPFS/NTFS
Partition 2 does not end on cylinder boundary
/dev/sda3                                              HPFS/NTFS
/dev/sda4                                              Extended
/dev/sda5                                              Linux
/dev/sda6                                              Linux
/dev/sda7                                             Linux
/dev/sda8                                             Linux Swap
/dev/sda9                                              Linux
/dev/sda10                                            Linux
/dev/sda11                                              HPFS/NTFS

Can you guide me for the next steps please?
Thanks and Regards,
Badri.





Hi Steve,
   The following is the output of mount
/dev/root.old on / type ext2 (rw)
/proc on /proc type proc (rw,nodiratime)
/dev/pts on /dev/pts type devpts (rw)
/sys on .sys type dysfs (rw)
none on /tmp typr ramfs (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
....
...
...
/dev/sda9 on /mnt/sysimage type ext3 (rw)
/dev/sda5 on /mnt/sysimage/boot type ext3 (rw)
/dev/sda10 on /mnt/sysimage/opt type ext3 (rw)
/dev/sda6 on /mnt/sysimage/opt/oracle type ext3 (rw)
none on /mnt/sysimage/proc type proc (rw,nodiratime)
none on /mnt/sysimage/sys type sysfs (rw)
/dev/sda7 on /mnt/sysimage/var type ext3 (rw)
/dev/root.old on /mnt/sysimage.dev type ext3 (rw)


Regards,
Badri.
Hi Badri,

You DID have to make things complicated by having / and /boot on separate partitions... I'm sure Ubuntu doesn't do that by default.  I've assumed Ubuntu, but what distro are you using?

Anyway...

'/dev/sda' means it's a SATA (SCSI to Linux) drive

'/dev/sda5' is the first logical drive in the extended partition (/dev/sda4 is the extended partition itself)

'/dev/sda9' is the / logical drive

Right, grub sees partitions differently than the linux devices, basically it starts counting partitions from 0 instead of 1, so...

'(hd0,4)' is actually the same as '/dev/sda5', the first logical drive in the extended partition, and this is where it want to boot from.

Your grub.conf file looks ok to me - I'm kinda getting out of my depthe here now, but if it was me, I would boot up with your rescue CD and re-run grub, following this article (I've paraphrased it here, but best use the article for better reference).

http://www.howtogeek.com/howto/ubuntu/reinstall-ubuntu-grub-bootloader-after-windows-wipes-it-out/

Boot with rescue CD, then:

     sudo grub
     > root (hd0,0)
     > setup (hd0)
     > exit

Reboot to Linux, then make sure these lines appear in your grub.conf.  NB: I've adjusted (hd0,2) to match your setup - in the article it lists (hd0,0).

     title   Windows 95/98/NT/2000
     root   (hd0,2)
     makeactive
     chainloader   +1

I hope this helps!

Steve :)
Hi Steve,
    Sorry, It's Oracle's Enterprise Linux, also known as Unbreakable Linux.
So, I can edit the grub and place
title   Windows 95/98/NT/2000
     root   (hd0,2)
     makeactive
     chainloader   +1
?
Anything else I have to write for Linux?
Regards,
Badri.



Are exact values for my case? I am afraid that I will loose my Vista data.
I don't think that
Thanks and
 
Hi Badri,

Nothing there is going to make you lose your Vista data.  All you're doing is going to rewrite the MBR (Master Boot Record).  No partitions are being altered or deleted.

The worst case scenario is that you can't boot Vista, in which case just rewrite the Vista MBR using "bootsect"

Steve :)
Hi Steve,
  Thanks a lot. I will try this in the evening and will update you.
Thanks a lot for the help.
Regards,
Badri.
Hi Steve,
    Wonderful... Thank you...
But now, the problem is, it seems that I forgot the password of root as well as oracle. How can I reset the password?
Thanks and Regards,
Badri.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks a lot steve and thanks a lot and235100
You have helped me a lot
Regards,
Badri.
Hope you got back to a working state.
Thanks.
You're more than welcome Badri!

Steve :)