diff options
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index b1600030f5..f84a5eb83b 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh | |||
@@ -168,17 +168,16 @@ umount /src_root | |||
168 | # Handling of the target boot partition | 168 | # Handling of the target boot partition |
169 | mount $bootfs /boot | 169 | mount $bootfs /boot |
170 | echo "Preparing boot partition..." | 170 | echo "Preparing boot partition..." |
171 | if [ -f /etc/grub.d/40_custom ] ; then | 171 | if [ -f /etc/grub.d/00_header ] ; then |
172 | echo "Preparing custom grub2 menu..." | 172 | echo "Preparing custom grub2 menu..." |
173 | GRUBCFG="/boot/grub/grub.cfg" | 173 | GRUBCFG="/boot/grub/grub.cfg" |
174 | mkdir -p $(dirname $GRUBCFG) | 174 | mkdir -p $(dirname $GRUBCFG) |
175 | cp /etc/grub.d/40_custom $GRUBCFG | 175 | cat >$GRUBCFG <<_EOF |
176 | sed -i "s@__ROOTFS__@$rootfs $rootwait@g" $GRUBCFG | 176 | menuentry "Linux" { |
177 | sed -i "s/__VIDEO_MODE__/$3/g" $GRUBCFG | 177 | set root=(hd0,1) |
178 | sed -i "s/__VGA_MODE__/$4/g" $GRUBCFG | 178 | linux /vmlinuz root=$rootfs $rootwait rw $5 $3 $4 quiet |
179 | sed -i "s/__CONSOLE__/$5/g" $GRUBCFG | 179 | } |
180 | sed -i "/#/d" $GRUBCFG | 180 | _EOF |
181 | sed -i "/exec tail/d" $GRUBCFG | ||
182 | chmod 0444 $GRUBCFG | 181 | chmod 0444 $GRUBCFG |
183 | fi | 182 | fi |
184 | grub-install /dev/${device} | 183 | grub-install /dev/${device} |