[SOLVED] 64 bit install alongside win7 to diff HDD, and no grub?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
elmarts
Level 4
Level 4
Posts: 245
Joined: Mon Aug 08, 2016 6:46 pm

[SOLVED] 64 bit install alongside win7 to diff HDD, and no grub?

Post by elmarts »

I have 2 physical hard disks, with win7 on one disk and the other intended for Linux. I installed initially the 32 bit, and then the 64 bit mint 18 to the second one (read that UEFI boot requires the 64 bit to get Grub to work). BUT - when I restarted the machine, it booted directly to windows - no grub menu at all. Linux is on SDA1 and Win7 on SDA2. How do I get my grub menu? - elmar
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
all41
Level 19
Level 19
Posts: 9498
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by all41 »

Have you entered bios and selected the drive with Mint as the default boot device?
Everything in life was difficult before it became easy.
elmarts
Level 4
Level 4
Posts: 245
Joined: Mon Aug 08, 2016 6:46 pm

Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by elmarts »

Got into the BIOS. UEFI boot is disabled. The second drive is on an IDE controller add-in board, the first drive is a SATA drive. UEFI enable fails to boot at all (it goes looking for a network boot via DHCP), so I turned UEFI off again. The BIOS shows both drives, but does not allow them to selected as one before the other. So the BIOS is forcing a default boot the SATA first, it seems. Does Windows 7 have a multi-OS boot option that can let me get to the Linux installation? - Elmar
elmarts
Level 4
Level 4
Posts: 245
Joined: Mon Aug 08, 2016 6:46 pm

Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by elmarts »

Of course, it seems the obvious "solution" is to shrink the windows partition on the SATA drive, put Linux on that physical drive, and move all the user data to the IDE drive. *sigh* I had hoped that I could simply overwrite the MBR on the SATA drive to point at the Linux drive. Is this possible (before I go through all the moving and re-installation needed)?
User avatar
all41
Level 19
Level 19
Posts: 9498
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by all41 »

Try booting into a live desktop using your install usb/dvd.
Then in a terminal enter:

Code: Select all

sudo os-prober
Does that show both Mint and Win operating systems and their locations?
If so you could download the "Rescatux" utility from here:
https://www.supergrubdisk.org/
You can probably get booted to the Linux partition using this.
There you could install grub to the sata partition using:
sudo grub-install /dev/sdx
Where sdx is the proper location as shown by os-prober.
Be doubly sure to have verified backups of important personal files external to the system
before any attempt to modify a partition--always
Everything in life was difficult before it became easy.
User avatar
Joe2Shoe
Level 5
Level 5
Posts: 846
Joined: Wed Oct 18, 2017 8:12 pm
Location: Ozone

Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by Joe2Shoe »

When installing LM on a PC with Windows 7/8/10 (dual-boot), sometimes this step is missed, and the result is a PC that boots to Windows and no boot menu appears.

Dual-boot installation info:
After making the partitions ahead of time, double-click the "Install" icon on the desktop to start the installation process.
* Go through preliminary steps and when asked how to install, choose the "Something else" option.
* Next page will show all partitions available on the drive.
* You now need to select the partitions you made and assign mount points to them for the installer.
* Highlight the partition you made for root, then click the "Change" button and fill in the appropriate details.
* Use as = Ext4 journaling file system
* Size = keep as you already have it
* Mount Point = /

* No need to check the format box if you already formatted it with GParted. (If creating partitions during installation, then click the format box.)
* Click "OK" when done.

* Highlight the EFI System Partition (usually a 200-550MB partition formatted FAT32) that Windows already created on the system and click "Change". Make sure it's set to EFI System Partition, (or EFI boot partition, or /boot/efi) -- leave the size and formatting alone (do not change them).

* No need to do anything with the swap partition -- the installer will automatically recognize and use it.

VERY IMPORTANT STEP:
Near bottom of window, "Device for bootloader installation" should be the EFI System Partition. Select that one in the drop-down box. It will be a small (200-550MB) partition formatted as FAT32. It will likely be /dev/sda1 or /dev/sda2; but double-check that to be sure.

See this post for a fuller description of what this step looks like if needed: http://forums.linuxmint.com/viewtopic.p ... 12#p840090.

Hope this helps.
"Tolerance is the refuge of men without conviction."
"Common sense is not so common" - Voltaire
pgmer6809
Level 4
Level 4
Posts: 228
Joined: Sun Mar 04, 2012 9:06 pm

Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by pgmer6809 »

The short answer is that Win7 does allow multi boot of a sort. You need to run bcdedit and then add an entry to the win7 bootloader options.
bcdedit is a real pain to use IMHO and creating a new entry is non-trivial, but there you are.

However Win7 might refuse to allow you to create that entry if secure boot is on, because it might think that the new entry is not secure. So you might need to turn off secure boot to even get that far.

The other question is: is your linux (ide) drive formatted as GPT? If it is not you will have real problems getting it to work in UEFI with Windows
MS decided that if you want UEFI you must have GPT disks. (There is no reason for this technically, it was a marketing decision on their part).
If your UEFI bios is really trying to be a slave to MS it might refuse to even give you the option of UEFI booting from a non-gpt disk.

IMHO the best way to do this, and I have done it on a couple of occasions, is
a) Make sure that your C: drive is backed up,
b) If you want to (and can) use windows tools to shrink the C: drive partitions -- this may not be all that possible. NTFS can get itself into a state where it will not allow partitions to be shrunk,
In any case shrinking partitions is not strictly necessary.
c) Get into your UEFI setup screen, find the secure boot section and turn it off.
d) Boot your Linux CD in UEFI mode. This is crucial. If you boot it in BIOS mode, then the install process will not put UEFI grub stuff in the correct place.
e) If your Windows is 32 bit (unlikely but check) then you will need to install a 32 bit Linux. I don't think that it is practical to have mixed 32/64 bit OS's in UEFI mode.
g) When you are installing Linux, you want to 'choose 'Something else" when you get to the type of install.
Now you go and 1) make a GPT partition table on your second (sdb) drive, setup your root (/) and swap partitions there, plus any other ones you want like /boot, /home etc. and install your linux on sdb.
You are given the option of which drive to put 'grub' on. You can choose sdb at this point but it won't have much effect, as I will explain next. But I would do it for safety since at this stage you don't want to screw up your windows boot loader.
h) On your C: drive (sda) there is a "system partition" variously called ESP or EFI or the like. The UEFI versions of grub are put into that partition, regardless of what you chose in step (g). I use the plural because several copies of the same code are put there under different names, since some UEFIs are picky about what to call them. They have file names ending in .efi
Once they are there, then the UEFI BIOS will give you the option of booting them. Once you have tested that it is still possible to boot both windows and linux from the UEFI menu, you can boot linux and run update-grub. Now you can boot either Linxu or windows from a grub menu the same as you could before all this UEFI stuff became mandatory.

lastly you can turn secure boot back on if you want to. The GRUB binaries that are in the ESP after the install are signed by MS (or someone) and will pass the secure boot test, so you can boot them securely.


Good Luck,
pgmer6809
elmarts
Level 4
Level 4
Posts: 245
Joined: Mon Aug 08, 2016 6:46 pm

[SOLVED] Re: 64 bit install alongside win7 to diff HDD, and no grub?

Post by elmarts »

Thanks for all the feedback, but I think that I am simply going to go the dumb, simple and easy way, and shrink the windows partition to make room for Linux on the main drive. That win7 partition is just over 200 GB in size, and so there is plenty of room. I'll try leave the swap on the IDE drive, since that is apparently all it will be good for. And since UEFI boot is disabled in the BIOS (the win7 is 32 bit, not 64 bit), I'll use the 32 bit Mint rather than the 64 bit Mint.

- Elmar
Locked

Return to “Installation & Boot”