EVE-NG推广
查看: 29128|回复: 191

华为AR1000v镜像开启串口方法

回帖奖励 8630 EML币 回复本帖可获得 10 EML币奖励! 每人限 1 次

337

主题

829

回帖

312万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3125967

推广达人宣传达人突出贡献优秀版主论坛元老

QQ
原帖地址: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

grub.cfg

4.99 KB, 下载次数: 85

售价: 10 EML币  [记录]

不忘初心
回复

使用道具 举报

0

主题

63

回帖

3783

积分

金牌会员

Rank: 6Rank: 6

积分
3783
发表于 2020-2-10 10:06:28 | 显示全部楼层

回帖奖励 +10 EML币

活抓小蜜蜂。感谢你的分享
回复

使用道具 举报

0

主题

35

回帖

1729

积分

高级会员

Rank: 4

积分
1729
发表于 2020-2-10 16:32:59 | 显示全部楼层

回帖奖励 +10 EML币

顶一波
回复

使用道具 举报

2

主题

47

回帖

1898

积分

高级会员

Rank: 4

积分
1898
发表于 2020-2-13 16:35:49 | 显示全部楼层

回帖奖励 +10 EML币

这个厉害了
回复

使用道具 举报

0

主题

9

回帖

246

积分

初级会员

Rank: 2

积分
246
发表于 2020-2-16 16:16:12 | 显示全部楼层

回帖奖励 +10 EML币

虽然资源高了点 还是支持一下
回复

使用道具 举报

0

主题

17

回帖

286

积分

初级会员

Rank: 2

积分
286
发表于 2020-2-17 16:18:53 | 显示全部楼层

回帖奖励 +10 EML币

感谢分享
回复

使用道具 举报

0

主题

8

回帖

36

积分

新手上路

Rank: 1

积分
36
发表于 2020-2-20 20:17:16 | 显示全部楼层

回帖奖励 +10 EML币

非常谢谢!
回复

使用道具 举报

0

主题

27

回帖

87

积分

新手上路

Rank: 1

积分
87
发表于 2020-2-24 17:48:34 | 显示全部楼层

回帖奖励 +10 EML币

不错不错,学习一下
回复

使用道具 举报

0

主题

18

回帖

302

积分

初级会员

Rank: 2

积分
302
发表于 2020-2-25 14:34:04 | 显示全部楼层

回帖奖励 +10 EML币

非常感谢
回复

使用道具 举报

1

主题

39

回帖

1951

积分

高级会员

Rank: 4

积分
1951
发表于 2020-2-26 13:38:37 | 显示全部楼层

回帖奖励 +10 EML币

谢谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


Copyright   ©2015-2024  EmulatedLab  Powered by Discuz!©   ( 浙ICP备2021010423号-1 )
快速回复 返回列表 返回顶部