Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-16-2011, 06:36 AM   #1
LQ Newbie
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Fedora Core 3
Posts: 11

Rep: Reputation: 0
Partitioning problem (dual booting with factory-installed Windows PC)


I would like to ask for partitioning advice with regards to dual booting Linux and Windows on a factory-installed Windows PC.

My problems are as follows:
1. Grub could not boot my partition
(grub error 18, I presume this is because it is beyond the bootable range)
2. I cannot make a boot partition because I can no longer make primary partitions

Original PC setup (manufacturer is HP):
/dev/sda1 - Boot partition for Windows (100MB)
/dev/sda2 - Windows 7 partition (~600GB)
/dev/sda3 - Factory Image

My first try:
1. Shortened the Windows partition by 100 GB
2. Created /dev/sda4 primary partition on the free space
3. Created /dev/sda5 ext3 partition for Linux and /dev/sda6 for swap

In this setup, I encountered error 18 on grub.

Second try:
1. I moved the Windows partition 100MB forward (shortening it by 100 MB from the front)
2. Tried to create a 100 MB Linux boot partition but I couldn't because I can no longer make a primary partition.

[WinBoot] [Target:LinuxBoot] [Windows] [Factory] [Linux]
Primary 1: 100MB Windows boot partition
My target: 100MB Linux Partition
Primary 2: ~500GB Windows partition
Primary 3: Factory Image
Primary 4:
(Extended of 4) 5: 96GB Linux Partition
(Extended of 4) 6: 4GB Linux Swap

Do you have any suggestions on how I can get around this?
I prefer to leave the Windows and Factory partition intact.

My current idea is to
1. Push the Windows partition 100GB forward and create /dev/sda4 between the Windows boot partition and the Linux partition.
2. Create a boot partition for Linux in /dev/sda5 at the beginning of /dev/sda4

sda1 - Windows boot partition
sda4 - Contains sda5, 6 and 7
sda5 - Linux boot partition
sda6 - Linux partition
sda7 - Linux swap
sda2 - Windows partition
sda3 - Factory image

But #1 will take a long time and I am not sure if #2 will work.

Do you have some suggestions I can try?
Thank you very much.
Old 02-16-2011, 07:05 AM   #2
LQ Newbie
Registered: Nov 2006
Location: Mannheim, Germany
Distribution: Debian & Ubuntu
Posts: 11

Rep: Reputation: 0
The key problem is, grub error 18 means that you bios does not support 48 Bit LBA adressing, so your /boot partition cannot be reached by the bios. This means, priamrily, your /boot partition should be within the first 128GB of the harddisk.

You can try moving partitions (with parted magic or another live-cd this should not be a problem) and to move sda5 within this range. Partitions do not have be in the order of there numbers.

However, an easier solution would be to use a usb-stick or any other device (perhaps your hp-pc has a card-bay then you just have to buy a 1 GB sdcard for 5$ or so) and put the /boot on it.
Old 02-16-2011, 07:24 AM   #3
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
Not sure, but this might help if all else fails. G.A.G Graphical Boot Manager.

I used it all the time in the past when I had boot issues. It can be installed to the MBR but you can also use it to boot into an OS without installing. Read the documentation/instructions at their website.

It may or may not work but might be worth a try. It will probably get you into Windows but unless Grub is installed on the root or boot (rather then the mbr) you may not be able to boot that.

Edit: Also I really hope you either have the Windows reinstall disks or you created the disks as instructed by them. If not be very careful you don't loose that factory install partition.

Last edited by Amdx2_x64; 02-16-2011 at 07:26 AM.
Old 02-18-2011, 03:23 AM   #4
LQ Newbie
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Fedora Core 3
Posts: 11

Original Poster
Rep: Reputation: 0
Hi, thanks for the replies.

I tried GAG Graphical Boot Manager but it kind of confused me so I was reluctant to try. Thanks anyway, maybe I'll get to use it some other time.

As for the SD card way, yes, there are several card slots on this computer, one of which can accept SD/MMC/etc. cards. But since I already had USB drive with boot in it, I temporarily set it to the BIOS to boot from the USB drive first.

Overnight, I tried to push Windows and fit Linux (and the boot partition up front). After some minor troubles*, I managed to get both Linux and Windows working under Grub. Thanks for the advice.

Not sure whether the following were necessary but they managed to fix my problem
Error 18
1. Had to set /dev/sda5 as a boot partition
Error 21
2. Had to change grub to boot hd0,2 (the large Windows 7 partition, instead of the Windows 7 boot partition), I don't really know why though.
Old 02-18-2011, 03:06 PM   #5
LQ Newbie
Registered: Sep 2009
Distribution: Gentoo
Posts: 14

Rep: Reputation: 0
Originally Posted by Miaire View Post
Error 21
2. Had to change grub to boot hd0,2 (the large Windows 7 partition, instead of the Windows 7 boot partition), I don't really know why though.
I have read somewhere that you don't really need the 100MB partition from Windows as Windows uses it in the installation process as a temporary space. Also that if you have already a partitioned hard drive and want to install Windows you can do so in a specific partition without Windows creating that extra 100MB partition thus saving you that space. But I have also read that there IS boot info on that partition. I wouldn't erase it unless I'm sure Windows will boot without it.

I have a similar setup with my notebook with that 100MB partition. It should be a good exercise to create an image with clonezilla and then erase it and see what happens. That way there would be a one less partition and a better setup for my Linux partitions. Maybe I'll try it and post the results.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Dual booting Linux and Vista (do not want to render factory partition usless) MacP Linux - Laptop and Netbook 10 07-09-2009 05:07 AM
help dual booting windows on already installed ubuntu machine ralphbluecoat Linux - Software 2 02-09-2007 10:02 PM
Dual-booting Linux on PC pre-installed with Windows XP Mikhail Linux - Newbie 3 08-08-2006 09:50 AM
Questions about dual booting, dual hard drives, and partitioning Raybrandt Linux - Newbie 4 04-22-2006 09:19 PM
dual boot windows xp and suse linux 9.0 partitioning problem spodops Linux - Newbie 3 10-31-2004 04:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration