lost and found ( for me ? )

Showing posts with label Ubuntu 11.04 Server. Show all posts
Showing posts with label Ubuntu 11.04 Server. Show all posts

KVM : how to connect BackTrack Linux 5 VM via virsh console

host OS : ubuntu 11.04
BT5 has been installed as VM on ubuntu 11.04 KVM

1. make ttyS0.conf file
root@bt:~# cat /etc/init/ttyS0.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

root@bt:~# start ttyS0


2. edit grub.cfg

By default , grub.cfg is read-only , so give grub.cfg writable permissions.
root@bt:/boot/grub# ls -lh grub.cfg
-r--r--r-- 1 root root 3.4K 2011-05-20 17:18 grub.cfg

root@bt:/boot/grub# chmod 622 /boot/grub/grub.cfg

root@bt:/boot/grub# ls -lh grub.cfg
-rw--w--w- 1 root root 3.4K 2011-05-20 17:18 grub.cfg
edit grub.cfg ( add red line )
root@bt:/boot/grub# egrep console grub.cfg
       linux   /boot/vmlinuz-2.6.38 root=UUID=2ecef416-17e4-453d-a69b-7db7e3bcb5e1 ro   text splash nomodeset vga=791 console=ttyS0,115200n8

Reboot BT. you will be able to connect BT w/ virsh console like this.
virsh # list --all
Id 名前               状態
----------------------------------
 1 BT5                  実行中
 - SL6-vm1              シャットオフ
 - SL6-vm2              シャットオフ

virsh # console 1
Connected to domain BT5
エスケープ文字は  ^] です

BackTrack 5 - Code Name Revolution 32 bitbt ttyS0
bt login: root
Password:
Last login: Mon May 23 17:38:05 JST 2011 on tty1
Linux bt 2.6.38 #1 SMP Thu Mar 17 20:52:18 EDT 2011 i686 GNU/Linux

###################################################################
[*] Welcome to the BackTrack 5 Distribution, Codename "Revolution"

[*] Official BackTrack Home Page: http://www.backtrack-linux.org

[*] Official BackTrack Training : http://www.offensive-security.com
###################################################################

[*] To start a graphical interface, type "startx".
[*] The default root password is "toor".

root@bt:~#

Ubuntu 11.04 Server KVM : How to install BackTrack Linux 5 on KVM


# kvm --version
QEMU emulator version 0.14.0 (qemu-kvm-0.14.0), Copyright (c) 2003-2008 Fabrice Bellard

# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 11.04"

# uname -r
2.6.38-8-server


1. create a new VM w/ virt-manager


2. BT5 ( BackTrack Linux 5 ) is based on ubuntu 10.04 LTS.


3. boot as Live CD n’ launch GUI

To install BT to your HDD , at first you need to boot BT as live CD n’ then install BT to your HDD.

boot BT as live CD.

4. install BT to your HDD

after booting , start X11 ( just type startx )
You will see “install BackTrack” icon , so click “Install BackTrack” icon.


just follow instructions. ( it’s very easy )



get installation done.


reboot BT. BT will boot via HDD.
If BT boot as Live CD , plz check boot options of BT VM.


default login account is:
user : root
credentials : toor