Author Topic: Win 7-64 dual boot always starts Windows  (Read 1716 times)

Offline n7l

  • New Friend
  • *
  • Posts: 7
Win 7-64 dual boot always starts Windows
« on: August 26, 2011, 12:18:45 AM »
I have a 2 disk PC, a SSD with Windows 7-64 bit, and a Hard Drive with multiple partitions.
I installed a PCLinuxOS 2011 .iso to a USB stick, using Universal-USB-Installer-1.8.6.2.
The live USB starts OK. I run the install command.
I set an 88 GB partition for ext4 with a mount point of "/", and a 10 GB partition as Linux Swap.
I tried setting the SSD have Grub, and when booting, Windows started with no Grub prompt.
I tried setting the Hard Disk to have Grub, and then booted to that disk, and again, Windows started with no Grub prompt.
I tried removing the USB stick, as well as leaving it installed.
When I boot to the USB stick, the live version of PCLinuxOS starts.

I ran the restore MBR from the live version, but nothing seemed to happen, and it still wouldn't boot to the installed PCLinuxOS.
I tried to install to Lilo, but got an error message that the operation couldn't be completed.

Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: Win 7-64 dual boot always starts Windows
« Reply #1 on: August 26, 2011, 02:20:36 PM »
I have a 2 disk PC, a SSD with Windows 7-64 bit, and a Hard Drive with multiple partitions.
I installed a PCLinuxOS 2011 .iso to a USB stick, using Universal-USB-Installer-1.8.6.2.
The live USB starts OK. I run the install command.
I set an 88 GB partition for ext4 with a mount point of "/", and a 10 GB partition as Linux Swap.
I tried setting the SSD have Grub, and when booting, Windows started with no Grub prompt.
I tried setting the Hard Disk to have Grub, and then booted to that disk, and again, Windows started with no Grub prompt.
I tried removing the USB stick, as well as leaving it installed.
When I boot to the USB stick, the live version of PCLinuxOS starts.

I ran the restore MBR from the live version, but nothing seemed to happen, and it still wouldn't boot to the installed PCLinuxOS.
I tried to install to Lilo, but got an error message that the operation couldn't be completed.


Hi and welcome to the PCLinuxOS forum!

one things are not clear from your posts:

when you say you installed grub on SSD, you mean on the MBR or to some specific partition (EBR) ?
(same question apply to HDD installation of grub too)

AS

Offline n7l

  • New Friend
  • *
  • Posts: 7
Re: Win 7-64 dual boot always starts Windows
« Reply #2 on: August 26, 2011, 03:02:23 PM »
Hi and welcome to the PCLinuxOS forum!

one things are not clear from your posts:

when you say you installed grub on SSD, you mean on the MBR or to some specific partition (EBR) ?
(same question apply to HDD installation of grub too)

AS

Thanks!

MBR. I used the installer, which gave very few options for how to install Grub.
It gave a choice of each disk, and a few partitions. If I chose a partition, it gave a message that it would only work if there another bootloader program in the MBR, which there isn't, except Window's.
So, in both cases it would be the MBR.

Actually, if I could figure out how to add an entry to Windows 7 bootloader, then that would a good solution also.

Is this something unique to Windows 7-64? Or to installing Linux to part of a second disk?

Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: Win 7-64 dual boot always starts Windows
« Reply #3 on: August 26, 2011, 03:21:55 PM »
Once you install grub on the MBR of the HDD, which as I understand is the 2nd disk, you need to change the BIOS settings so that the HDD should be the first in the device boot list.

Once you install grub on the MBR of the first disk, or SSD, it should overwrite the MS MBR, either the system should boot with grub or should not be able to boot at all.

Check your BIOS for some settings meant to write-protect the MBR (also called Boot record, boot sector, ...)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: Win 7-64 dual boot always starts Windows
« Reply #4 on: August 26, 2011, 03:40:38 PM »
If you have no Grub boot page listing then it appears that Grub did not install to the MBR .....  unless you are booting a different HDD.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Win 7-64 dual boot always starts Windows
« Reply #5 on: August 26, 2011, 05:06:50 PM »
n71,

Without specific information, all anyone can do at this point is play guessing games. Please do the following. With Linux booted, open a terminal. Enter the following commands in the terminal.

su -
fdisk -l
grub
find /boot/grub/stage2
quit
exit
exit


After entering su -, you will be prompted to enter root's password.

After entering fdisk -l (that's fdisk [space] dash lowercase L), you will see some text displayed in the terminal window. Copy that text from the terminal window and paste it to a text editor. To copy the text, highlight the text you want to copy, right-click on the highlighted text, then select Copy.

After entering grub, you will see a message "Probing devices to guess BIOS drives. This may take a long time." That's normal. Do not interrupt the process.

You will then see a grub> prompt. At that prompt, type the find /boot/grub/stage2 command. You will see some text similar to "(hd0,4)". Copy all of the text from the terminal window to your text editor.

Next, enter the command quit. That will terminate the grub session, and you will still be running as root in the terminal. Enter exit, then enter exit again to logout of root's session and close the terminal.

Post all the information in your text editor here on the forum. Also post the boot order of your drives as they are listed in your computer's BIOS settings.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline n7l

  • New Friend
  • *
  • Posts: 7
Re: Win 7-64 dual boot always starts Windows
« Reply #6 on: August 26, 2011, 08:50:53 PM »
Once you install grub on the MBR of the HDD, which as I understand is the 2nd disk, you need to change the BIOS settings so that the HDD should be the first in the device boot list.

Once you install grub on the MBR of the first disk, or SSD, it should overwrite the MS MBR, either the system should boot with grub or should not be able to boot at all.

Check your BIOS for some settings meant to write-protect the MBR (also called Boot record, boot sector, ...)

When the PC is booting, I can press F8 and then choose the boot disk, instead of the default (SSD).
I did find that BIOS was protecting MBR, removed that protection, but still didn't get Grub to work.
I also removed, from within Windows 7, the system protection for that disk, but again, still without getting Grub to work.

Offline n7l

  • New Friend
  • *
  • Posts: 7
Re: Win 7-64 dual boot always starts Windows
« Reply #7 on: August 26, 2011, 08:53:29 PM »
n71,

Without specific information, all anyone can do at this point is play guessing games. Please do the following. With Linux booted, open a terminal. Enter the following commands in the terminal.

su -
fdisk -l
grub
find /boot/grub/stage2
quit
exit
exit


After entering su -, you will be prompted to enter root's password.

After entering fdisk -l (that's fdisk [space] dash lowercase L), you will see some text displayed in the terminal window. Copy that text from the terminal window and paste it to a text editor. To copy the text, highlight the text you want to copy, right-click on the highlighted text, then select Copy.

After entering grub, you will see a message "Probing devices to guess BIOS drives. This may take a long time." That's normal. Do not interrupt the process.

You will then see a grub> prompt. At that prompt, type the find /boot/grub/stage2 command. You will see some text similar to "(hd0,4)". Copy all of the text from the terminal window to your text editor.

Next, enter the command quit. That will terminate the grub session, and you will still be running as root in the terminal. Enter exit, then enter exit again to logout of root's session and close the terminal.

Post all the information in your text editor here on the forum. Also post the boot order of your drives as they are listed in your computer's BIOS settings.


Quote
fdisk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x36a4c262

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS
/dev/sda2          206848   250066943   124930048    7  HPFS/NTFS

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x0cbdfd94

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  3907029167  1953514583+  ee  GPT

Disk /dev/sdh: 8019 MB, 8019509248 bytes
255 heads, 63 sectors/track, 974 cylinders, total 15663104 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: 0x000cd91b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1   *        2048    14338047     7168000    b  W95 FAT32
/dev/sdh2        14346045    15647309      650632+   5  Extended
/dev/sdh5        14346108    15647309      650601    c  W95 FAT32 (LBA)

Note that the 128GB is the SSD, 8GB is the USB stick and 2000GB is the hard disk.
and
Quote
grub> find /boot/grub/stage2

Error 15: File not found

grub>

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Win 7-64 dual boot always starts Windows
« Reply #8 on: August 26, 2011, 10:33:42 PM »
n71,

Quote
I set an 88 GB partition for ext4 with a mount point of "/", and a 10 GB partition as Linux Swap.

Okay, let's break this down. Disk /dev/sda, 128 GB in size, is the SSD. It has two NTFS primary partitions.

Disk /dev/sdh, 8 GB on size, is the USB. It has a primary FAT32 and an extended FAT32 partition.

Disk /dev/sdb, 2 TB in size, is your "hard drive", undoubtedly a SATA. Using the old-style fdisk, it shows only one partition, /dev/sdb1. This drive has a GUID partition table (GPT) instead of an MBR partition table. The drive either came from the factory that way, or was partitioned with Parted or with GPT fdisk, which consists of 3 separate programs, gdisk, sgdisk and fixparts.

(Note the fdisk message "WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.")

As I understand it, a GUID partition table is used to overcome the MBR partition size limit of 2 TB and the four primary partitions limit. Since your entire drive is 2 TB in size, the partition size limit for an MBR is not a concern. GPT support must be included in the Linux kernel in order to be able to use it. I don't know if that support is in Texstar's kernels. I don't see gdisk, sgdisk or fixparts in the repositories, so I don't believe it is.

That's the most likely reason that you get the "Error 15: File not found" message when you run find /boot/grub/stage2 at the grub> prompt.


In any case, you will need to convert that 2 TB disk to MBR if you want to install PCLinuxOS on it. Whether you want to do that, or not, is your decision. I am very surprised you got no indications, while installing, that the partition table is non-standard.

« Last Edit: August 26, 2011, 10:36:48 PM by djohnston »
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline n7l

  • New Friend
  • *
  • Posts: 7
Re: Win 7-64 dual boot always starts Windows
« Reply #9 on: August 27, 2011, 01:12:17 AM »
In any case, you will need to convert that 2 TB disk to MBR if you want to install PCLinuxOS on it. Whether you want to do that, or not, is your decision. I am very surprised you got no indications, while installing, that the partition table is non-standard.


Thank you very much for your help.

Looking into it, it seems like GPT is a slightly better disk system even for <= 2TB. In any case, it looks like it would be necessary to completely restore all files, to convert a disk to MBR.
I'm not sure what to do now. Possibly look for a distribution that supports GPT, and consider PCLinuxOS again at a later date when it supports it.

I found an interesting article about it at http://www.rodsbooks.com/gdisk/booting.html.

I am surprised that more people aren't running in to this issue. I think many disks are designed as part of a series, so that even those of 2TB or less are configured at the factory the same way as larger disks.

Offline dvhenry

  • Full Member
  • ***
  • Posts: 106
Re: Win 7-64 dual boot always starts Windows
« Reply #10 on: August 27, 2011, 02:42:57 AM »
Booting linux from GPT currently has its share of issues, http://www.rodsbooks.com/gdisk/booting.html (and follow the appropriate links)
Mostly you will only be stuck with GPT if you are installing to a MAC, that's not the case here.
 Can you tell us about your hardware?
 Did you choose to setup a GUID partition table, or did the system come with windows installed on GPT?
« Last Edit: August 27, 2011, 02:58:29 AM by dvhenry »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Win 7-64 dual boot always starts Windows
« Reply #11 on: August 27, 2011, 03:05:13 AM »

Looking into it, it seems like GPT is a slightly better disk system even for <= 2TB.

Only if your definition of better varies from that found in all the dictionaries I'm aware of.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline dvhenry

  • Full Member
  • ***
  • Posts: 106
Re: Win 7-64 dual boot always starts Windows
« Reply #12 on: August 27, 2011, 03:16:28 AM »
Quote
I found an interesting article about it at http://www.rodsbooks.com/gdisk/booting.html.


Sorry, missed that!

I'm guessing this a pre-configured system?,,,  Or not? At this stage most hardware vendors don't ship machines with GPT as standard.

Quote
'm not sure what to do now. Possibly look for a distribution that supports GPT,


Fedora is likely to be the easiest for now, but you could help to get PCLinuxOS working well with GPT by giving details and trying suggestions that may be offered, (with PCLOS as a test distro).


Offline dvhenry

  • Full Member
  • ***
  • Posts: 106
Re: Win 7-64 dual boot always starts Windows
« Reply #13 on: August 27, 2011, 03:51:06 AM »
I admit, I have some concern over how most Linux distros currently handle GPT. With many of the latest main boards now supporting UEFI and GPT as standard, and BIOS (and "mbr", "dos", "intel"or what ever you want to call the current standard partition table setup.) being supported as an afterthought. With win8 supposedly having better support these newer standards, at what point do hardware vendors start using GPT as the default?
« Last Edit: August 27, 2011, 03:53:31 AM by dvhenry »

Offline dvhenry

  • Full Member
  • ***
  • Posts: 106
Re: Win 7-64 dual boot always starts Windows
« Reply #14 on: August 27, 2011, 04:20:07 AM »
I now see you chose to setup GPT on /dev/sdb! Scrap that setup and start with a proper partition table, unless you are a masochist!