Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

[SOLVED}: Dual-boot install with Windows

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
35 posts
  • 1
  • 2
  • Next
Author
Message
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

[SOLVED}: Dual-boot install with Windows

  • Quote

Post by ONEEYEMAN » Wed Sep 19, 2018 3:57 am

Hi, ALL,
I had to rebuild one of my laptops, because technician found a problem with the harddrive.
The same technician put back Windows 7 on this machine.

Now I'm trying to make this laptop dual-boot (basically re-create the old hard drive).
Is there any changes to the Handbook Installation procedure I should do?

I found this, but I'm not sure how to perform the install.

Could someone please summarize that for me?

Thank you.
Last edited by ONEEYEMAN on Fri Oct 12, 2018 4:53 am, edited 1 time in total.
Top
The Doctor
Bodhisattva
Bodhisattva
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Wed Sep 19, 2018 4:57 am

It really is painless.

1) Use windows to make free space (do NOT use the system rescue CD!) Windows takes care of its bits.
1a) Install rEFInd FROM WINDOWS. Otherwise windows will fix it for you.
2) Install Gentoo on the free space. Do not install a boot loader
3) Make sure to include your command line in the kernel. (rEFInd can pass the parameters, but, um, I don't know how)
4) it will just work

Alternative:

Do not use rEFInd. Use the built in firmware. In that case put the kernel in the Windows boot partition. Edit the environment variables to include an entry for it.
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Wed Sep 19, 2018 12:41 pm

Hi,
The Doctor wrote: It really is painless.

1) Use windows to make free space (do NOT use the system rescue CD!) Windows takes care of its bits.
Done.
The Doctor wrote: 1a) Install rEFInd FROM WINDOWS. Otherwise windows will fix it for you.
What do you mean by saying "Windows will fix it for you"? Fix what? And how?
The Doctor wrote: 2) Install Gentoo on the free space. Do not install a boot loader
OK, install everything, but the grub.
The Doctor wrote: 3) Make sure to include your command line in the kernel. (rEFInd can pass the parameters, but, um, I don't know how)
How do I do that? Is it written in the HB?
The Doctor wrote: 4) it will just work

Alternative:

Do not use rEFInd. Use the built in firmware. In that case put the kernel in the Windows boot partition. Edit the environment variables to include an entry for it.
Do I have access to the Windows boot partition? How do I modify it?

Thank you.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Wed Sep 19, 2018 9:21 pm

Hi,
One more thing - the page I referenced talks about grabbing the SystemRescue CD.
Is this thing not available on the Minimal Gentoo install?

Thank you.
Top
The Doctor
Bodhisattva
Bodhisattva
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Thu Sep 20, 2018 12:09 am

The minimal install does not support UEFI which systemrescue does. If you want to mess with any UEFI bits you will need the support.

By windows fixing things, I mean making them do what windows thinks it should do, ie, break things.

The command line can be added with the kernel option. I forget exactly where it is but I think it is in the cpu type and features section?

The windows boot partition is a small vfat32 partition, likely partition number 1. It contains a few directories, namely BOOT. You can add a subdirectory called linux or something and add your kernel there. It isn't fussy but I would leave the windows directories alone. It might try and be helpful by cleaning up the misplaced files.

rEFInd will look for the kernel almost anywhere you put it, so no issues there really.
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Sat Sep 22, 2018 1:39 am

Hi,
According to this, my laptop is not EFI:

Code: Select all

2018-09-05 09:54:16, Info                  IBS    Callback_BootEnvironmentDetect: Detected boot environment: BIOS
2018-09-05 09:54:16, Info                  PANTHR InitializeModule: Initializing ExecQueue->csLock;
and so I think the rEFInd is not for me.

So, then how should I proceed with the install?

Thank you.
Top
P.Kosunen
Guru
Guru
Posts: 309
Joined: Mon Nov 21, 2005 12:29 pm
Location: Finland

  • Quote

Post by P.Kosunen » Sat Sep 22, 2018 10:01 am

Edit: https://packages.gentoo.org/packages/sys-boot/os-prober

Go by handbook, but install os-proper before running grub-install.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Sun Sep 23, 2018 3:28 am

Hi,
So I would guess that the GPT is not for me, right? And I should run the MBR install.

Is my understanding correct?

Thank you.
Top
The Doctor
Bodhisattva
Bodhisattva
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Sun Sep 23, 2018 3:51 am

Check what type of partition table you have. If you are limited to 4 primary partitions you have mbr. If not you have gpt. I think windows 7 defaults to gpt.
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Top
Cuong Nguyen
Apprentice
Apprentice
Posts: 152
Joined: Thu Jan 18, 2018 3:37 pm

  • Quote

Post by Cuong Nguyen » Sun Sep 23, 2018 6:29 am

Once your laptop is Legacy (Non-UEFI) BIOS and your HDD has been parted as MBR, which is can contain maximum of 4 primary partitions that can boot directly from BIOS bootloader by INT13h in my good old days. One of primary partition can be defined as extended that can contain more logical partition.

How good is 4 Primary partitions? Good enough for single OS installation. 4 primary partitions can contain:

One Primary for System OS (Windows C: drive)
One partition for factory recovery
One partition for Windows Recovery
One partition for extended logical drivers D:, E: F:

So I prefer having the disk use GPT can contain more than 4 primary and all primary are equal (in terms of boot loading). I can't remember, can we use Legacy BIOS + GPT?

My recommendations for you, use diskpart in Windows or gdisk, fdisk in Linux to investigate how your HDD is organized first.

If your Laptop OK with booting windows, use diskmgmt.msc in windows to resize your Hard Disk and allocate a partition for your linux installation. Install GRUB with os-prober and use GRUB boot manager as primary boot loader, it can load both Windows and Linux.
Top
cwr
Veteran
Veteran
Posts: 1969
Joined: Sat Dec 17, 2005 11:17 am

  • Quote

Post by cwr » Sun Sep 23, 2018 12:48 pm

Windows seems pretty neurotic about partitiions. I've found the safest way on my Win7 laptops
is to boot Linux from a USB and shrink the Windows partition to make space for Gentoo (can
this be done from Windows?). Then install Gentoo on the new partition, and then install
EasyBCD on Windows and point a menu entry to Linux. This means going through two menus
to boot, but you can set a delay of five seconds or so, so it's not much of an impediment,
and keeps Windows and Linux entirely separate.

Good luck - Will
Top
The Doctor
Bodhisattva
Bodhisattva
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Mon Sep 24, 2018 2:00 am

cwr wrote:Windows partition to make space for Gentoo (can
this be done from Windows?).
Easily. Windows includes a resize tool. Although you defiantly want to use a tutorial. Fragmentation and #windowsFeatures make the process less than intuitive.

Using linux tools is dangerous since windows tends to fragment. Data loss has occurred from such attempts. ;)
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Tue Sep 25, 2018 4:45 am

Hi, guys,
Thank you for the replies and apologies for so many questions.
Most of the time I install Gentoo first and then on top put Windows, but now I have to do a vice-versa.

So IIUC, I just need to follow HB, marking GRUB partition (i.e. #1 as bootable). Then continue and before installing GRUB (not marging), install os-prober. That is all and it will satisfy my needs whether it is GPT or BIOS disk partitions.

Is that correct?

Thank you.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Tue Sep 25, 2018 4:59 am

Hi,
Cuong Nguyen wrote: Once your laptop is Legacy (Non-UEFI) BIOS and your HDD has been parted as MBR, which is can contain maximum of 4 primary partitions that can boot directly from BIOS bootloader by INT13h in my good old days. One of primary partition can be defined as extended that can contain more logical partition.

How good is 4 Primary partitions? Good enough for single OS installation. 4 primary partitions can contain:

One Primary for System OS (Windows C: drive)
One partition for factory recovery
One partition for Windows Recovery
One partition for extended logical drivers D:, E: F:

So I prefer having the disk use GPT can contain more than 4 primary and all primary are equal (in terms of boot loading). I can't remember, can we use Legacy BIOS + GPT?

My recommendations for you, use diskpart in Windows or gdisk, fdisk in Linux to investigate how your HDD is organized first.

If your Laptop OK with booting windows, use diskmgmt.msc in windows to resize your Hard Disk and allocate a partition for your linux installation. Install GRUB with os-prober and use GRUB boot manager as primary boot loader, it can load both Windows and Linux.
Below is the output of the diskpart:

Code: Select all

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> detail disk

WDC WD10JPVX-00JC3T0 ATA Device
Disk ID: DE7C2CB9
Type   : SATA
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : PCIROOT(0)#PCI(1100)#ATA(C00T00L00)
Current Read-only State : No
Read-only  : No
Boot Disk  : Yes
Pagefile Disk  : Yes
Hibernation File Disk  : No
Crashdump Disk  : Yes
Clustered Disk  : No

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 1         System Rese  NTFS   Partition    100 MB  Healthy    System
  Volume 2     C                NTFS   Partition    482 GB  Healthy    Boot

DISKPART>
I think it is not a GPT disk right?

Thank you.
Top
Cuong Nguyen
Apprentice
Apprentice
Posts: 152
Joined: Thu Jan 18, 2018 3:37 pm

  • Quote

Post by Cuong Nguyen » Tue Sep 25, 2018 6:47 am

ONEEYEMAN wrote:Hi,

I think it is not a GPT disk right?

Thank you.
Use LIST DISK from inside DISKPART. GPT attribute displayed in the last column
Top
Cuong Nguyen
Apprentice
Apprentice
Posts: 152
Joined: Thu Jan 18, 2018 3:37 pm

  • Quote

Post by Cuong Nguyen » Tue Sep 25, 2018 7:46 am

ONEEYEMAN wrote:Hi, guys,
Thank you for the replies and apologies for so many questions.
Most of the time I install Gentoo first and then on top put Windows, but now I have to do a vice-versa.
I always do clean install Windows on clean HDD (no partitioned) first, as Windows always tends to manage boot process and partitions on its own. Windows clean needs at least 2 primary (boot-able), 1 for recovery WPE and 1 for C: system drive. Your HDD has been partitioned with 100MB of Windows Recovery Boot Loader, whilst main recovery WPE is located in C: drivers under folder C:\Windows. In my case with UEFI laptop, GPT HDD, I usually do manual partitioning before install as follows:

500 MB - Windows Recovery (for later MS OS like Windows 10 Inside Preview this the required size for Windows RE grow up to 840MB - 1GB). If the 500MB is not enough Windows will resize Windows_C system partition and allocate another Windows RE, sized up to 1GB)
200 MB - EFI - contain EFI bootloaders in a FAT partition accessible by UEFI BIOS
16 MB - Windows Reserved (Microsoft Docs say it needed for resizing partitions during latter OS update)
-- Windows C: drive NTFS
2GB-4GB ext2 Linux Boot (I need big boot partition here because I want to install multiple Linux and BSD distros in LVM disks, where I will put Linux kernels and initRAM disks, formatted as ext2 because usually Boot Loaders can only read from FAT and ext2-ext4 file systems, without install additional FS drivers)
-- Rest of the disk, will be configured as LVM so I can allocate necessary space for Linux OS distros, without touching partitions.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Tue Sep 25, 2018 12:31 pm

Hi,

Code: Select all

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          931 GB   448 GB
  Disk 1    No Media           0 B      0 B
so the disk is not GPT.

So, as I said before - just follow the HB, make Gentoo partition bootable and before installing GRUB (not merging), install os-prober.

Thank you.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Thu Oct 04, 2018 12:46 pm

Hi, guys,
Have a question about the HB.
They start with the BIOS boot partition.

Do I need that? Isn't it enough to have just boot, swap and root partitions?

Also, I think I will need to select the boot partition as "boot" one, so that the machine will be booted with GRUB and the Windows bootloader.

Thank you.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Thu Oct 04, 2018 12:59 pm

I use 2 disks one for windows (disk1) and the other for linux (disk2).
I install grub on disk1, and have it tell windows to load as an option, I don't use the windows boot loader other than for windows.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Thu Oct 04, 2018 1:52 pm

Hi,
I have just one disk.
And my question was more in line of "Do I really need the BIOS boot partition"?

But thank you anyway.
I will set the boot partition in fdisk to be the partition where grub is installed.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Thu Oct 04, 2018 2:21 pm

I've had both windows and linux installed on the same disk, and I've kept the partitions pretty much the same, and still use grub for booting (win and linux)

If I were running windows I'd have one partition for window, one for boot, one for root and one for swap (if I needed it, I would rather have a load of ram and no swap)
If you let windows create 2 partitions, then you have one for boot and would have to use an extended partition for the rest of linux and swap.

This is all with a regular old fashioned bios boot not efi.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Sat Oct 06, 2018 12:54 am

Hi,
I am doing the install and have a question.
I am currently residing in the US Central Time. Does this mean I should select CST6CDT as a timezone? Or there is another/better choice?

Thank you.
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Sat Oct 06, 2018 12:55 am

Hi,
Anon-E-moose wrote: I've had both windows and linux installed on the same disk, and I've kept the partitions pretty much the same, and still use grub for booting (win and linux)

If I were running windows I'd have one partition for window, one for boot, one for root and one for swap (if I needed it, I would rather have a load of ram and no swap)
If you let windows create 2 partitions, then you have one for boot and would have to use an extended partition for the rest of linux and swap.

This is all with a regular old fashioned bios boot not efi.
Yes, that's what I'm trying to install.

Thank you.
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Sat Oct 06, 2018 1:14 am

For openrc per the Handbook

Code: Select all

echo "America/Chicago" > /etc/timezone
Top
ONEEYEMAN
Advocate
Advocate
Posts: 3709
Joined: Tue Mar 01, 2005 9:49 pm

  • Quote

Post by ONEEYEMAN » Sat Oct 06, 2018 1:28 am

Hi,
Tony0945 wrote: For openrc per the Handbook

Code: Select all

echo "America/Chicago" > /etc/timezone
Ok, I will do just that.
But then what is CST6CDT zone for?

Thank you.
Top
Post Reply

35 posts
  • 1
  • 2
  • Next

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic