* [gentoo-user] Resizing boot partition while dual-booting
@ 2024-04-03 15:10 Vít Smolík
2024-04-03 15:34 ` Alexis Praga
2024-04-03 16:20 ` Michael
0 siblings, 2 replies; 6+ messages in thread
From: Vít Smolík @ 2024-04-03 15:10 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
Hello fellow Gentooers,
I want to dual-boot Gentoo and M$ Windows on my computer, but windows only
created a 100MB EFI partition. Is it necessary to resize it so my boot
files will fit? If so - how to resize it so I don't mess up my Windows EFI
files?
--
May the Force be with you,
Vít Smolík.
[-- Attachment #2: Type: text/html, Size: 581 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Resizing boot partition while dual-booting
2024-04-03 15:10 [gentoo-user] Resizing boot partition while dual-booting Vít Smolík
@ 2024-04-03 15:34 ` Alexis Praga
2024-04-03 15:37 ` Vít Smolík
2024-04-03 16:20 ` Michael
1 sibling, 1 reply; 6+ messages in thread
From: Alexis Praga @ 2024-04-03 15:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1.1: Type: text/plain, Size: 723 bytes --]
Hi Vit,
I have a dual boot with a 100Mb EFI partition. It works fine, except there isn’t enough place for both old and new kernels for upgrading. So I moved the old kernel from /boot into a safe directory before upgrading.
Maybe not the best strategy but I didn’t dare resize it.
Alexis
On Wednesday, April 3rd, 2024 at 17:10, Vít Smolík <vit.smolik2@gmail.com> wrote:
> Hello fellow Gentooers,
>
> I want to dual-boot Gentoo and M$ Windows on my computer, but windows only created a 100MB EFI partition. Is it necessary to resize it so my boot files will fit? If so - how to resize it so I don't mess up my Windows EFI files?
>
> --
> May the Force be with you,
> Vít Smolík.
>
>
[-- Attachment #1.1.2.1: Type: text/html, Size: 1967 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Resizing boot partition while dual-booting
2024-04-03 15:34 ` Alexis Praga
@ 2024-04-03 15:37 ` Vít Smolík
2024-04-03 16:21 ` Waldo Lemmer
0 siblings, 1 reply; 6+ messages in thread
From: Vít Smolík @ 2024-04-03 15:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 969 bytes --]
Do you store your initramfs on the 100mb partition? Or do you stire it
somewhere else?
May the Force be with you,
Vít Smolík.
Dne st 3. 4. 2024 17:35 uživatel Alexis Praga <alexis.praga@proton.me>
napsal:
> Hi Vit,
>
> I have a dual boot with a 100Mb EFI partition. It works fine, except there
> isn’t enough place for both old and new kernels for upgrading. So I moved
> the old kernel from /boot into a safe directory before upgrading.
> Maybe not the best strategy but I didn’t dare resize it.
>
> Alexis
>
> On Wednesday, April 3rd, 2024 at 17:10, Vít Smolík <vit.smolik2@gmail.com>
> wrote:
>
> Hello fellow Gentooers,
>
> I want to dual-boot Gentoo and M$ Windows on my computer, but windows only
> created a 100MB EFI partition. Is it necessary to resize it so my boot
> files will fit? If so - how to resize it so I don't mess up my Windows EFI
> files?
>
> --
> May the Force be with you,
> Vít Smolík.
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 2304 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Resizing boot partition while dual-booting
2024-04-03 15:10 [gentoo-user] Resizing boot partition while dual-booting Vít Smolík
2024-04-03 15:34 ` Alexis Praga
@ 2024-04-03 16:20 ` Michael
1 sibling, 0 replies; 6+ messages in thread
From: Michael @ 2024-04-03 16:20 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2882 bytes --]
On Wednesday, 3 April 2024 16:10:41 BST Vít Smolík wrote:
> Hello fellow Gentooers,
>
> I want to dual-boot Gentoo and M$ Windows on my computer, but windows only
> created a 100MB EFI partition. Is it necessary to resize it so my boot
> files will fit? If so - how to resize it so I don't mess up my Windows EFI
> files?
100M for boot should be enough. This is what I have on one PC here, where /
mnt/Windows is the 100M EFI partition:
~ # du -s -h /mnt/Windows
68M /mnt/Windows
~ # du -s -h /mnt/Windows/EFI/*
1.9M /mnt/Windows/EFI/Boot
36M /mnt/Windows/EFI/Gentoo
27M /mnt/Windows/EFI/Microsoft
4.3M /mnt/Windows/EFI/ubuntu
The /EFI/Gentoo directory has two kernels, but no initramfs (I don't use it)
and I don't use GRUB either:
~ # ls -la /mnt/Windows/EFI/Gentoo/
total 36381
drwxr-xr-x 2 root root 2048 Jan 26 16:51 .
drwxr-xr-x 6 root root 1024 Aug 2 2023 ..
-rwxr-xr-x 1 root root 11743360 Dec 13 10:36 bootx64-6.1.67-gentoo.efi
-rwxr-xr-x 1 root root 13105984 Feb 18 08:44 bootx64-6.6.13-gentoo.efi
-rwxr-xr-x 1 root root 137161 Dec 13 10:36 config-6.1.67-gentoo
-rwxr-xr-x 1 root root 140301 Feb 18 08:44 config-6.6.13-gentoo
-rwxr-xr-x 1 root root 4615431 Dec 13 10:36 System.map-6.1.67-gentoo
-rwxr-xr-x 1 root root 7504974 Feb 18 08:44 System.map-6.6.13-gentoo
The /EFI/ubuntu directory has only the GRUB .efi executable in it, because the
ubuntu distribution kernel and initramfs is installed in the ubunutu /
partition, not in EFI.
If you really want to make the EFI partition larger you can use gparted to do
this, but you have to be very careful. This is how I have done it whenever I
needed to resize Windows partitions:
1. Boot into MSWindows and defragment the drive. Press Shift as you click to
shutdown fully the MSWindows OS (to avoid hybrid hybernation).
2. Reboot with gparted Live USB, or with the Gentoo OS.
3. Unmount the EFI partition, if mounted and resize the C:\ drive to make it
smaller, in order to release enough space on the right of it, to be able to
move it out of the way. Careful you *only* drag the right hand edge of the C:
\ partition when you shrink it, toward the left.
3. After you apply the changes move the C:\ partition to the right away from
the EFI partition.
4. Apply the change and then resize the EFI partition to a desired size, e.g.
500M.
5. Apply again and next move the C:\ partition to the left.
6. Apply and then resize the C:\ partition to enlarge it. Apply the last
change and you're done.
NOTE: Do NOT delete any of the MSWindows partitions and do NOT attempt to
change their order. If in doubt ask.
After you reboot into MSWindows, it will pop up a warning about the C:\ drive
filesystem needing checking, click to accept the warning and wait until it
finishes checking the filesystem.
Enjoy your Gentoo!
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Resizing boot partition while dual-booting
2024-04-03 15:37 ` Vít Smolík
@ 2024-04-03 16:21 ` Waldo Lemmer
2024-04-05 11:30 ` Vít Smolík
0 siblings, 1 reply; 6+ messages in thread
From: Waldo Lemmer @ 2024-04-03 16:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2597 bytes --]
Hi Vit
I presume you plan to have a single boot partition that will contain your
bootloader, kernel and initramfs. There are actually two kinds of boot
partitions that are commonly used together:
1. The EFI system partition (ESP) contains Linux and Windows's bootloaders.
It's formatted as FAT.
2. The extended boot (XBOOTLDR) partition contains kernels, initramfs's and
microcode. It's formatted as anything the bootloader supports (GRUB
supports FAT, ext4 and more).
If you have a single boot partition, you're actually just combining the
above two. If you want to create more room, you can split it:
1. Shrink your Linux partition to create space for the extended boot
partition. You can GParted from another system or bootable USB.
2. Create and format the extended boot partition.
3. Modify /etc/fstab so the ESP gets mounted at /efi and the XBOOTLDR gets
mounted at /boot.
4. Mount these two partitions.
5. If this is an existing install, move the kernel, initramfs and microcode
from /efi to /boot. Otherwise, install the bootloader and the kernel.
6. Re-configure your bootloader (e.g. `grub-mkconfig -o
/efi/grub/grub.cfg`).
Now the large kernel and initramfs files don't take up space on the ESP
that's being shared with Windows.
Alternatively, just resize the ESP. However, that breaks Windows's
bootloader since the starting point of the C:\ partition moved, so you need
to fix it from a Windows setup USB using bootrec. I can't help you with
that.
Waldo
On Wed, Apr 3, 2024 at 5:38 PM Vít Smolík <vit.smolik2@gmail.com> wrote:
> Do you store your initramfs on the 100mb partition? Or do you stire it
> somewhere else?
>
> May the Force be with you,
> Vít Smolík.
>
> Dne st 3. 4. 2024 17:35 uživatel Alexis Praga <alexis.praga@proton.me>
> napsal:
>
>> Hi Vit,
>>
>> I have a dual boot with a 100Mb EFI partition. It works fine, except
>> there isn’t enough place for both old and new kernels for upgrading. So I
>> moved the old kernel from /boot into a safe directory before upgrading.
>> Maybe not the best strategy but I didn’t dare resize it.
>>
>> Alexis
>>
>> On Wednesday, April 3rd, 2024 at 17:10, Vít Smolík <vit.smolik2@gmail.com>
>> wrote:
>>
>> Hello fellow Gentooers,
>>
>> I want to dual-boot Gentoo and M$ Windows on my computer, but windows
>> only created a 100MB EFI partition. Is it necessary to resize it so my boot
>> files will fit? If so - how to resize it so I don't mess up my Windows EFI
>> files?
>>
>> --
>> May the Force be with you,
>> Vít Smolík.
>>
>>
>>
>>
[-- Attachment #2: Type: text/html, Size: 4397 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] Resizing boot partition while dual-booting
2024-04-03 16:21 ` Waldo Lemmer
@ 2024-04-05 11:30 ` Vít Smolík
0 siblings, 0 replies; 6+ messages in thread
From: Vít Smolík @ 2024-04-05 11:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3238 bytes --]
Hello everyone,
Thanks for your help! I managed to get the EFI partition to my liking by
installing Windows first, but before starting the install, I created my EFI
partition manually by running these commands:
1. diskpart
2. list disk
3. sel disk 0
4. create partition efi size=1000
5. format quick fs=fat32 label=System
Then i continued as normal and Windows used my 1GB EFI partition.
st 3. 4. 2024 v 18:22 odesílatel Waldo Lemmer <pugonfireyt@gmail.com>
napsal:
> Hi Vit
>
> I presume you plan to have a single boot partition that will contain your
> bootloader, kernel and initramfs. There are actually two kinds of boot
> partitions that are commonly used together:
> 1. The EFI system partition (ESP) contains Linux and Windows's
> bootloaders. It's formatted as FAT.
> 2. The extended boot (XBOOTLDR) partition contains kernels, initramfs's
> and microcode. It's formatted as anything the bootloader supports (GRUB
> supports FAT, ext4 and more).
>
> If you have a single boot partition, you're actually just combining the
> above two. If you want to create more room, you can split it:
> 1. Shrink your Linux partition to create space for the extended boot
> partition. You can GParted from another system or bootable USB.
> 2. Create and format the extended boot partition.
> 3. Modify /etc/fstab so the ESP gets mounted at /efi and the XBOOTLDR gets
> mounted at /boot.
> 4. Mount these two partitions.
> 5. If this is an existing install, move the kernel, initramfs and
> microcode from /efi to /boot. Otherwise, install the bootloader and the
> kernel.
> 6. Re-configure your bootloader (e.g. `grub-mkconfig -o
> /efi/grub/grub.cfg`).
>
> Now the large kernel and initramfs files don't take up space on the ESP
> that's being shared with Windows.
>
> Alternatively, just resize the ESP. However, that breaks Windows's
> bootloader since the starting point of the C:\ partition moved, so you need
> to fix it from a Windows setup USB using bootrec. I can't help you with
> that.
>
> Waldo
>
> On Wed, Apr 3, 2024 at 5:38 PM Vít Smolík <vit.smolik2@gmail.com> wrote:
>
>> Do you store your initramfs on the 100mb partition? Or do you stire it
>> somewhere else?
>>
>> May the Force be with you,
>> Vít Smolík.
>>
>> Dne st 3. 4. 2024 17:35 uživatel Alexis Praga <alexis.praga@proton.me>
>> napsal:
>>
>>> Hi Vit,
>>>
>>> I have a dual boot with a 100Mb EFI partition. It works fine, except
>>> there isn’t enough place for both old and new kernels for upgrading. So I
>>> moved the old kernel from /boot into a safe directory before upgrading.
>>> Maybe not the best strategy but I didn’t dare resize it.
>>>
>>> Alexis
>>>
>>> On Wednesday, April 3rd, 2024 at 17:10, Vít Smolík <
>>> vit.smolik2@gmail.com> wrote:
>>>
>>> Hello fellow Gentooers,
>>>
>>> I want to dual-boot Gentoo and M$ Windows on my computer, but windows
>>> only created a 100MB EFI partition. Is it necessary to resize it so my boot
>>> files will fit? If so - how to resize it so I don't mess up my Windows EFI
>>> files?
>>>
>>> --
>>> May the Force be with you,
>>> Vít Smolík.
>>>
>>>
>>>
>>>
--
May the Force be with you,
Vít Smolík.
[-- Attachment #2: Type: text/html, Size: 5508 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-05 11:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-03 15:10 [gentoo-user] Resizing boot partition while dual-booting Vít Smolík
2024-04-03 15:34 ` Alexis Praga
2024-04-03 15:37 ` Vít Smolík
2024-04-03 16:21 ` Waldo Lemmer
2024-04-05 11:30 ` Vít Smolík
2024-04-03 16:20 ` Michael
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox