Install Windows 7 after Ubuntu ( Lucid Lynx )

Asked by HX_unbanned

Hello!

I URGENTLY NEED ASSISTANCE TOO FOLLOWING ISSUE.

i HAVE 4 HDDs, WITH 80gb of capacity EACH.
Then, I have Lucid Lynx Beta 2 ( well, I assume RC ) :D ...
My goal is to have dualboot Windows 7 and Lucid withing GRUB(2).

Current blocker in my case:
- I only can install Windows 7 successfully from DVD if I unplug my Ubuntu (SATA) HDD; If I do not - I have setup crash.
- After I successful install Windows, I can boot in it with no problems, but after adding new entry to GRUB2 using command:
"sudo update-grub" from Lucid, next reboot causes Windows 7 startup crash -> Recovery Mode entering -> Unrepairable Windows 7.

So - I have looked at https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows and to be honest - It is kinda hard to understand :( .
I really need step by step guide, because it might be I am missing some steps to use GRUB for chainbooting.

GRUB.CFG :

#
# 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 $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
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
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
set locale_dir=($root)/boot/grub/locale
set lang=lv
insmod gettext
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/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 linux /boot/vmlinuz-2.6.32-21-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro quiet splash
 initrd /boot/initrd.img-2.6.32-21-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 echo 'Loading Linux 2.6.32-21-generic-pae ...'
 linux /boot/vmlinuz-2.6.32-21-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro single
 echo 'Loading initial ramdisk ...'
 initrd /boot/initrd.img-2.6.32-21-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-20-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 linux /boot/vmlinuz-2.6.32-20-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro quiet splash
 initrd /boot/initrd.img-2.6.32-20-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-20-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 echo 'Loading Linux 2.6.32-20-generic-pae ...'
 linux /boot/vmlinuz-2.6.32-20-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro single
 echo 'Loading initial ramdisk ...'
 initrd /boot/initrd.img-2.6.32-20-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 linux /boot/vmlinuz-2.6.31-21-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro quiet splash
 initrd /boot/initrd.img-2.6.31-21-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 echo 'Loading Linux 2.6.31-21-generic-pae ...'
 linux /boot/vmlinuz-2.6.31-21-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro single
 echo 'Loading initial ramdisk ...'
 initrd /boot/initrd.img-2.6.31-21-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.31-16-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 linux /boot/vmlinuz-2.6.31-16-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro quiet splash
 initrd /boot/initrd.img-2.6.31-16-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.31-16-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 echo 'Loading Linux 2.6.31-16-generic-pae ...'
 linux /boot/vmlinuz-2.6.31-16-generic-pae root=UUID=0c231c7e-1d96-4302-b35f-572ed6c07203 ro single
 echo 'Loading initial ramdisk ...'
 initrd /boot/initrd.img-2.6.31-16-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
 insmod ext2
 set root='(hd1,1)'
 search --no-floppy --fs-uuid --set 0c231c7e-1d96-4302-b35f-572ed6c07203
 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/sda1)" {
 insmod ntfs
 set root='(hd0,1)'
 search --no-floppy --fs-uuid --set 76de7780de773787
 chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sdd1)" {
 insmod ntfs
 set root='(hd3,1)'
 search --no-floppy --fs-uuid --set 121665863006f442
 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 ###

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
HX_unbanned (linards-liepins) said :
#1

Additional info of grub.cfg :

- If I try to boot using /dev/sda1, I have error message ( from windows bootloader ), that this partition is not accessible;

- if I try to boot using /dev/sdd1, I have Startup crash and instant Recovery Mode on Windows 7 GUI.

I am guessing that GRUB damages Windows bootloader ...

Sorry to not providing fdisk information. I do not know correct logging syntax :(

Revision history for this message
HX_unbanned (linards-liepins) said :
#2

I do not understand this FAQ, though it is pointing to my issue at some parts ...
FAQ #65: “Dual Booting windows and *buntu”.

Revision history for this message
Tom (tom6) said :
#3

Hi :)

We are finding grub2 a little tricky to understand right now so please forgive the lack of answers. Each boot-loader does "fix" a tiny part of the drive to point at itself, otherwise the boot process wouldn't know where to find the boot-loader.

Note this is "fix" as in horse-racing rather than fixing something broken as the Mbr is not broken, it's just pointing the "wrong" way.

I did try editing that guide to make it easier to understand but it could do with a lot more ironing out i think! The whole guide needs some serious attention tbh. Sorry about that.

The Faq is pointing to something that talks about the old grub, not the new grub2. So it wont work on your system.

On way around all this might be to download & install a tiny different distro called sliTaz
http://distrowatch.com/table.php?distribution=slitaz
or another tiny one that also still uses the original grub which most of us understand very well. Installing that to the end of the Ubuntu drive while all the drives are plugged in should find all the Operating Systems you have on your machine.

Before you try that tho i just want to make sure that when you run the

sudo update-grub

It is when you have booted into Lucid with all drives plugged in?
Please let us know how this goes!
Good luck and regards from
Tom :)

Revision history for this message
HX_unbanned (linards-liepins) said :
#4

Well, this is not SOLVED, because I still have same issue.

This is not a bug report ONLY because I have no clue AT ALL where problem can be - may it be in Kernel, in Grub2 or in Windows 7 bootmanager...

Yes. I am having these error when I have plugged all hard drives and booting from GRUB2 menu to WIndows 7 ...

No real suggestion or anything???

Revision history for this message
HX_unbanned (linards-liepins) said :
#5

Currently I am able to use WIndows if I:

1, Unplug Ubuntu HDD
2. Install WIndows 7
3.1 Do not reboot;
3.2 Do not Shutdown PC, Re-plug Ubuntu HDD and then booting from GRUB2 to Windows 7.

After first successful boot from GRUB2 to Windows and reboot - Windows 7 becomes inaccessable.

Revision history for this message
hallen (hallen) said :
#6

What you need to do is install windows, then ubuntu with all the HDD's plugged into the computer. Grub will work correctly this way.

Revision history for this message
HX_unbanned (linards-liepins) said :
#7

Does upgrade from Lucid Beta 2 to Lucid Release Candidate do the trick?

Revision history for this message
Tom (tom6) said :
#8

Hi :)

I think we might have been approaching this question badly. I think we need to take a plodding approach rather than keep throwing things into chaos. So i have a few questions to clarify a few things that sound a bit confusing at the moment

1. Please could you arrange the drives so that you can at least use the machine without constantly swapping the order of the drives or unplugging and re-plugging?

2. With all the drives plugged in can you boot up to a LiveCd session?
https://help.ubuntu.com/community/LiveCD

3. Do you know if your drives are "raid array" drives of some kind?

If you can boot up a LiveCd session then please could you get to a command-line and give us the results of

sudo fdisk -l

where "-l" is a lower-case "-L"

Hopefully we can use that to try to see what is going on or just fix something.
Good luck and regards from
Tom :)

Revision history for this message
HX_unbanned (linards-liepins) said :
#9

Hello again, Tom :)

1. Well - Yes - I can. I have don it now - in the moment of typing reply.

2. Yes - I am able to use Karmic LiveCD ;)

3. No, I have no raid arrays.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ fdisk -l
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x316c8b24

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 9965 79938560 7 HPFS/NTFS

Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x998ecb72

   Device Boot Start End Blocks Id System
/dev/sdc1 * 1 9729 78148161 7 HPFS/NTFS

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1b2aca87

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9327 74919096 83 Linux
/dev/sdb2 9328 9729 3229065 5 Extended
/dev/sdb5 9328 9729 3229033+ 82 Linux swap / Solaris

Disk /dev/sdd: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000001

   Device Boot Start End Blocks Id System
/dev/sdd1 * 1 10011 80413326 7 HPFS/NTFS

Disk /dev/sde: 260 MB, 260046848 bytes
16 heads, 32 sectors/track, 992 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk identifier: 0x2750274f

   Device Boot Start End Blocks Id System
/dev/sde1 * 1 992 253936 6 FAT16

Revision history for this message
Tom (tom6) said :
#10

Hi :)

Sorry i have to pop out for a few hours! I hope to help you reinstall grub2 to sdb1 when i get back and hopefully arrange it to "chainload" into Windows (so that the Windows boot-loader gets used). Hopefully that should keep Windows happy!

It has just occured to me that the output of

sudo blkid

(=BLKID") might help deal with the apparent need to keep moving drives around!
Apols and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#11

Hi :)

I keep avoiding this because it superficially looks complicated but there is only 1 linux partition so it really should be quite easy. I was also curious about how much Ram you have and if that is really less than 3Gb? Please boot up a 9.10 or 10.04 LiveCd and then from a command-line please copy&paste into here the output from

free -m

Then to solve the case we can work from step4 in this guide
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

sudo mount /dev/sdb1 /mnt

Note there are 3 spaces in the line to separate; sudo, mount, "/dev/sdb1" & "/mnt". People often miss the spaces which results in getting a help-file about how to use "sudo" lol. Ok, now step5

sudo grub-install --root-directory=/mnt/ /dev/sdb

Then just reboot and the boot menu should include both Ubuntu & Windows?
Please let us know how this goes!
Good luck and regards from
Tom :)

Revision history for this message
HX_unbanned (linards-liepins) said :
#12

Hi, Tom :)

Sorry for late response - beeing busy with studies and work ...

Okay, about RAM -
I have 4 x 1GB DDR2 800mhz RAM sticks;

And - questions -
1. Do I need to mount drive where currently GRUB is not installed or can I use drive where it is now. It would be fine to reinstall old GRUB with new GRUB, but not changing location if HDD where it is. It would cause me many problems in my work .. ;)
2. Do I need to install grub ( of course, before that mounting it to /dev/sda1 ) in the new HDD or can I reinstall it ( overwrite ) old GRUB in the same location ( HDD ) ?

And - Weird - but I am able to boot in Windows for about 2 times - that is -
1. unplug Ubuntu SATA HDD;
2. boot with install dvd ; install Windows on HDD ;
3. reboot after software installations
...
4. AND - after I reboot third time - Windows wants to Recover ... %#%$#%$#%# bitch!!!

Revision history for this message
Tom (tom6) said :
#13

Hi :)

Lol, don't worry about delayed responses. The thread is still here for at least 15days so no worries. It just takes a while before i can remember what the plans were again sometimes.

The "free -m" would show us how much ram linux thinks you have, rather than how much you really do have. If it is the 32bit version then it will be quite happy with only 3.2Gb most of which it wont ever need anyway. The 64bit would correctly report ram but 64bit is very much harder to use. So perhaps that's why i was wondering about using "free -m". However, it is more likely i wanted to check that your swap is large enough & "switched on".

Yes, the plan is to reinstall grub2 overwriting the previous one as it sometimes seems to need a reinstall in order to pick-up the other operating systems correctly. I guess the ideal way to do this would be to plug in the Windows drive & get that booting, then switch the drives and give me the output of

sudo fdisk -l

from a LiveCd session so that i can help you complete the guide
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

Regards from
Tom :)

Revision history for this message
HX_unbanned (linards-liepins) said :
#14

Okay, I will do my best to help both of us ;)

Oh, btw, are you interested in this https://blueprints.launchpad.net/ubuntu/+spec/windows-environment-integration-in-ubuntu ( my ) blueprint?

Revision history for this message
Ronald (rbski69) said :
#15

I have no idea what is going on here. Is this a fix for my problem of "no such device" at bootup from grub. I am new to the workings of Ubuntu and at times the answers assume that we know more about the system then we do. I have been having problems with dual boot from Ubuntu. For some reason the system never shows my two sata drives in grub. If i use the live cd they do not show up there. One has two Xp pro systems and the other has Fedora 12 OS and it will not bootup. The other two drives have Ubuntu on them. The 40gb drive had older version on it that was updated to 9.10 and is the one i am using now. The 200gb drive has 9.10 on it. I was able boot from grub on both drives for a short time then the no such device came up. The only way i can use the 40gb drive is to have it the first drive in BIOS. If the 200gb drive is first the grub that comes up gives me the choice of the 40gb and 200gb drive but i get the no such device bootup. At no time has the two Sata drives shown up in grub to boot from.

Revision history for this message
Tom (tom6) said :
#16

Hi Ronald :)

Please post your own brand new question
https://answers.launchpad.net/ubuntu/+addquestion

Then people can help you work through the problems on your particular machine. If someone gives an answer that you don't quite understand then please just ask for it to be explained more simply or with less technical language or something. Ubuntu is "linux for human beings" so we try to help people understand, whatever level of experience they have.

By posting a new question of your own the answers can be aimed a lot better for your current situation. Don't worry, you will soon find you understand a LOT more very fast if you keep asking people to explain.

Good luck and regards from
Tom :)

Can you help with this problem?

Provide an answer of your own, or ask HX_unbanned for more information if necessary.

To post a message you must log in.