Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Dual-Boot Windows 10/Gentoo Shrinking?
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
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Fri Sep 25, 2015 11:38 am    Post subject: [SOLVED] Dual-Boot Windows 10/Gentoo Shrinking? Reply with quote

Hi there,

I'm currently putting myself on the challenge to install Gentoo. I have an official Windows 10 installed on an Acer TravelMate, and I would like to install Gentoo and make a dual-boot.

I've read a lot about UEFI stuff before starting, but now, I'm stuck.

Basically my Minimal LiveCD won't boot on my UEFI bios. My only way to boot on the CD is to set up the bios tu run on Legacy Mode. And surprisingly, Windows 10 is working on Legacy Mode as well.

So now I have Windows 10 booting in Legacy Mode, representing 6 partitions (/dev/sda1 to /dev/sda6) : some regards boot and recovery, and I have one Microsoft Windows Basic Data partition of almost 500Gb (my HDD)

Here is the list of partitions I have on the disk manager:

- 400mo recovery partition (/dev/sda1)
- 300mo EFI partition (/dev/sda2)
- 447,61 Go NTFS main partition (/dev/sda3)
- 350mo recovery partition (/dev/sda4) (why do I have two recovery? I don't know, might be the one from the Acer Recovery system)
- 17 Go recovery partition (/dev/sda5) (another recovery partition, I don't know why)
- CDFS partition (/dev/sda6) which is the LiveCD.

I know I need to shrink partition to make space for Gentoo. But what would be the procedure regarding the UEFI mode? Do I really need to take care of UEFI when I know that Windows 10 is booting on Legacy Mode ?
Can't I just shrink the partition and put Gentoo on it?

What would be the exact procedure for me to install Gentoo on a shrinked partition regarding root/boot/swap/data partitions Gentoo will need?

Thank you for your advices,

ITM.

P.S : I used the "current-install-amd64-minimal.iso" on my DVD. Secure boot is disabled and boot order is set-up to try my CD reader first. But still, the LiveCD won't boot on UEFI mode, only in Legacy.


Last edited by InTheMood on Mon Sep 28, 2015 9:10 am; edited 1 time in total
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Fri Sep 25, 2015 12:25 pm    Post subject: Reply with quote

You should use a livecd like Systemrescuecd.
The stages should work.
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Fri Sep 25, 2015 12:35 pm    Post subject: Reply with quote

Thanks for your answer, but I don't get the point ahah.

Everything's working fine, no need to repair something. I just need help to know how to shrink my disk and how to make the different partitions needed in my specific case :).
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri Sep 25, 2015 2:25 pm    Post subject: Reply with quote

I don't have any experience with UEFI, but dual-booting with Windows on a laptop I'd be inclined
to boot through Windows to Grub. That way you don't mess with the laptop's boot process, which
often involves special keys to eg: restore Windows from a hidden partition.

The software I've used on Windows is BCD Edit, which is said to work on Windows 10 / UEFI.

To shrink and edit partitions I usually use GParted, which may already be on the Live CD; if not there's
a standalone GParted bootable CD image around.

Will
Back to top
View user's profile Send private message
juampii
n00b
n00b


Joined: 23 Oct 2009
Posts: 57
Location: Argentina

PostPosted: Fri Sep 25, 2015 11:58 pm    Post subject: Reply with quote

Hi

If you have uefi configured propely you can boot windows or gentoo without bootloader, from the bios or the boot menu of your mainboard.
Or also you can install grub and choose from there.

To do this (uefi) you need to boot your system in uefi mode like Keruskerfuerst said, with the systemrescue cd, or use a live dvd or pen with some distro like ubuntu i think it has uefi support.

And in the last steps of your installation you must use efibootmgr, and you are going to see the windows uefi configuration and you can add the gentoo one.

efibootmgr --create --disk /dev/sdX -p X --label "The best OS" --loader /efi/boot/bootx64.efi

the file bootx64.efi is your kernel (i think its a good idea to put the initramfs inside the kernel if you use it, i have trobles trying to load it from uefi)

/boot/efi/boot/bootx64.efi is the path

You can create a small fat32 partition for this or maybe use the windows one, i never try it.

Have a nice day
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Sat Sep 26, 2015 12:33 am    Post subject: Reply with quote

Thank you all for the answers,

I'm still learning Linux and that's why I'm a bit lost with all the stuff you're talking.
Basically I don't really care about UEFI. If my LiveCD doesn't boot on UEFI, let's use Legacy Mode which can boot both operating systems.

As a newbie concerning this really specific stuff, what I would do in my position would be:

- Shrink Main Partition by 250Go
- Going into Gentoo LiveCD, use fdisk to remove the new 250Go partition and use the free space to set up Boot / Swap / Root / Data partitions.

After that shouldn't I be able to install Gentoo and get a dual-boot?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sat Sep 26, 2015 1:37 am    Post subject: Reply with quote

InTheMood wrote:

As a newbie concerning this really specific stuff, what I would do in my position would be:

- Shrink Main Partition by 250Go
- Going into Gentoo LiveCD, use fdisk to remove the new 250Go partition and use the free space to set up Boot / Swap / Root / Data partitions.

No, your first step would be backup the partition to be shrink, you don't shrink a partition by 250go of free space, you shrink a partition by its ending 250go, having 250go of free space in a partition doesn't mean they are at its end.
If your tool that shrink it support it fine (or if you defrag it to make sure everything is at its start) fine ; if in doubt, the backup will be there for that. If not in doubt, a backup would still be worth anyway.
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 535

PostPosted: Sat Sep 26, 2015 6:27 pm    Post subject: Reply with quote

I don't know about windows 10 but I did once set up dual booting on a windows 7 machine, I used gparted to shrink the windows partition which left it unbootable.
If I ever did it again I'd play it safe and shrink the partition from within windows.
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Sat Sep 26, 2015 11:12 pm    Post subject: Reply with quote

My computer is new with a recovery partition : I have nothing to worry concerning my Windows partition. + Windows 10 should defrag everytime as a hidden process.

Thank you for your opinion about GParted mrbassie, I'll shrink the partition with the Windows tool.

But one partition is not enough for Gentoo am I right? The installer will not automatically set up boot / root / swap partitions as an Ubuntu installer for instance? So should I set up these 3 partitions as well? And if yes, how?

Thanks everyone :)
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 340
Location: Stockholm

PostPosted: Sun Sep 27, 2015 7:01 am    Post subject: Reply with quote

I think I used ntfsresize to shrink my Windows partitions some years ago. Yesterday I used it to expand a partition, it worked fine. :D
Code:
emerge ntfs3g
man ntfsresize
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 535

PostPosted: Sun Sep 27, 2015 10:38 am    Post subject: Reply with quote

InTheMood wrote:


But one partition is not enough for Gentoo am I right? The installer will not automatically set up boot / root / swap partitions as an Ubuntu installer for instance? So should I set up these 3 partitions as well? And if yes, how?

Thanks everyone :)


The installer is you. Set up your Gentoo partitions however you want.
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Sun Sep 27, 2015 11:22 am    Post subject: Reply with quote

Ok guys! Things getting clearer thanks to you!

EDIT:

I decided to try to do it and I used Parted on the Minimal LiveCD to create 4 new partitions following default scheme provided by the handbook.

Now I have:

- /dev/sda7 BIOS-Boot partition (GRUB) 2Mb
- /dev/sda8 Boot partition (EXT2) 128Mb
- /dev/sda9 Swap partition (SWAP) 512Mb
- /dev/sda10 Root partition (EXT4) 195Gb.

I set up file systems on the newly created partitions, excepted for the sda7 which doesn't need a file system apparently.

I mounted sda8 into mnt/gentoo/boot and sda10 into mnt/gentoo.

So now I think I'm ready to start the installation! Am I right?

Concerning the dual-boot, I choosed to act like I used a BIOS and not a UEFI, and I'll refresh this topic to tell you if it worked!
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun Sep 27, 2015 8:04 pm    Post subject: Reply with quote

I tend to use a swap partition the same size as memory, since I almost never use swap but
do sometimes use hibernation, which installs a memory image on the swap partition.

And you'll find life a lot easier if you use a separate /home partition; 32G is more than enough
for /.

Will
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Sun Sep 27, 2015 8:30 pm    Post subject: Reply with quote

cwr,

Nice advice to set up a swap partition with the same size as memory. You're referring to the RAM memory correct? So I should set up a 4Go swap partition.

What would be the utility of the /home/ partition? Data sharing between Windows and Gentoo? If it's the case, I suppose that this partition should be formatted in Ext4, right?

Last question: "/" is referring to the root partition, correct?
Back to top
View user's profile Send private message
mrbassie
Guru
Guru


Joined: 31 May 2013
Posts: 535

PostPosted: Mon Sep 28, 2015 6:50 am    Post subject: Reply with quote

InTheMood wrote:



What would be the utility of the /home/ partition? Data sharing between Windows and Gentoo? If it's the case, I suppose that this partition should be formatted in Ext4, right?

Last question: "/" is referring to the root partition, correct?


The main reason for a /home partition is so you can reinstall gentoo or switch to another distro or whatever without losing all your files. I don't know if windows can read anything that isn't fat or ntfs. If you format a usb stick as ext4 and pop it in a windows machine it treats it as unformatted ime.

/ is root, not to be confuses with /root (root user's home directory). Top directory in the file system. Everything else is a subdirectory of /.

EDIT: Sorry if the above came across as patronising, I got the impression you were new to Linux (?).


Last edited by mrbassie on Mon Sep 28, 2015 4:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Mon Sep 28, 2015 9:09 am    Post subject: Reply with quote

Well, thank you guys.

Everything went fine until the GRUB2 installation. The fact is GRUB can't deal with GPT partitions, and as I considered my system like a BIOS system I did nothing concerning the UEFI.

Now I know how I would need to proceed in order to make it work, even if I need to start again from scratch!

Thank you guys, I close the topic :).
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Mon Sep 28, 2015 11:57 am    Post subject: Reply with quote

Grub can deal with UEFI. Be sure for this! ;)

My Realtime System uses grub2 + GPT + UEFI. You need the grub target x86_64-efi.

https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
InTheMood
n00b
n00b


Joined: 25 Sep 2015
Posts: 8

PostPosted: Mon Sep 28, 2015 6:10 pm    Post subject: Reply with quote

Yes sorry, I should have been more specific: as I considered my system as BIOS since the beginning, I dit not followed the procedure needed to set-up a proper boot partition.

My boot partition was /dev/sda7 GPT no filesystem with the correct flag but when I started grub2-install it came up with an error. I think I forgot to set-up something properly and that's why I need to start again.
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