Clarification on dual booting 11.10 and windows 7 with 4 existing partitions

Asked by Robert Serkowski

Windows 7 laptop already uses 4 primary partitions; What is real procedure for MBR/GRUB

I have a new HP DM1Z laptop with Windows 7 home premium pre-installed. I have
tested with the Ubuntu 11.10-AMD LIVE-CD and now want to install it to dual
boot with Windows 7.

I have a number of answers already from launchpad, but want to get some further
clarification and advise before I try this and regret not having asked.

The disk has 4 primary partitions already and question #123894 confirms I need
to sacrifice one of these partitions at least temporarily in order to create an extended
partition to hold the Linux partitions.

I have shrunk the C partition via windows disk management. After shrinking, the
disk looks like this:
=====================================
Windows 7 disk manager says:

C: NTFS (Boot, Page File, Crash Dump, Primary Partition) 102.GB 68%free
E: HP_TOOLS FAT32 Primary Partition 3.96GB 28% free
D: Recovery NTFS Primary Partition 16.15GB 11% free
SYSTEM NTFS system, active, primary partition 199MB, 83% free

The "graphical" picture of the disk looks like this: The unallocated space wasn't there prior
to my shrinking C.

Disk 0 SYSTEM (C:) ----- Recovery (D:) HP_TOOLS (E:)
Basic 199MB 102.00GB NTFS 175.78GB 16.15GB NTFS 3.97GB FAT32
298.09GB unallocated
online
=====================================
Ubuntu LIVE-CD "fdisk -l" says:

 Device Boot Start End Blocks Id System
/dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT
/dev/sda2 409600 214315007 106952704 7 HPFS/NTFS/exFAT
/dev/sda3 582955008 616818687 16931840 7 HPFS/NTFS/exFAT
/dev/sda4 616818688 625140399 4160856 c W95 FAT32 (LBA)

======================================================

Launchpad question #115253 says I should copy the HP_TOOLS data to the C drive, delete
the E partition and then create a new partition for the tools within the extended partition. However,
the E partition/volume is at the top of the disk and not contiguous with the unallocated space.
 1. Question 1: is this an issue? Will I lose a bunch of space doing this?
 2. Question 2: should I delete the Recovery partition instead? I have burned "recovery DVDs"
   and assume I have recovery capability. The reason for doing this would be
   to have contiguous space.

   When you boot this laptop, a message pops up prior to loading
   windows "press escape for startup menu" and a menu says F11 for system
   recovery. I assume that this tries to boot the Recovery partition??? And if
   I delete it the windows boot loader will seek revenge upon me????

I am assuming the best approach to deleting/creating partitions is to use GRUB to create
a 3.97 GB partition for HP_TOOLS, if that is the choice, a 20 GB ext4 partition for /,
a 4GB or maybe 8GB?? ext4 partition for swap, and the remainder as an ext4 partition for /home
based on launchpad question #163668.

Once I create the partitions, I read there will be a choice of how to deal with GRUB vs the
windows boot loader. The page at

https://help.ubuntu.com/community/WindowsDualBoot

says to modify the MBR to point to GRUB in the Ubuntu partition. But the Ubuntu Guide at

http://ubuntuguide.org/wiki/Ubuntu:All#Dual-Booting_Windows_and_Ubuntu

references

http://neosmart.net/wiki/display/EBCD/Ubuntu

that says specifically to not do that, but use EasyBCD to modify the windows boot loader to point to GRUB,
except that there is/was a bug in Ubuntu 10.04 which requires the MBR to be
modified temporarily. No mention if this bug is still in 11.10.

 3. Question 3: Does 11.10 still have the "bug" so that I have to point the MBR at GRUB and then
     use EasyBCD to repoint it to windows?

 4. Question 4: Is the Ubuntu installer going to make it obvious that the only thing changing in the MBR
   is a pointer vs replacing the MBR?

Thanks for your help. I think I know what to do but a small error here can be BAD.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Solved by:
mikewhatever
Solved:
Last query:
Last reply:
Revision history for this message
Best mikewhatever (mikewhatever) said :
#1

1. No. You won't loose any space, but creating continuous unallocated space would be harder, because you'd have to move the partitions in between.

2. Yes, I'd say so. If you delete the recovery partition, it won't be available, but other then that, I doubt that the boot loader will miss it much. There might be a proper way of deleting the Recovery Partition, so check your laptop manual.

Grub is a bootloader, it can't create partitions. To create partitions, use Gparted.
20GB for / is OK, but 8GB for swap is way too much. In fact, if you have 4GB of RAM, I'd advise not to create a swap partition.

GRUB and EasyBCD are bootloaders. If you choose to use Grub, let it overwrite the MBR (the default behavior). If you want to use EasyBcd, then Grub will have to be installed to the Ubuntu partition (by modifying the default setting). For simplicity, I'd advise sticking with GRUB, instead of with EasyBCD.

MBR is the first sector on the hdd. When a part of GRUB gets installed to the MBR, the MBR is overwritten, or, in other words, modified. That's the default behavior, and not a bug.

3. What? Do you have a link to that bug?

4. No. If you point Grub to the MBR, the MBR gets overwritten (default settings), if you choose to install GRUB to the Ubuntu partition (as with the EasyBCD scenario), the MBR is left untouched.

Hope that helps.

Revision history for this message
Robert Serkowski (racs) said :
#2

Hi Mikewhatever,

Thanks very much for your quick response -- a couple
of follow-up comments/questions.

--oops! I did know GRUB was the boot loader. Meant to type
GParted!! :-(

-- You indicated that EasyBCD was a boot loader, but the web page here:
   http://neosmart.net/wiki/display/EBCD/EasyBCD+Documentation+Home;jsessionid=8B2FB17709C0A334EA98BEC1450C2227
     says its a boot loader modification tool.

-- Regarding the alleged bug(?). The web page at http://neosmart.net/wiki/display/EBCD/Ubuntu says
 Due to a bug in Ubuntu 10.04+, the current steps are rather more convoluted than they used to be in previous versions, requiring the user to first give control of the MBR to GRUB2, and then use EasyBCD to put the Windows bootloader back in control. We have brought this issue to the attention of the Ubuntu developers, and hope to have it resolved soon.

"This issue" points to bug #614309, but not having done the dual boot yet, I don't have experience in what is being discussed.

Again from the page referenced above, Step 5 of their process states: When you reach page 7 of the [ubuntu] installation wizard do not press the advanced button and make changes. There is a bug in Ubuntu 10.04 that does not allow you to manually install GRUB to another partition.

If I understand this correctly, the neosmart page tells me to
 1. install GRUB in the Ubuntu Partition which I assume is slash (/)
 2. ensure that the Ubuntu installer points the MBR to GRUB, but does not overwrite (as in replace) the MBR.
 3. reboot which takes me to Ubuntu/GRUB to select the windows loader to boot into Windows.
 4. Run the windows application EasyBCD in windows to
  -- add an entry to the windows boot loader to point to GRUB
  -- and "install the windows 7 bootloader to the MBR"

Follow UP Question 1; The 4 steps don't seem to me to match what you wrote. Are they really the same and I'm just confused?
  Or are you advising something different?

Follow UP Question 2: I have 4GB of RAM. When you advise not creating a swap
   partition, is that because there is enough memory not to need
   to swap? I thought there always had to be a swap partition.

Revision history for this message
mikewhatever (mikewhatever) said :
#3

Hi again,

 - You are right, EasyBCD is not a boot loader, I just called it that for simplicity.

- Thanks for the links. I don't think the bug has been fixed, since there was almost no activity there. That said, if you create the partitions with Gparted before beginning the Ubuntu installation process, there should be any problems.

1. Check.

2. No. EasyBCD will point to Grub when you get it configured. The MBR will point to the Windows boot loader. At least, that's the final goal.
If you follow this guide http://neosmart.net/wiki/display/EBCD/Ubuntu, the MBR will be overwritten twice, first by GRUB, then by the W7 bootloader.

3. Check.

4. Check.

@Follow UP Question 1
Which question do you refer to?

With Ubuntu, you don't have to have a swap partition, provided there is plenty of RAM, and 4GB of RAM is more then enough for regular usage like Internet, text editing, music, email, etc. One possible disadvantage I forgot to mention earlier is that you won't be able to suspend to disk (aka hibernate) without the swap partition, which may be useful for a laptop. If that's a requirement, create a swap partition of 4GB.

Revision history for this message
Robert Serkowski (racs) said :
#4

OK, I finally installed Ubuntu, but not without some heart-beat interruptions.
-- I used windows 7 disk manager to remove my RECOVERY partition.
-- Mistake 1: I now booted the live CD and began the installation -- I should have add the partitions via GParted first, I think.
-- Mistake 2: I checked both boxes in the installer window to get additional packages and updates. The install took something

Revision history for this message
Robert Serkowski (racs) said :
#5

(sorry I hit a tab and the above submitted before I finished.)
The install took something like 5 hours, at least an hour of which was downloading "language packs". I only wanted English.
During this time, there was no visible activity on the router or modem to indicate any download was happening, so the
download was going VERY slowly. A browser on another machine on the network confirmed the link was just fine. I should have
done the updates/upgrades after the install.

There was NO indication of what the installer did regarding the partition structure and no option to interact. It turns out
that was OK, but for all I knew, it was scrogging my disk.

-- Mistake 3: When the install finally finished, I followed the procedure on the EasyBCD web page. I think EasyBCD has
                 a bug on the add boot entry page -- no save button. Also, there appears to be no reason to have used it and
                 now I don't know how to undo its effects. I have a menu from the windows boot loader to select windows or
                 ubuntu and if ubuntu is selected, I have a GRUB menu to select ubuntu or the windows loader, among other
                 things. Had I not Used easyBCD I would have had one menu - GRUB. I used EasyBCD because I read lots of
                 stuff on the web warning not to mess with the MBR if running with Windows. That seems not to apply to
                 Ubuntu 11.10
-- Ubuntu is now running, with some issues. Even though I tested with the Live CD and got a fix for the wireless interface via this form, it doesn't work automatically now that I have installed. I am also offered two drivers for FGLRX that don't install. But
I'll ask about these separately.

thanks for your help.
This one can be closed.
--

Revision history for this message
Robert Serkowski (racs) said :
#6

Thanks mikewhatever, that solved my question.

Revision history for this message
mikewhatever (mikewhatever) said :
#7

Glad I could help. :~)