summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/files/init-install-efi.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-install-efi.sh')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 43b75b0175..82b0aa819e 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -8,8 +8,19 @@
8 8
9PATH=/sbin:/bin:/usr/sbin:/usr/bin 9PATH=/sbin:/bin:/usr/sbin:/usr/bin
10 10
11# We need 20 Mb for the boot partition 11# figure out how big of a boot partition we need
12boot_size=20 12boot_size=$(du -ms /run/media/$1/ | awk '{print $1}')
13# remove rootfs.img ($2) from the size if it exists, as its not installed to /boot
14if [ -e /run/media/$1/$2 ]; then
15 boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') ))
16fi
17# remove initrd from size since its not currently installed
18if [ -e /run/media/$1/initrd ]; then
19 boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') ))
20fi
21# add 10M to provide some extra space for users and account
22# for rounding in the above subtractions
23boot_size=$(( boot_size + 10 ))
13 24
14# 5% for swap 25# 5% for swap
15swap_ratio=5 26swap_ratio=5