I've been using execscript, like this:
target=$1
(printf "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\nterminal --dumb serial\n\n"; cat $target/boot/grub/menu.lst) > $target/tmp/menu.lst && mv $target/tmp/menu.lst $target/boot/grub/menu.lst
chroot $target sed -i -e '/^# kopt=/s/^\(.*\)$/\1 console=ttyS0,115200n8/; /^# defoptions=/s/=.*$/=/' \ /boot/grub/menu.lst chroot $target update-grub
I've been using execscript, like this:
target=$1
(printf "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\nterminal --dumb serial\n\n"; cat $target/ boot/grub/ menu.lst) > $target/ tmp/menu. lst && mv $target/ tmp/menu. lst $target/ boot/grub/ menu.lst
chroot $target sed -i -e '/^# kopt=/s/^\(.*\)$/\1 console= ttyS0,115200n8/ ; /^# defoptions= /s/=.*$ /=/' \ grub/menu. lst
/boot/
chroot $target update-grub