bootable/newinstaller
Revision | fdf9c73ada1be76e0cec40621f4656da33471373 (tree) |
---|---|
Time | 2015-01-08 17:08:03 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
1-install: support formatting ext4 partition
Note our legacy grub can't support booting from an ext4 partition.
You need to install a bootloader supporting ext4 manually.
@@ -93,9 +93,13 @@ progress_bar() | ||
93 | 93 | format_fs() |
94 | 94 | { |
95 | 95 | local cmd |
96 | - echo -e '"Do not format" ""\next3 ""\next2 ""\nntfs ""\nfat32 ""' > $menufile | |
96 | + echo -e '"Do not format" ""\next4 ""\next3 ""\next2 ""\nntfs ""\nfat32 ""' > $menufile | |
97 | 97 | choose "Choose filesystem" "Please select a filesystem to format $1:" |
98 | 98 | case "$choice" in |
99 | + ext4) | |
100 | + dialog --title " Notice " --msgbox "\nAndroid-x86 bootloader can't support booting from ext4. You need to install a bootloader supporting ext4 manually, e.g., grub2." 9 49 | |
101 | + cmd="make_ext4fs -L" | |
102 | + ;; | |
99 | 103 | ext3) |
100 | 104 | cmd="mke2fs -jL" |
101 | 105 | ;; |
@@ -183,7 +187,7 @@ create_data_img() | ||
183 | 187 | if [ $? -eq 0 ]; then |
184 | 188 | if create_img 512 data.img; then |
185 | 189 | losetup /dev/loop6 data.img |
186 | - mke2fs -jL /data /dev/loop6 > /dev/tty6 | |
190 | + make_ext4fs -L /data /dev/loop6 > /dev/tty6 | |
187 | 191 | fi |
188 | 192 | [ $? -ne 0 ] && dialog --msgbox "\n Failed to create data.img." 7 33 |
189 | 193 | else |
@@ -226,7 +230,7 @@ install_to() | ||
226 | 230 | fs=`cat /proc/mounts | grep /dev/$1 | awk '{ print $3 }'` |
227 | 231 | |
228 | 232 | asrc=android-$VER |
229 | - dialog --title " Confirm " --no-label Skip --defaultno --yesno \ | |
233 | + [ "$fs" != "ext4" ] && dialog --title " Confirm " --no-label Skip --defaultno --yesno \ | |
230 | 234 | "\n Do you want to install boot loader GRUB?" 7 47 |
231 | 235 | if [ $? -eq 0 ]; then |
232 | 236 | cp -af /grub /hd |