diff options
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-testfs.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh index 26e1fb3dd2..116a6b7b58 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh | |||
@@ -167,18 +167,16 @@ umount /src_root | |||
167 | # Handling of the target boot partition | 167 | # Handling of the target boot partition |
168 | mount $bootfs /boot | 168 | mount $bootfs /boot |
169 | echo "Preparing boot partition..." | 169 | echo "Preparing boot partition..." |
170 | if [ -f /etc/grub.d/40_custom ] ; then | 170 | if [ -f /etc/grub.d/00_header ] ; then |
171 | echo "Preparing custom grub2 menu..." | 171 | echo "Preparing custom grub2 menu..." |
172 | GRUBCFG="/boot/grub/grub.cfg" | 172 | GRUBCFG="/boot/grub/grub.cfg" |
173 | mkdir -p $(dirname $GRUBCFG) | 173 | mkdir -p $(dirname $GRUBCFG) |
174 | cp /etc/grub.d/40_custom $GRUBCFG | 174 | cat >$GRUBCFG <<_EOF |
175 | sed -i "s@__ROOTFS__@$rootfs $rootwait@g" $GRUBCFG | 175 | menuentry "Linux" { |
176 | sed -i "s/__VIDEO_MODE__/$3/g" $GRUBCFG | 176 | set root=(hd0,1) |
177 | sed -i "s/__VGA_MODE__/$4/g" $GRUBCFG | 177 | linux /vmlinuz root=$rootfs $rootwait rw $5 $3 $4 quiet |
178 | sed -i "s/__CONSOLE__/$5/g" $GRUBCFG | 178 | } |
179 | sed -i "/#/d" $GRUBCFG | 179 | _EOF |
180 | sed -i "/exec tail/d" $GRUBCFG | ||
181 | |||
182 | # Add the test label | 180 | # Add the test label |
183 | echo -ne "\nmenuentry 'test' {\nlinux /test-kernel root=$testfs rw $rootwait quiet\n}\n" >> $GRUBCFG | 181 | echo -ne "\nmenuentry 'test' {\nlinux /test-kernel root=$testfs rw $rootwait quiet\n}\n" >> $GRUBCFG |
184 | 182 | ||