Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual boot windows 7 and gentoo, BIOS and not UEFI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
nigelvr
n00b
n00b


Joined: 08 Mar 2015
Posts: 1

PostPosted: Sun Mar 08, 2015 4:25 pm    Post subject: Dual boot windows 7 and gentoo, BIOS and not UEFI Reply with quote

Hi,

Could someone help me out with partitioning my hard disk (just one TB sata disk) so that I can dual boot windows 7 and gentoo? I believe my system uses BIOS and not UEFI (though I'm not certain). I will be using fdisk since this worked for me years ago, but I have since forgotten a lot. I also have specific questions:

(1a) If I install windows first, then the windows partitions will occupy the beginning of the disk, but http://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Alternative:_Using_fdisk_to_partition_the_disk states that it is important for the gentoo partitions to be at the begining of the disk. How do I deal with this?

(2) http://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Alternative:_Using_fdisk_to_partition_the_disk tells us to label the first partition as EFI ... but since I'm using an MBR partition scheme I should ignore this, right?

(not a question but a comment)

(3) I thought I could start with the empty disk, partition it using fdisk, and then install windows on the remaining space, but the windows installer fails and tells me that I have too many partitions.

BTW I am on an AMD64 machine and I "determined" I am using BIOS rather than UEFI using the first method here http://www.thewindowsclub.com/check-if-uefi-or-bios. If this is not OK then please let me know.

Thanks!
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2038
Location: United Kingdom

PostPosted: Sun Mar 08, 2015 5:07 pm    Post subject: Reply with quote

To partition the HDD you could use the GUI utility GParted on the (Gentoo-based) SystemRescueCd instead of fdisk. That's what I usually use.

In case it's of interest, here's a HowTo I wrote a few years ago for PC BIOS machines: The best way to dual boot Linux and Windows. I prefer to use the Windows Boot Manager to chainload GRUB 2 so that Linux does not touch the MBR. But of course it's up to you how you want to do it.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Mar 08, 2015 8:50 pm    Post subject: Reply with quote

Quote:
To partition the HDD you could use the GUI utility GParted on the (Gentoo-based) SystemRescueCd instead of fdisk. That's what I usually use.

Quote:
I prefer to use the Windows Boot Manager to chainload GRUB 2 so that Linux does not touch the MBR.


I concur. That's how I've always done it with NT, 2000, and XP. I used Partition Commander to shrink the Windows partition. DEFINITELY install Windows first. It wants to eat up all the space.

I wouldn't worry about having your boot partition first on the disk. I think that advice is a holdover from LILO.

Regarding the partitions, I still like a separate /boot but I've pretty much replaced replaced swap with a swapfile. YMMV. Depends on your memory and CPU.

I've never put /home on a separate partition. I don't want to start a flame war. There may be reasons for that partitioning scheme, but dual booting with Windows isn't one of them.

I still use old grub. Here's my boot.ini It may be different with grub2
Code:
[boot loader]
timeout=30
default=C:\BOOTSECT.LNX
[operating systems]
C:\BOOTSECT.LNX="Gentoo Linux"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /usepmtimer /NoExecute=OptIn /pae


I didn't see in Fitzcaraldo's otherwise excellent instructions how to tell Windows 7 to chainload. The modified boot.ini works for NT/2000/XP. I have no experience with Win7, but I thought it was the same. Don't take my word for it, please. In the old version of windows you would use "dd" to create the file boot.lnx.

I'm sure The SystemRescueCD will work as well as EasyBCD. If you have no DVD drive, SysrecueCD can be converted to a handy bootable USB stick. I love mine. It's F-A-S-T.


BTW, grub can easily chainload Windows as well and if you're bored you can boot Windows, select Linux, than chainload Windows from Grub again and again. Perhaps at some point a stack will be blown, but I think you can do that forever.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2038
Location: United Kingdom

PostPosted: Mon Mar 09, 2015 11:40 am    Post subject: Reply with quote

Tony0945 wrote:
I didn't see in Fitzcaraldo's otherwise excellent instructions how to tell Windows 7 to chainload.

EasyBCD takes care of setting it up. When installing Linux, the user installs GRUB 2 to the boot sector of the partition on which /boot resides. After installing Linux, the user boots Windows (remember that the MBR still contains the Windows Boot Manager's code), downloads and installs EasyBCD, then launches EasyBCD in order to configure the Windows BCD. The user selects 'GRUB2' in the EasyBCD configuration menu. EasyBCD then looks for the GRUB 2 core.img file in some sub-directories in /boot/ and configures the Windows BCD to point to the file core.img. From then onwards, booting Windows will result in the Windows Boot Manager displaying menu entries for both Windows and Linux. Selecting the latter will result in the Windows Boot Manager chainloading GRUB 2.

For example, let's say I have partitioned my HDD to have a boot partition /boot on sda3:

Code:
# mount /dev/sda3 /boot # Make sure the partition is mounted.
# grub2-install --force /dev/sda3 # Install GRUB to the boot sector of the partition (NOT to the MBR).
# grub2-mkconfig -o /boot/grub/grub.cfg # Generate the grub.cfg file.

Then I boot Windows (the Windows Boot Manager's code is still untouched in the MBR), launch EasyBCD and tell it I want Windows to be able to dual boot GRUB 2. EasyBCD then looks through all the partitions on the HDD, finds the GRUB 2 core.img file and sets up the Windows BCD accordingly. That's it. The next time I boot, the Windows Boot Manager has two entries in the boot menu: Windows and Linux. If I select Linux, the Windows Boot Manager vectors to GRUB 2 on the partition holding /boot, and the GRUB 2 menu is then displayed. I can then select Linux or Windows from that menu, and boot the desired OS.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Mon Mar 09, 2015 3:43 pm    Post subject: Reply with quote

Sounds like EasyBCD automates (or simplifies with a GUI) the steps I used to take with "dd" and notepad. Thank you.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2038
Location: United Kingdom

PostPosted: Mon Mar 09, 2015 7:31 pm    Post subject: Reply with quote

Yes, basically that's it. With NT-based OSs such as Windows NT itself, Windows XP and Windows Server 2003, the boot loader was NTLDR and it used boot.ini. From Vista onwards, the Windows Boot Manager (a.k.a. BOOTMGR) is used instead, and that uses the BCD (Boot Configuration Data) database, which replaces the boot.ini file that was used by the previous NTLDR. It is possible to edit the BCD file with e.g. BCDEdit.exe or Visual BCD Editor, but EasyBCD makes it much easier to configure the BCD for dual-booting with Linux.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2038
Location: United Kingdom

PostPosted: Fri Jun 26, 2015 4:40 pm    Post subject: Reply with quote

One thing I forgot to mention if chainloading from Windows Boot Manager: The Linux boot directory must be on a Primary partition. I believe this is due to a Windows limitation. In other words, if you have a separate /boot partition, it must be a Primary partition. if you have /boot on the / (root) partition, / (root) must be a Primary partition.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC systemd-utils[udev] elogind KDE on both.

My blog
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Fri Jun 26, 2015 7:23 pm    Post subject: Reply with quote

Thanks! Reluctantly considering buying Win 7 so your input is timely. I'd much rather go completely Linux, but a few applications like SageTV are holding me back. Trying to write my own TV recording and playing program (had one for analog TV) but still failing to understand the DVB digital interface. MsMoney seems to run in wine, but I'm reluctant to commit my 15 year old database and don't like the Linux alternatives. I'm already running Abiword and Gnumeric on Windows in lieu of Office 2000 and I WON'T pay an annual fee for those programs.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum