Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to dual boot and not break anything
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
Dodec
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2012
Posts: 115

PostPosted: Fri May 22, 2015 12:56 am    Post subject: How to dual boot and not break anything Reply with quote

It's been a while, but I'm finally back on the forums because I just got a new computer after my old one died last year. I'm planning on dual-booting it with Gentoo again (it already runs Windows 8, and much as I hate Windows, there are some things I'll still need it for because some people haven't come around to the beauty of open source yet), but my last attempt at that could be described as abortive at best--those of you who recognize me might remember the fact that my very first thread in this forum was something along the lines of "I installed Gentoo, but not all the way, then I took out the LiveCD and it says there's no operating system, what happened to Windows?" "You killed it."

I can't afford to majorly mess up my computer like that again, so to that end, what are some best practices for dual booting that will ensure as much as possible that I don't break everything? I'm on a Toshiba Satellite C55, AMD A6 processor, 4GB RAM, 750GB hard drive, Windows 8.1 v6.3 build 9600. I've already found things like this tutorial, this thread, and this guide, I'd just like to know if there's anything not covered in there that would be good to know to minimize the risk of major issues a la my first time trying to dual boot and having no idea what I'm doing.

Thanks in advance!
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Fri May 22, 2015 7:42 am    Post subject: Reply with quote

I did it this way (Windows 7)

1) Create a bootable linux usb-stick. Boot linux.

2) Fill free space in all partitions with zeroes: mount /dev/sdaX /mnt ; dd if=/dev/zero of=/mnt/filewithzeroes ; rm /mnt/filewithzeroes; umount /mnt

3) Take a full compressed backup of your harddisk to an external disk: mount /dev/sdbX /mnt; dd if=/dev/sda | gzip > /mnt/sdaimage.gz
(to restore: zcat /mnt/sdaimage.gz | dd of=/dev/sda)

4) Shrink the Windows partition (sda2 in my case)

5) Create new partitions. Install Linux. But do not overwrite existing master boot record mbr (owned by Windows). In stead, install grub and create a new mbr on one of the new partitions. And make that partition active. Configure grub to chainload Windows mbr.

If anything goes wrong. Simply make partion 1 active and windows will boot.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 543
Location: Germany

PostPosted: Fri May 22, 2015 8:13 am    Post subject: Reply with quote

Most likely your new computer uses UEFI, so instead of installing grub into MBR you'll have to install it to UEFI partition. See https://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8 for some details. If you search for 'gentoo dual boot windows 8' then most likely you'll find more descriptions.

From my own experience, I had to replace (after moving it) EFI/Boot/bootx64.efi on UEFI partition with rEFInd boot loader. All my attempts to configure UEFI with efibootmgr have failed. At first Windows updates would rewrite that file, but in last 2 months this didn't happen anymore. Maybe your UEFI will be more friendly and allow configuration instead of brute force.

I've also had to play with Windows itself in order to squeeze more free space out of its partition. As far as I understand, it puts swap files somewhere around middle of original partition and that prevents aggressive resizes. Disabling swapping would free that space for resize. After resize, swap can be enabled again.
Back to top
View user's profile Send private message
Barracuz
n00b
n00b


Joined: 17 Mar 2015
Posts: 17
Location: R.I., United States

PostPosted: Fri May 22, 2015 6:12 pm    Post subject: Reply with quote

I managed to get gentoo installed and boot windows. I think the key to dual booting (noob here) is the partitioning. As long as you partition correctly you should be fine.

I too followed the same guides you linked. Logged in Windows I defragmented the drives and shrunk the main OS partitiion. Leave it as unallocated space. then booted up the sysrecue cd and used parted to make my partitions. Followed the install as guided in the main handbook Following the ocasional little excerpts for UEFI installs.

I got gentoo going but it's only bootable from the sysrecuecd's grub bootloader. I used both efibootmgr and grub but grub freezes when loading the kernel.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun May 24, 2015 7:32 pm    Post subject: Reply with quote

I boot my dual-boot laptop via the windows boot menu, which boots grub in its turn.
It's another five-second delay, but that way, windows doesn't even have to know that
linux exists and all the rebuild partition nonsense is untouched.

Check the use of EasyBCD on the net.

Will
Back to top
View user's profile Send private message
Dodec
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2012
Posts: 115

PostPosted: Sun May 31, 2015 6:53 pm    Post subject: Reply with quote

So I've been considering all these suggestions and doing some Googling of my own, and it appears that the safest way to go about this is with EasyBCD. Now I just have a couple more minor questions: since I'll be using GRUB2 and not rEFInd, how would that affect the kernel configuration given in https://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8 ? Will the settings given there be fine, should I just go along with the default suggestions in the Gentoo Handbook, or will I need to change things either way to make the kernel play nicely with both grub and the dual-booting?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun May 31, 2015 7:51 pm    Post subject: Reply with quote

IMHO if you want to UEFI dual boot with windows and not break anything- use rEFInd . The kernel settings given there be fine with grub2. grub2 will be the problem. hints: https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT ; os-prober ; GRUB_PLATFORMS="efi-64" ; make sure you have the ability to rescue windows before grub-install
_________________
Defund the FCC.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sun May 31, 2015 8:59 pm    Post subject: Reply with quote

My trick for not breaking anything is to

0) Back up windows completely. Windows includes tools to do this and it costs 1 DVD to do properly. Very cheap insurance.
1) Do all the shrinking of windows using windows. M$ screws up many things, but handling their own partitions isn't one of them. Linux tools may botch this, so best leave it to windows.
2) Install Gentoo on the newly freed space. Simply adding partitions is simpler than trying to shrink any.
3) For the boot loader, there are a few choices. rEFInd is an option, but it always feels rather clunky to me and windows updates can disable it. On the other hand, simply using efibootmgr is really easy, maintainable, and easily reversible.
_________________
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
View user's profile Send private message
grrilla
n00b
n00b


Joined: 18 May 2015
Posts: 11

PostPosted: Fri Jun 05, 2015 9:27 pm    Post subject: Be cool Reply with quote

Honestly, so many things can go wrong that if it is really a concern for u, I suggest just buying a big USB stick and creating a VM http://www.techspot.com/guides/809-run-linux-from-usb-drive/

If u do choose to dual boot just stay calm through the process, often we have a habit of thinking "It's F*cked!!". When actually it's completely recoverable with a rescue boot and some config file changes (grub, fstab etc)
Back to top
View user's profile Send private message
Dodec
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2012
Posts: 115

PostPosted: Sun Jun 21, 2015 1:11 am    Post subject: Reply with quote

So...I shrank the Windows partition and all that, and now I'm noticing something weird as I'm trying to draw up my Linux partition plan. Since it was really more of a partitioning question rather than a methodology question, though, and I don't want to derail my own thread, I posted it in the partitioning sticky.
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