You are not logged in.

#1 2015-06-11 18:07:37

tomsargeaunt
Member
Registered: 2014-02-04
Posts: 24

Enlarge EFI partition on arch/windows 8 dual boot machine

Hi everyone!

I have a dual boot Arch/Windows 8 machine in UEFI mode. Does anyone know how I could enlarge the EFI /boot partition without damaging either installation? Windows is installed on sda4.

 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   300M  0 part 
├─sda2   8:2    0   100M  0 part /boot
├─sda3   8:3    0   128M  0 part 
├─sda4   8:4    0   466G  0 part 
├─sda5   8:5    0   200G  0 part /
├─sda6   8:6    0     8G  0 part [SWAP]
└─sda7   8:7    0   257G  0 part /home 

As you can see, my boot partition is tiny. This partition was made by the windows install cd and I don't have the option of reinstalling windows. I have very little experience resizing partitions and I am very reluctant to try my own ideas because they are untested and I don't want to break either system. Any experience/suggestions would be greatly appreciated. Thank you!

Offline

#2 2015-06-11 19:19:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

Are you sure you need it to be bigger?

For Arch, you only need space for the kernel image & initrd and the boot loader/manager and configuration files.

Post the output of:

df -h

Offline

#3 2015-06-11 19:33:23

tomsargeaunt
Member
Registered: 2014-02-04
Posts: 24

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

It's ok at the moment, but I just cleared some space - I was messing around with a custom kernel and the space was quickly used up (I'd like to keep the vanilla arch kernel image just in case!)

Filesystem      Size  Used Avail Use% Mounted on
dev             3.9G     0  3.9G   0% /dev
run             3.9G  732K  3.9G   1% /run
/dev/sda5       197G   12G  176G   6% /
tmpfs           3.9G   11M  3.9G   1% /dev/shm
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda2        96M   52M   45M  54% /boot
tmpfs           3.9G  4.0K  3.9G   1% /tmp
/dev/sda7       253G   52G  189G  22% /home
tmpfs           785M  4.0K  785M   1% /run/user/620
tmpfs           785M   12K  785M   1% /run/user/1000

But maybe I'm just asking for trouble messing with my set-up... I'm never happy until something is broken!

Offline

#4 2015-06-12 01:49:23

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

The problem I've found using two kernels is that both kernels, by default, create a fallback. I ended up editing the presets to not create the fallbacks.

Offline

#5 2015-06-12 15:45:07

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

shrink a partition, create a new esp, copy over the data from the old one, update fstab etc, delete the old esp


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2015-06-12 21:39:53

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,763
Website

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

Mr.Elendig wrote:

shrink a partition, create a new esp, copy over the data from the old one, update fstab etc, delete the old esp

I don't think Windows will like that.

Windows might boot but I think it will complain and when the OP tries to update it and it may not complete the upgrade procedure.

However, as I don't run Windows any more I can't be sure about this.

Offline

#7 2015-06-13 20:01:21

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 96
Website

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

This is what I would do, and I seriously take no responsibility if it doesn't work because I have not tested it!

Do not reboot inbetween these steps or your system seriously won't boot! Also I am making the assumption your using GRUB. If your not using GRUB do not proceed!

1: Edit your FSTAB - change your mount point for your EFI partition to /boot/efi (instead of /boot)

2: Unmount your EFI partition: umount /boot

3: Create the new mount point on your root partition: mkdir /boot/efi

4: Mount your EFI partition in the new location: mount -t vfat /dev/sda2 /boot/efi

5: Re-install your kernel & bootloader: pacman -S linux grub

6: Re-generate ramdisk: mkinitcpio -p linux

7: Re-install grub (with correct parameters): grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck

8: Re-make grub config: grub-mkconfig -o /boot/grub/grub.cfg

9: Reboot with your fingers crossed!

Now this should put the kernel and ramdisk on your main root partition (as /boot is now on your main root partition). The only thing Arch will need on your EFI partition is a very tiny EFI executable. You can even delete old copies of your kernel/ramdisk that will be sat in /boot/efi/ (*.img and vmlinuz-linux)

Last edited by rlees85 (2015-06-15 17:38:12)

Offline

#8 2015-06-14 03:06:23

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

rlees85 wrote:

This is what I would do, and I seriously take no responsibility if it doesn't work because I have not tested it!

Do not reboot inbetween these steps or your system seriously won't boot! Also I am making the assumption your using GRUB. If your not using GRUB do not proceed!

1: Edit your FSTAB - change your mount point for your EFI partition to /boot/efi (instead of /boot)

2: Unmount your EFI partition: umount /boot

3: Create the new mount point on your root partition: mkdir /boot/efi

4: Mount your EFI partition in the new location: mount -t vfat /dev/sda2 /boot/efi

5: Re-install your kernel: pacman -S linux

6: Re-generate ramdisk: mkinitcpio -p linux

7: Re-install grub (with correct parameters): grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck

8: Re-make grub config: grub-mkconfig -o /boot/grub/grub.cfg

9: Reboot with your fingers crossed!

Now this should put the kernel and ramdisk on your main root partition (as /boot is now on your main root partition). The only thing Arch will need on your EFI partition is a very tiny EFI executable. You can even delete old copies of your kernel/ramdisk that will be sat in /boot/efi/ (*.img and vmlinuz-linux)

I really don't think windows will load

Last edited by Buddlespit (2015-06-14 03:07:47)

Offline

#9 2015-06-15 17:37:28

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 96
Website

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

I dont see why not... It should not affect any of the Windows EFI files. The only way it would affect Windows is if OP is using the Windows bootloader. Which my post says, if your not using GRUB, do not proceed wink. I was in two minds to post that idea though, as I really can't see why it wouldn't work, I really have no means to test it.

Its really an "at your own risk" one...

Wondering if it has anything to do with OP not posting for a while.... haha wink

Offline

#10 2015-06-15 19:41:28

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

rlees85 wrote:

I dont see why not... It should not affect any of the Windows EFI files. The only way it would affect Windows is if OP is using the Windows bootloader. Which my post says, if your not using GRUB, do not proceed wink. I was in two minds to post that idea though, as I really can't see why it wouldn't work, I really have no means to test it.

Its really an "at your own risk" one...

Wondering if it has anything to do with OP not posting for a while.... haha wink

hehehe... That would be bad...

OK, Windows is a very finicky beast. It wants everything on one disk, and it wants everything on the first disk. If you move it's bootloader (bcd, I think) to a different drive, it's going to be looking for it's root partition on that same drive. I don't know how to make bcd look to a different drive or partition. I would imagine that there's a way to do it. Or, at the very least, I would hope there was a way.

Now, I have a test/beta version of Win10. I had to disconnect all of my other drives before Windows would install. Once installed, I tried expanding the EFI from 100MB to 400MB (all of the room I could scrape together), then I found that I couldn't 'repair' the fat32 drive because it was smaller than 512MB. So I currently have a 100MB file system sitting in a 400MB partition. So I tried moving EFI to a different drive/partition. Had enough space, but windows wouldn't load. Kept going into repair options. Had enough of dicking w/ windows and moved my EFI back to the 100/400MB partition, and edited my linux presets (two different kernels) to not make fallbacks.

Offline

#11 2015-06-15 21:41:09

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 96
Website

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

Yep I know... but the solution I posted doesn't change drive or partition, it just changes where that partition is mounted in Linux. It just means that on your FAT32 EFI partition you only have the EFI executable. Kernel & initramfs are on the main Linux partition...

I set my PC up this way. However I set it up this way from the start. Not sure how you'd go on having FAT32 EFI partition on /boot and then changing it later...

This is my system

Filesystem      Size  Used Avail Use% Mounted on
dev             7.8G     0  7.8G   0% /dev
run             7.8G  8.4M  7.8G   1% /run
/dev/sda2       196G   20G  167G  11% /
tmpfs           7.8G   24M  7.8G   1% /dev/shm
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs           7.8G   11M  7.8G   1% /tmp
/dev/sda1       253M  119K  252M   1% /boot/efi
/dev/sdb1       911G  161G  751G  18% /vm
/dev/sdb2       924G  313G  611G  34% /backup
tmpfs           1.6G  4.0K  1.6G   1% /run/user/620
tmpfs           1.6G   20K  1.6G   1% /run/user/1000

Notice /dev/sda1 (my EFI partition) has only 119k in use? smile

Offline

#12 2015-06-15 23:25:56

tomsargeaunt
Member
Registered: 2014-02-04
Posts: 24

Re: Enlarge EFI partition on arch/windows 8 dual boot machine

rlees85 wrote:

I dont see why not... It should not affect any of the Windows EFI files. The only way it would affect Windows is if OP is using the Windows bootloader. Which my post says, if your not using GRUB, do not proceed wink. I was in two minds to post that idea though, as I really can't see why it wouldn't work, I really have no means to test it.

Its really an "at your own risk" one...

Wondering if it has anything to do with OP not posting for a while.... haha wink

Haha no, my system lives on - but its a really interesting idea and it avoids actually messing around with partitioning, I'm just terrified of implementing it! I'm going to give it a try next weekend when I've got some time. Ill let you know how it goes wink What can possibly go wrong!? Worst case scenario, I can just put it all back to the way it is now with a live USB. So until then, I've just removed the fallback images.

Offline

Board footer

Powered by FluxBB