2

I have an "HP pavilion 7008tx dv7" laptop. It came bundled with Windows 7 and has two 1TB HHD and an 32G SSD.

Here is the output form "sudo parted -l":

Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos


Number  Start   End     Size    Type     File system  Flags
 1      1049kB  210MB   209MB   primary  ntfs         boot
 2      210MB   977GB   977GB   primary  ntfs
 3      977GB   1000GB  23.1GB  primary  ntfs
 4      1000GB  1000GB  113MB   primary  fat32        lba


Error: /dev/sdb: unrecognised disk label                                  

Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt


Number  Start   End     Size    File system     Name  Flags
 1      1049kB  538MB   537MB   fat32                 boot
 2      538MB   992GB   991GB   ext4
 3      992GB   1000GB  8474MB  linux-swap(v1)

and sudo blkid

/dev/sda1: LABEL="SYSTEM" UUID="A0A08877A08855A6" TYPE="ntfs" 
/dev/sda2: LABEL="OS" UUID="1A041783041760D5" TYPE="ntfs" 
/dev/sda3: LABEL="Recovery" UUID="6E301CC5301C95E5" TYPE="ntfs" 
/dev/sda4: LABEL="HP_TOOLS" UUID="04AD-78C7" TYPE="vfat" 
/dev/sdb: TYPE="isw_raid_member" 
/dev/sdc1: UUID="A857-0A03" TYPE="vfat" 
/dev/sdc2: UUID="869d2800-385c-4a90-9ecb-dfca61632257" TYPE="ext4" 
/dev/sdc3: UUID="67cd5e66-fad6-4b70-b295-5536283ab10f" TYPE="swap" 

I installed Ubuntu using all default options and it installed it on /dev/sdc as shown above. Interestingly when I installed Ubuntu it didn't tell me it found Window 7. I had to edit grub manually to get the Grub screen to show and added some entries like the following in /etc/grub.d/40_custom

menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

But when I select it from the grub entry I get error: invalid EFI file path.

/dev/sda1 is called "SYSTEM" and has a Boot folder and a file called bootmgr. /dev/sda2 is called "OS" and contains Window 7. /dev/sda3 is the HP Recovery partition. /dev/sda4 is called "HP_TOOLS".

Does anyone know how I can get a windows7 entry in grub working or at least a way I can boot into Windows 7 in some other way?

UPDATE

I actually was able to finally boot into window by pressing ESC then F9 which on my system load the boot device menu. In the list was two Ubuntu options and another options that said something like "Laptop Hard Drive". When I selected the latter option windows booted up. This is quite an annoying procedure and would like to still go with a grub option if possible.

  • Add an answer to the question yourself. – DisplayName Oct 26 '14 at 11:43
  • > /dev/sda2 is called "OS" < By whom/what? That drive has an old-school BIOS partition table that doesn't support partition names. See Partition Table: msdos in the parted output. – Kaz Mar 31 '17 at 1:17
3

The problem is that your grub2 is essentially an "EFI application" so to speak.

A BIOS-partition-based grub2 has a chainloader command which understands the +1 sector map syntax in place of a file name. It just loads those sectors, and runs them, assuming them to be a piece of machine language that can run on top of the BIOS.

A UEFI-GPT-partition-based grub2 has a chainloader command which doesn't understand the +1 style syntax. It's interpreting that an EFI path and I think that's the source of the error message.

What you are trying to do might not be possible; that is to say, to chainload back into BIOS world out of an UEFI boot loader.

You're able to boot the Windows partition from your BIOS directly because at that point the BIOS detects the old-style partition table on that disk and adjusts its personality accordingly.

Thus, as suggested in Michael Shigorin's answer: the rEFInd boot manager could be the thing to provide the better dual boot experience you're looking for: http://www.rodsbooks.com/refind/

1

You might find Rod's books on EFI useful, and installing refind he wrote might help either (I've included it into ALT Linux Rescue as well, try "pyramid" scanning option on that image to see if it helps).

What you use now is firmware's boot manager, its boot list is available via efibootmgr utility. You'll get one record more (and will want to set it as default most probably :) if you install refind: firmware's one will boot it, it will boot grub or windows boot manager, and these will kick off their kernels (the irony being that at least Linux kernel could be booted directly by firmware's boot manager, heh).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.