Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How do I dual boot with Windows correctly?
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
P1neapple
n00b
n00b


Joined: 18 Jul 2014
Posts: 35

PostPosted: Tue Jan 27, 2015 7:25 am    Post subject: [SOLVED] How do I dual boot with Windows correctly? Reply with quote

I could only find either outdated information or information that applies to UEFI/GPT

I am using BIOS/MBR, how would I correctly dual boot with Windows (7)?

I know I need to setup GRUB2 to detect Windows, and obviously keep the Windows partition. Also I believe I need to use "local" time instead of UTC for the hardware clock.

I just want to make sure I don't miss anything :/

So, how would I dual boot Gentoo with Windows (steps please)?

Thank you in advance :)
_________________
Gentoo currently running in Virtualbox, hoping to switch to real hardware soon...


Last edited by P1neapple on Wed Jan 28, 2015 1:04 am; edited 1 time in total
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8723
Location: ~Brussels - Belgique

PostPosted: Tue Jan 27, 2015 7:57 am    Post subject: Reply with quote

Hello,

Normally, that outdated information should be OK. With BIOS systems, I prefer syslinux to GRUB, because the simplicity of configuration files, and the fact that syslinux boots the active partition, which can be Windows or a syslinux menu. So, this is easy to uninstall Linux : remove the linux partition, set the Windows partition as active, and regain the Linux space.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Tue Jan 27, 2015 8:10 am    Post subject: Reply with quote

The information about "local" time might be outdated: Depending on your windows versions there might be possibilities to use UTC time also in windows by manually setting some variables in this braindead windows configuration database. However, for details you have to look in the web...
Back to top
View user's profile Send private message
P1neapple
n00b
n00b


Joined: 18 Jul 2014
Posts: 35

PostPosted: Tue Jan 27, 2015 8:16 am    Post subject: Reply with quote

I'm asking about steps about how to dual boot Gentoo with Windows, not about if another bootloader is better.

I still much rather stay with local time if it means avoiding clock skew because of Windows.

Edit: I looked it up, UTC time requires a registry hack, much rather stay with local time then.
_________________
Gentoo currently running in Virtualbox, hoping to switch to real hardware soon...
Back to top
View user's profile Send private message
P1neapple
n00b
n00b


Joined: 18 Jul 2014
Posts: 35

PostPosted: Tue Jan 27, 2015 8:25 am    Post subject: Reply with quote

To be clear: I would like this explained to a newbie who knows how to setup a Gentoo system, but has no idea what is necessary for a dual boot with Windows. Thanks.
_________________
Gentoo currently running in Virtualbox, hoping to switch to real hardware soon...
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Tue Jan 27, 2015 9:58 am    Post subject: Reply with quote

P1neapple wrote:
To be clear: I would like this explained to a newbie who knows how to setup a Gentoo system, but has no idea what is necessary for a dual boot with Windows. Thanks.

I never touched windows bootloader on /dev/sda1. Instead I made another partition active (see fdisk command). There I installed and configured grub. After boot the entries in grub are presented. Windows 7 boot loader is chainloaded via grub. All other systems (three Linuxes and even FreeBSD) are loaded direct from grub (+grub2). The advantage with this method is that it works even if Windows updates its boot-record! :D

Edit:
This is my layout:
Code:
Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1             2048     409599     407552   199M  7 HPFS/NTFS/exFAT
/dev/sda2           409600  266649599  266240000   127G  7 HPFS/NTFS/exFAT
/dev/sda3  *     266649600  309069823   42420224  20,2G a5 FreeBSD
/dev/sda4        309069824 1465147119 1156077296 551,3G  5 Extended
/dev/sda5       1464936448 1465147119     210672 102,9M  c W95 FAT32 (LBA)
/dev/sda6        309071872  330043391   20971520    10G 83 Linux
/dev/sda7        330045440  351016959   20971520    10G 83 Linux
/dev/sda8        351019008  371990527   20971520    10G 83 Linux
/dev/sda9        371992576  791422975  419430400   200G  7 HPFS/NTFS/exFAT
/dev/sda10       791425024 1210855423  419430400   200G 83 Linux
/dev/sda11      1210857472 1422516223  211658752 100,9G  7 HPFS/NTFS/exFAT
/dev/sda12      1422518272 1464936447   42418176  20,2G  7 HPFS/NTFS/exFAT

Partition table entries are not in disk order.
This is how I created boot-record
Code:
grub-install --root-directory=/???/boot /dev/sda3
N.B. configuration file need not be on same partition. I have it on sda6:
Code:

(mount /dev/sda6 /tmp1)
(cat /tmp1/boot/grub/menu.lst)

timeout         300
color cyan/blue white/blue
 
title           gentoo-3.18.3/sda6
root            (hd0,5)
kernel          /boot/kernel-genkernel-x86_64-3.18.3-gentoox root=/dev/sda6 ro vga=773 rootdelay=17 psmouse.proto=imps

title           gentoo-3.18.1/sda7 
root            (hd0,6)
kernel          /boot/kernel-genkernel-x86_64-3.18.1-gentoo root=/dev/sda7 ro vga=773 rootdelay=17 psmouse.proto=imps

title           Arch-linux/sda8 init=/bin/systemd   
root            (hd0,7)
kernel          /boot/vmlinuz-linux root=/dev/sda8 ro vga=773 rootdelay=17 psmouse.proto=imps
initrd          /boot/initramfs-linux.img
 
title           Windows
root            (hd0,0)
chainloader     +1

title           grub2 sda7
root            (hd0,6)
chainloader     +1
As you see I also chainload grub2. I failed to install the freeBSD boot loader, but grub2 works fine for freeBSD. Grub2 could have been used as main boot loader for everything but Windows. This is how I created grub2 boot record on sda7:
Code:
grub2-install --root-directory=/ --boot-directory=/grub2 --force /dev/sda7
grub2-mkconfig -o /grub2/grub/grub.cfg


Last edited by Irre on Tue Jan 27, 2015 6:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Tue Jan 27, 2015 10:27 am    Post subject: Re: How do I dual boot with Windows correctly? Reply with quote

P1neapple wrote:
I am using BIOS/MBR, how would I correctly dual boot with Windows (7)?
For windows 7 to install it will need space for two primary partitions. Windows installer will create these partitions by itself. So it should be ok starting with a primary boot partition and an extended partition for swap and "/".
Code:
Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  101MB   101MB   primary   ext2
 2      101MB   88.2GB  88.1GB  extended
 5      101MB   3104MB  3004MB  logical   linux-swap(v1)
 6      3104MB  88.2GB  85.1GB  logical   reiserfs
Then windows installer can create it's partitions in the remaining disc space. Minimum 20G should work.
Code:
 3      88.2GB  88.3GB  105MB   primary   ntfs            boot
 4      88.3GB  120GB   31.7GB  primary   ntfs
After that, grub mbr needs to be re-installed since windows installer overwrote it.
And, sys-boot/os-prober would be needed for grub2 create the grub menu windows line.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


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

PostPosted: Tue Jan 27, 2015 1:26 pm    Post subject: Re: How do I dual boot with Windows correctly? Reply with quote

P1neapple wrote:
I could only find either outdated information or information that applies to UEFI/GPT

I am using BIOS/MBR, how would I correctly dual boot with Windows (7)?

I know I need to setup GRUB2 to detect Windows, and obviously keep the Windows partition. Also I believe I need to use "local" time instead of UTC for the hardware clock.

I just want to make sure I don't miss anything :/

So, how would I dual boot Gentoo with Windows (steps please)?

Thank you in advance :)

I also use BIOS/MBR and dual-boot Gentoo and Windows 7. However, in order to guarantee not borking Windows, I chainload GRUB 2 from the Windows Boot Manager, i.e. the MBR is not touched by GRUB 2 at all, only Windows, which means that the Windows hidden factory restore partition function key code in the MBR is left intact too (if your manufacturer has installed such code). To do all that, I used EasyBCD (Non-commercial edition). The procedure I used is explained in The best way to dual boot Linux and Windows.
_________________
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
P1neapple
n00b
n00b


Joined: 18 Jul 2014
Posts: 35

PostPosted: Tue Jan 27, 2015 10:37 pm    Post subject: Reply with quote

Ok thanks to charles17 I found out I need to use os-prober. I think the os-prober needs the OS to have NTFS support to detect Windows, no? So does the install media come with NTFS support??
_________________
Gentoo currently running in Virtualbox, hoping to switch to real hardware soon...
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 283
Location: Canada

PostPosted: Tue Jan 27, 2015 11:42 pm    Post subject: Reply with quote

P1neapple wrote:
Ok thanks to charles17 I found out I need to use os-prober. I think the os-prober needs the OS to have NTFS support to detect Windows, no? So does the install media come with NTFS support??

I don't think os-prober needs NTFS support. When I installed Gentoo it was basically:
Code:
# emerge os-prober
# emerge grub
# grub2-install /dev/sda
# grub2-mkconfig -o /boot/grub/grub.cfg

And you are good to go :D


Last edited by ShanaXXII on Wed Jan 28, 2015 9:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
P1neapple
n00b
n00b


Joined: 18 Jul 2014
Posts: 35

PostPosted: Wed Jan 28, 2015 1:04 am    Post subject: Reply with quote

ShanaXXII, maybe because you already had NTFS support ;)
Ok thank you for telling me it's so simple.

I shall mark this as solved.
_________________
Gentoo currently running in Virtualbox, hoping to switch to real hardware soon...
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 283
Location: Canada

PostPosted: Wed Jan 28, 2015 9:21 pm    Post subject: Reply with quote

P1neapple wrote:
ShanaXXII, maybe because you already had NTFS support ;)
Ok thank you for telling me it's so simple.

I shall mark this as solved.


Well, I guess the gentoo install disc came with NTFS support (:
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Thu Jan 29, 2015 6:46 pm    Post subject: Reply with quote

well grub2, boot partition, linux partion, windows partition.

and for your clock =>

Quote:
[I] net-misc/ntp
Available versions: 4.2.6_p5-r10 (~)4.2.6_p5-r11 4.2.8-r1 (~)4.2.8-r2 {caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf}
Installed versions: 4.2.8-r2(13:06:16 19.01.2015)(ipv6 ssl -caps -debug -openntpd -parse-clocks -samba -selinux -snmp -vim-syntax -zeroconf)
Homepage: http://www.ntp.org/
Description: Network Time Protocol suite/programs



why bother at all? set up ntp and afaik windows 95+ could use a time server too. why bother with anything when the os corrects the clock itself?

ofc there are so many installation ways, so anything more is out of scope.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jan 29, 2015 8:10 pm    Post subject: Reply with quote

tw04l124 wrote:
[...]
why bother at all? set up ntp and afaik windows 95+ could use a time server too. why bother with anything when the os corrects the clock itself?

I'm left wondering if you even bothered to read what was posted.
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 812

PostPosted: Fri Jan 30, 2015 6:04 pm    Post subject: Reply with quote

P1neapple wrote:
I'm asking about steps about how to dual boot Gentoo with Windows, not about if another bootloader is better.

I still much rather stay with local time if it means avoiding clock skew because of Windows.

Edit: I looked it up, UTC time requires a registry hack, much rather stay with local time then.


the registery is just a database for all .ini and .conf files for anything installed in windows, changing anything in the registry is perfectly safe and ok
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
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