On Mon, Nov 30, 2020 at 5:35 PM Yasuhiro KIMURA <y...@utahime.org> wrote:

> I made clean install of 11.4-RELEASE amd64 with ZFS root and UEFI boot
> mode. 'Auto (ZFS)' was used at disk setup phase and disk was
> partitioned as following.
>
> ----------------------------------------------------------------------
> root@rolling-vm-freebsd3[80]# uname -a
> FreeBSD rolling-vm-freebsd3.home.utahime.org 11.4-RELEASE-p3 FreeBSD
> 11.4-RELEASE-p3 #0: Tue Sep  1 08:22:33 UTC 2020
>  r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
> root@rolling-vm-freebsd3[81]# gpart show ada0
> =>       40  209715120  ada0  GPT  (100G)
>          40     409600     1  efi  (200M)
>      409640       2008        - free -  (1.0M)
>      411648   16777216     2  freebsd-swap  (8.0G)
>    17188864  192524288     3  freebsd-zfs  (92G)
>   209713152       2008        - free -  (1.0M)
> ----------------------------------------------------------------------
>
> According to it the size of EFI system partition is 200MB. But if I
> mount it to filesystem and check its size with df(1), then it is much
> smaller than 200MB.
>
> ----------------------------------------------------------------------
> root@rolling-vm-freebsd3[82]# mount -t msdosfs /dev/ada0p1 /mnt
> root@rolling-vm-freebsd3[83]# df -k /mnt
> Filesystem  1024-blocks Used Avail Capacity  Mounted on
> /dev/ada0p1         779  384   395    49%    /mnt
> ----------------------------------------------------------------------
>
> And if I try to copy large file to /mnt then it fails.
>
> ----------------------------------------------------------------------
> root@rolling-vm-freebsd3[94]# ls -l dummy.1MB.date
> -rw-r--r--  1 root  wheel  1048576 Nov 29 10:39 dummy.1MB.date
> root@rolling-vm-freebsd3[95]# cp dummy.1MB.date /mnt
> cp: /mnt/dummy.1MB.date: No space left on device
> ----------------------------------------------------------------------
>
> So it seems kernel(?) really regards the size of mounted EFI system
> part as only 779KB.
>
> I also tried it with 12.2-RELEASE and df(1) reported correctly.
>
> ----------------------------------------------------------------------
> root@eastasia[1002]# uname -a
> FreeBSD eastasia.home.utahime.org 12.2-RELEASE FreeBSD 12.2-RELEASE
> r366954 GENERIC  amd64
> root@eastasia[1003]# gpart show ada0
> =>        40  1953525088  ada0  GPT  (932G)
>           40      409600     1  efi  (200M)
>       409640        2008        - free -  (1.0M)
>       411648    16777216     2  freebsd-swap  (8.0G)
>     17188864  1936334848     3  freebsd-zfs  (923G)
>   1953523712        1416        - free -  (708K)
>
> root@eastasia[1004]# mount -t msdosfs /dev/ada0p1 /mnt
> root@eastasia[1005]# df -k /mnt
> Filesystem  1024-blocks Used  Avail Capacity  Mounted on
> /dev/ada0p1      204696  976 203720     0%    /mnt
> ----------------------------------------------------------------------
>
> Is there any bug fix about it that is merged to 12.x but not 11.x?
>

11.x puts a pre-canned image into the ESP that's tiny, regardless of the
size, while 12.x does a newfs_msdos and sizes it properly. It's kinda hard
to fix in 11.x since there's a number of changes in a number of places.

You can, though, on 11.x, newfs_msdos the filesystem and copy boot1.efi
from FreeBSD's /boot to the ESP's \efi\boot\bootx64.efi if you need more
space on the ESP for some reason.

Warner
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to