View previous topic :: View next topic |
Author |
Message |
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Wed Sep 19, 2018 3:57 am Post subject: [SOLVED}: Dual-boot install with Windows |
|
|
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 |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Wed Sep 19, 2018 4:57 am Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Wed Sep 19, 2018 12:41 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Wed Sep 19, 2018 9:21 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Thu Sep 20, 2018 12:09 am Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sat Sep 22, 2018 1:39 am Post subject: |
|
|
Hi,
According to this, my laptop is not EFI:
Code: |
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. |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sun Sep 23, 2018 3:28 am Post subject: |
|
|
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. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Sun Sep 23, 2018 3:51 am Post subject: |
|
|
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. |
|
Back to top |
|
|
Cuong Nguyen Apprentice
Joined: 18 Jan 2018 Posts: 152
|
Posted: Sun Sep 23, 2018 6:29 am Post subject: |
|
|
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. |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Sun Sep 23, 2018 12:48 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Mon Sep 24, 2018 2:00 am Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Tue Sep 25, 2018 4:45 am Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Tue Sep 25, 2018 4:59 am Post subject: |
|
|
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: |
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. |
|
Back to top |
|
|
Cuong Nguyen Apprentice
Joined: 18 Jan 2018 Posts: 152
|
Posted: Tue Sep 25, 2018 6:47 am Post subject: |
|
|
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 |
|
Back to top |
|
|
Cuong Nguyen Apprentice
Joined: 18 Jan 2018 Posts: 152
|
Posted: Tue Sep 25, 2018 7:46 am Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Tue Sep 25, 2018 12:31 pm Post subject: |
|
|
Hi,
Code: |
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Thu Oct 04, 2018 12:46 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Oct 04, 2018 12:59 pm Post subject: |
|
|
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. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Thu Oct 04, 2018 1:52 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Oct 04, 2018 2:21 pm Post subject: |
|
|
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. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sat Oct 06, 2018 12:54 am Post subject: |
|
|
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. |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sat Oct 06, 2018 12:55 am Post subject: |
|
|
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. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Oct 06, 2018 1:14 am Post subject: |
|
|
For openrc per the Handbook
Code: | echo "America/Chicago" > /etc/timezone |
|
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sat Oct 06, 2018 1:28 am Post subject: |
|
|
Hi,
Tony0945 wrote: |
For openrc per the Handbook
Code: |
echo "America/Chicago" > /etc/timezone
|
|
Ok, I will do just that.
But then what is CST6CDT zone for?
Thank you. |
|
Back to top |
|
|
|