Grub cannot install boot loader on HP ProBook with 500 GB HD

I got an HP ProBook 4520s that comes with 500 GB with Windows 7.

It comes with 4 partitions: SYSTEM, the main Windows partition, HP Recovery and
HT Tools.

I tried to have OpenSuse installation to resize the Windows larger partition
but it said that it couldn’t with this message:

"The partition on disk /dev/sda is not readable by the partitioning tool
parted, which is used to change the partition table.

You can use the partitions on disk /dev/sda as they are. You can format them
and assign mount points to them, but you cannot add, edit, resize, or remove
partitions from that disk with this tool."

So I resized the Windows partition from Windows 7 and added 3 partitions on the
empty space for Linux: /, swap and /home. Still OpenSuSE installation has shown
this warning message:

“The bootloader is installed on a partition that does not lie entirely below
128 GB. The system might not boot if BIOS support only lba24 (result is error
18 during grub MBR).”

I configured OpenSuSE installation to install on those partitions but Grub
could not install the boot loader with this message:

"grub> setup --stage=/boot/grub/stage2 --force-lba (hd0,2) (hd0,2)

Error 17: Cannot mount selected partition

grub> quit"

I already tried this in OpenSuSE 11.4 but I suspected it needed newer parted
and grub versions, so I also tried OpenSuSE 12.1 milestone 3 with the same
results.

The installation finishes but no Grub boot menu appears, it goes to Windows as
if no Linux was installed, although the installed version is there in the 3
partitions that were created on Windows, I just cannot make them boot.

Is there a solution to workaround these problems?

I also submitted this bug report as I suspect this needs to be fixed in future installations DVDs:

https://bugzilla.novell.com/show_bug.cgi?id=713325

What kind of partitioning on that drive? It does not sound like it is standard. Normally you can not have more then 4 partitions unless one is an extended.

We would need to see fdisk

Get a Live CD or something like Parted Magic from here:
http://dl.dropbox.com/u/10573557/pmagic-4.5.iso

Boot from it and in a terminal

fdisk -l

But honestly, it sounds like you would need to have deleted one of the HP partitions. But lets see.

Either fdisk and parted only see the first 4 partitions but there are now 7 partitions: 4 of the original disk and 3 more that I created by shrinking the large partition on Windows to add the Linux partitions. They only see the last one as the whole remaining space.

fdisk -l says:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5bd39133

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63        2047         992+  42  SFS
/dev/sda2            2048      616447      307200   42  SFS
/dev/sda3   *      616448   507691007   253537280   42  SFS
/dev/sda4       507691008   976771119   234540056   42  SFS

parted -l says:

Model: ATA Hitachi HTS72505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1049kB  1016kB  primary               type=42
 2      1049kB  316MB   315MB   primary  ntfs         type=42
 3      316MB   260GB   260GB   primary  ntfs         boot, type=42
 4      260GB   500GB   240GB   primary  ntfs         type=42

The OpenSuSE partitioner sees all the 7 partitions though, except that it shows the correct sizes.

BTW, now I reformated the Linux partitions that had OpenSuSE installed to see if it made a difference and it did not.

You cannot proceed as it is.
Lets just be sure. Can you state what you think each partition is. Would I be correct in

sda1 Boot
sda2 Recovery
sda3 Windows
sda4 HP Tools/Drivers

They are all primary. If it is as I describe. I would delete sda4,
Now you can shrink sda3 and use that space + what you have from deleting sda4 to create one large extended.
Inside the extended create your 3 Linux partitions
Install openSUSE alongside Win7/Vista - A Guide

Looks like you have dynamic partitions set in Windows. That is definitely confusing things. I’m not sure how you added the 3 partitions since the max you can have is 4. You must create an extended to hold the additional 3 partitions. And it must be one of the 4 primary ones.

I just told Windows to shrink the larger partition and added 3 partitions on the spare space.

I was not able to do it with OpenSuSE installer because it said parted could not read the partition table as I mentioned above.

Anyway, once I added the partitions on Windows, OpenSuSE installer recognized the partitions and was able to format them with Ext4 and swap and OpenSuSE was able to install on them.

The only thing that failed was grub which was not able to install the boot loader, showing the error message above.

I wonder if this is not a limitation of Grub 0.97, which seems to no longer be developed in favor of Grub 2.

GNU GRUB - GRUB Legacy

If Grub 2 is the solution, I have no idea how to run Grub 2 to install its boot loader on the disk. Any ideas?

It is a limitation of legacy
But it still may work if the extended is within range. But that may not be the case for you.
I have seen some users slip a tiny (few GB) partition in at the end to install Mint or Ubuntu and just use that to boot the other OS’s

My Lenovo had similar partitioning
I just wiped it.
Re-installed windows in a single partition (60GB) I don’t actually use windows, it’s there simply for testing purposes.

Yes, OpenSuSE installer partitioner does not let me change the partitions, just format them. So I had to resize and add the partitions in Windows.

I am not sure how could I do what you suggest with the Windows partition program. I can resize and add partitions but then I would not know what to do to make it work as you suggest.

I think there is some confusion.
openSUSE has no trouble partitioning.

And to be honest, I’m not sure just what your situation is now.

Let me reiterate: You would need to delete on of your primary partitions (preferably using parted magic)
Shrink windows (But defrag it first)
Create an extended partition in the space you free up
Then create the partitions you want inside the extended.

I wish that was true. When the OpenSuSE partionining tool opens it shows this message, which I mentioned before:

"The partition on disk /dev/sda is not readable by the partitioning tool
parted, which is used to change the partition table.

You can use the partitions on disk /dev/sda as they are. You can format them
and assign mount points to them, but you cannot add, edit, resize, or remove
partitions from that disk with this tool."

And to be honest, I’m not sure just what your situation is now.

Let me reiterate: You would need to delete on of your primary partitions (preferably using parted magic)
Shrink windows (But defrag it first)
Create an extended partition in the space you free up
Then create the partitions you want inside the extended.

I am afraid I cannot delete the partitions that are at the end of the disk and parted cannot see, because those are the partitions set from factory with the Windows installation called HP Recovery and another called HP Tools. If something goes wrong with the disk I suppose I will need these partitions. So I would rather not mess with those partitions because this is not exactly my machine, I am just helping to install OpenSuSE and have it dual bootable with the original Windows that comes with it.

What seems odd is that everybody is saying I cannot have more than 4 partitions but in Windows 7 I have 7 partitions fully accessible, including 3 that I added for installing Linux, and then I can install OpenSuSE on those 3 partitions.

What is failing is parted to add, remove, resize partitions and the grub to install the boot loader. It seems that it is a limitation of the parted and grub versions that come with OpenSuSE. So I hope there is a solution to install OpenSuSE with more upto date versions, even if I need to wait for the next OpenSuSE 12.1 milestone.

This is nothing new. Have a look at these threads: dual boot with windows 7 and Grub error 17 when installing Suse 11.4 and try to convert your SFS partitions into normal NTFS as suggested by dvhenry.

I am afraid I cannot delete the partitions that are at the end of the disk and parted cannot see, because those are the partitions set from factory with the Windows installation called HP Recovery and another called HP Tools.

Sorry
But I only last week deleted a load of preconfigured rubbish from another vendor (Dell)

I feel you don’t understand the basics. You cannot have more than 4 Primary Partitions. To extend partitions beyond the 4 you quoted earlier you would have to delete one and create a extended (which is itself a primary) but becomes a container for logical partitions.

What you are doing partition wise in windows, I don’t really know. Perhaps it can perform some magic I’m unaware of.

I’ve about had it up to the eye balls with machines shipped with partitioning like yours and no proper install media either! That sucks so much it isn’t even funny.

You can have as many partitions as you like … or at least more partitions than you will ever need. But in MBR partitioning, one of the 4 partitions has to be an extended partition, which contains no data but other partitions called ‘logical’. This parttion has the ID 0x0F (sometimes 0x05) but never 0x42 as in your setup. The openSUSE partitioner might have been able to create logical partitions because it didn’t checked the partition ID. But Grub won’t see this partition as an extended one and won’t be able to get the start sector of its stage2, and so it won’t boot. I cannot be 100% sure and I’m not going to test, but I believe that’s what happens. There are different things you can try but this computer is obviously not optimized for dualbooting with Linux. You might consider installing Linux in a virtual machine (like VirtualBox) if you’re afraid of messing up your Windows installation.

I would probably try to change the ID of the partition which seems to be the extended one, set the bootflag on this partition, install grub in its bootsector and see if it can boot. If it sounds to risky or too complicated, use a virtual machine.

I am afraid I cannot delete the partitions that are at the end of the disk and parted cannot see, because those are the partitions set from factory with the Windows installation called HP Recovery and another called HP Tools. If something goes wrong with the disk I suppose I will need these partitions. So I would rather not mess with those partitions because this is not exactly my machine, I am just helping to install OpenSuSE and have it dual bootable with the original Windows that comes with it.

What seems odd is that everybody is saying I cannot have more than 4 partitions but in Windows 7 I have 7 partitions fully accessible, including 3 that I added for installing Linux, and then I can install OpenSuSE on those 3 partitions.

What is failing is parted to add, remove, resize partitions and the grub to install the boot loader. It seems that it is a limitation of the parted and grub versions that come with OpenSuSE. So I hope there is a solution to install OpenSuSE with more upto date versions, even if I need to wait for the next OpenSuSE 12.1 milestone.

Some hardware vendors setup their systems using partitioning tools that are only designed to work with windows and windows standard partitioning tools, not all partitioning tools are born equal !!!

Sorry if I offend any one, but HP does this on a small number of systems, often when they use all 4 primaries. They do at times use a version of windows ‘dynamic disks’ (LVM) that is, I believe seriously flawed.

If this was my machine I would do one of 2 things,

A). Convert the partitions to “basic”.
B). Delete the lot and repartition.

For option A).
Testdisk works well for converting these partitions, and until fairly recently was for most the only viable option, (it remains a good option) there are now other options to convert these partitions.
If you decide to convert the partitions please tell us what you used, and how it went.

For option B).
Well, just backup properly first!

I just told Windows to shrink the larger partition and added 3 partitions on the spare space.

Can you show us **fdisk -l **after that?

I just told Windows to shrink the larger partition and added 3 partitions on the spare space.

If you decide to convert the partitions you should delete those 3 newly created “partitions” and resize the larger windows partition back to its original size (with the partitioning tool you used to make the changes) before the conversion.

please try again wrote:
> I would probably try to change the ID of the partition which seems to
> be the extended one, set the bootflag on this partition, install grub in
> its bootsector and see if it can boot. If it sounds to risky or too
> complicated, use a virtual machine.

Or find your local Linux User Group (LUG) and take the PC to one of
their meetings. There’ll probably be several people there interested to
help you.

I have had the same problem as that described by manuellemos with my new HP Pavilion laptop. Unfortunately, OpenSuSE 11.4 hangs during installation (both the DVD and one burnt from a downloaded image), which rendered Windows 7 unbootable, so I’ve had to repartition from scratch anyway.

It appears to me that there is some issue installing Linux on Windows 7 HPs.