|
原帖地址:https://certcollection.org/forum/topic/308980-huawei-ar-1000v/page__st__14#entry1317742
The way to enable telnet for AR1000v is below
Copy the qcow2 file for huawei in /tmp in eve-ng vm
Then we will mount this qcow2 file in eve-ng and edit the boot file grub.cfg -
1 . modprobe nbd
2. qemu-nbd -c /dev/nbd0 /tmp/hda.qcow2
3. mount /tmp/guest /dev/nbd0
4. mount /dev/nbd0p1 /tmp/guest/
5. Make a backup of existing file - cp /tmp/guest/grub/grub.cfg /tmp/guest/grub/grub.cfg.bak
6. edit the boot file for qcow2 image to virtual serial interface -
nano /tmp/guest/grub/grub.cfg
comment these three lines
#serial --unit=0 --speed 115200
#terminal_input console serial
#terminal_output console serial
Add instead these 3 lines -
serial --unit=0 --speed=9600
terminal_output --append serial
terminal_input serial console
Then append console=tty0 console=ttyS0,9600 for menuentry below -
menuentry 'Wind River Linux GNU/Linux' --class wind --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b26a0881-dd8$
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1$
else
search --no-floppy --fs-uuid --set=root 89e22363-cbf1-41cc-8d6b-e9b4e932695f
fi
echo 'Loading Linux 3.10.62-ltsi-WR6.0.0.12_standard ...'
linux /boot_A/bzImage root=/dev/vda2 ro isolcpus=1 systemd.show_status=no console=tty0 console=ttyS0,9600
initrd /boot_A/rootfs.gz
}
7.Unmount - umount /tmp/guest
8. Disconnect the qcow device - qemu-nbd -d /dev/nbd0
9. Now our qcow file is svaed with edited grub.cfg file.
10. copy the file qcow file to proper location and create a node in eve-ng and select console type telnet instead of VNC.
I am attaching my grub.cfg file for reference.
You can also google for qemu-nbd to understand how it works
|
|