PDA

View Full Version : [ubuntu] Installing Windows 7 one HDD Ubuntu 9.10 Another



lechip
December 5th, 2009, 09:26 PM
Hey guys.
Ok i usually use Ubuntu to work and windows as my gaming platform.
I had no problem dual booting in the 9.01 era in another pc now i got a new onw and i wanted to get both systems running.

I had a 120GB Maxtor SATA disk and a 600GB Hitachi SATA disk for Games and stuff. At first i wanted to install Windows 7 on a partition (30GB) of the 120GB one, then Ubuntu on another 30GB aprtition and the rest for storage.
The problem was that once i booted ubuntu live CD, my Maxtor drive wouldn't appear.
I got myself an old 30GB IDE drive and installed ubuntu 9.10 there, and Windows 7 on the first partition of the Maxtor drive. ok cool but... GRUB wouldt start since my hd0 was the one with windows7, so it would start windows7 once i ppowered up. I decided to change the hdd boot from BIOS, making the one with Ubuntu the hd0. And ubuntu would load without showing grub or anything. so I would had to change the boot druve by BIOS everytime i wanted to change form SO.

The other day i decided to try kubuntu since i was getting a lot of fuss bout ubuntu 9.10, isntalled it over the 30GBIDE drive and to my surprize, it's grub detected windows on the other drive. That was cool but i really feel uncomfortable in kubuntu, so i copy the grub.cfg from it (in case i could use it in ubuntu) and reinstalled ubuntu.

As expeted ubuntu wouldnt detect windows 7 so i used my previously kubuntu grub.cfg to see if i could make it work, to my surprize it did work. So i just made my Ubuntu dirve (the 30GB IDE drive) my hd 0 from BIOS and it would work.

Yet every time ubuntu updates the kernel (and i assume grub2 runs its update-grub command) my windows 7 boot entry dissapears from the grub (actually it doesnt even show grub it justs boots ubuntu)so i have to edit the grub.cfg every kernel update.

I tried to make windows7 drive the hd0 and add ubuntu to the MBR but i failed completely, i preffer using grub but it's annoying having to edit the .cfg code every update AND wierdly, Kubuntu's grub (dont ask me why it just did) detected my windows7 partition.

Any suggestions?

This is how the Kubuntu's Grub looked like (im using the part inside the os-prober to get my ubuntu grub to show windows7)

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 919c86a8-3f3b-4fe3-9134-eb3e707f6e3a
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-15-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 919c86a8-3f3b-4fe3-9134-eb3e707f6e3a
linux /boot/vmlinuz-2.6.31-15-generic root=UUID=919c86a8-3f3b-4fe3-9134-eb3e707f6e3a ro quiet splash
initrd /boot/initrd.img-2.6.31-15-generic
}
menuentry "Ubuntu, Linux 2.6.31-15-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 919c86a8-3f3b-4fe3-9134-eb3e707f6e3a
linux /boot/vmlinuz-2.6.31-15-generic root=UUID=919c86a8-3f3b-4fe3-9134-eb3e707f6e3a ro single
initrd /boot/initrd.img-2.6.31-15-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 919c86a8-3f3b-4fe3-9134-eb3e707f6e3a
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=919c86a8-3f3b-4fe3-9134-eb3e707f6e3a ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 919c86a8-3f3b-4fe3-9134-eb3e707f6e3a
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=919c86a8-3f3b-4fe3-9134-eb3e707f6e3a ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sdb1)" {
insmod ntfs
set root=(hd1,1)
search --no-floppy --fs-uuid --set 8e20fe6020fe4f29
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sdb2)" {
insmod ntfs
set root=(hd1,2)
search --no-floppy --fs-uuid --set ecd41518d414e71c
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

darkod
December 5th, 2009, 09:30 PM
In Ubuntu in terminal run:
sudo apt-get remove dmraid
sudo update-grub

see if that helps it locate Win7. Maybe you were too hasty installing on the 30GB IDE, that first command might have helped for the ubuntu installer to "see" your 120GB drive and you could have put it there with win7 as you planned.