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