summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x1_makerootfs.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/1_makerootfs.sh b/1_makerootfs.sh
index 84ec475..94157c8 100755
--- a/1_makerootfs.sh
+++ b/1_makerootfs.sh
@@ -152,7 +152,13 @@ if [ -n "$grubdev_host" ]; then
# Prepare GRUB install
mkdir -p "$targettemp/boot/grub"
mkgrubdevmap "$usbdev_target" > "$targettemp/boot/grub/device.map"
- cp -af "$targettemp/lib/grub/i386-pc/"* "$targettemp/boot/grub"
+ # Recent GRUB packages store libraries below /usr/lib
+ if [ -d "$targettemp/lib/grub/i386-pc/" ]; then
+ grublibs="/lib/grub/i386-pc"
+ else
+ grublibs="/usr/lib/grub/i386-pc"
+ fi
+ cp -af "$targettemp/$grublibs/"* "$targettemp/boot/grub"
# FIXME: Invent a hook wrapping both this and other bootloaders
preserveandaddlines "$targettemp/etc/kernel-img.conf" orig 1 "postinst_hook = /sbin/update-grub" "postrm_hook = /sbin/update-grub"
# preserveandaddlines "$targettemp/boot/grub/menu.lst" orig 1 "default 0" "timeout 5" "color cyan/blue white/blue"