Revision 9404f8cd
b/example/instance-image.d/grub | ||
---|---|---|
81 | 81 |
# Grub 0.x |
82 | 82 |
sed -ie 's/^default.*/default 0\n\nserial --unit=0\nterminal --timeout=3 console serial/' \ |
83 | 83 |
${boot_dir}/menu.lst |
84 |
elif [ -e "${boot_dir}/grub.cfg" ] ; then |
|
84 |
sed -ie 's/\(.*kernel.*\)/\1 console=ttyS0,115200n8/g' \ |
|
85 |
${boot_dir}/menu.lst |
|
86 |
elif [ -e "${boot_dir}/grub.cfg" -a -e "${target}/etc/default/grub" ] ; then |
|
85 | 87 |
# Grub 2.x |
86 |
sed -ie 's/.*GRUB_TERMINAL.*/GRUB_TERMINAL=serial/' ${boot_dir}/grub.cfg |
|
88 |
sed -ie 's/.*GRUB_TERMINAL.*/GRUB_TERMINAL=serial/' ${target}/etc/default/grub |
|
89 |
sed -ie 's/.*GRUB_CMDLINE_LINUX.*/GRUB_CMDLINE_LINUX=\"console=ttyS0,115200n8\"/' \ |
|
90 |
${target}/etc/default/grub |
|
87 | 91 |
echo "GRUB_SERIAL_COMMAND=\"serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1\"" \ |
88 |
>> ${boot_dir}/grub.cfg |
|
92 |
>> ${target}/etc/default/grub |
|
93 |
chroot ${target} /usr/sbin/update-grub |
|
89 | 94 |
else |
90 | 95 |
echo "No grub bootloader found, skipping..." |
91 | 96 |
fi |
Also available in: Unified diff