diff options
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-install-efi.sh')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi.sh | 15 |
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 | ||
9 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | 9 | PATH=/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 |
12 | boot_size=20 | 12 | boot_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 | ||
14 | if [ -e /run/media/$1/$2 ]; then | ||
15 | boot_size=$(( boot_size - $( du -ms /run/media/$1/$2 | awk '{print $1}') )) | ||
16 | fi | ||
17 | # remove initrd from size since its not currently installed | ||
18 | if [ -e /run/media/$1/initrd ]; then | ||
19 | boot_size=$(( boot_size - $( du -ms /run/media/$1/initrd | awk '{print $1}') )) | ||
20 | fi | ||
21 | # add 10M to provide some extra space for users and account | ||
22 | # for rounding in the above subtractions | ||
23 | boot_size=$(( boot_size + 10 )) | ||
13 | 24 | ||
14 | # 5% for swap | 25 | # 5% for swap |
15 | swap_ratio=5 | 26 | swap_ratio=5 |