How to install Oracle Linux in kvm without a need to X server
Hi,
I managed to install Oracle Linux on kvm guest without a need to X console (no GUI, vnc or X11)
1. We can see the PXE menu
2. We can select image to install
3. We need to add console=ttyS0 to the PXE (cobbler is supporting this feature the same way as grub enable you to add parameter to the boot)
Disclaimer:
I tested this on Oracle Linux 7.5 using libvirt 1.5
# virt-install --hvm --connect qemu:///system --network=bridge:virbr0 --pxe --graphics none --name Oracle_Linux_7.4-x86_64 --ram=756 --vcpus=1 --os-type=linux --os-variant=rhel7 --disk path=/tmp/rhel7-machine.img,size=5 --console pty,target_type=serial --boot 'menu=on,useserial=on'
Starting install...
Allocating 'rhel7-machine.img' | 5.0 GB 00:00:00
Connected to domain Oracle_Linux_7.4-x86_64
Escape character is ^]
Google, Inc.
Serial Graphics Adapter 04/30/14
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@) Wed Apr 30 12:14:33 UTC 2014
Term: 80x24
4 0
SeaBIOS (version 1.11.0-2.el7)
Machine UUID 705ffc3b-a5ee-41e3-b380-2c0407f74bc2
iPXE (http://ipxe.org) 00:03.0 C100 PCI2.10 PnP PMM+2F394490+2F2F4490 C100
Press ESC for boot menu.
Booting from ROM...
iPXE (PCI 00:03.0) starting execution...ok
iPXE initialising devices...ok
iPXE 1.0.0+ (4e85b27) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP iSCSI TFTP AoE ELF MBOOT PXE bzImage Menu PXEXT
net0: 52:54:00:dd:23:6f using virtio-net on 0000:00:03.0 (open)
[Link:up, TX:0 TXE:0 RX:0 RXE:0]
Configuring (net0 52:54:00:dd:23:6f)............................... ok
net0: 10.20.2.14/255.255.255.0 gw 10.20.2.254
Next server: 192.168.1.47
Filename: pxelinux.0
tftp://192.168.1.47/pxelinux.0... ok
pxelinux.0 : 16794 bytes [PXE-NBP]
PXELINUX 3.86 2010-04-01 Copyright (C) 1994-2010 H. Peter Anvin et al
!PXE entry point found (we hope) at 9C2C:0160 via plan A
UNDI code segment at 9C2C len 0802
UNDI data segment at 9CB0 len 2CE0
Getting cached packet 01 02 03
My IP address seems to be 0A14020E 10.20.2.14
ip=10.20.2.14:192.168.1.47:10.20.2.254:255.255.255.0
TFTP prefix:
Trying to load: pxelinux.cfg/3bfc5f70-eea5-e341-b380-2c0407f74bc2
Trying to load: pxelinux.cfg/01-52-54-00-dd-23-6f
Trying to load: pxelinux.cfg/0A14020E
Trying to load: pxelinux.cfg/0A14020
Trying to load: pxelinux.cfg/0A1402
Trying to load: pxelinux.cfg/0A140
Trying to load: pxelinux.cfg/0A14
Trying to load: pxelinux.cfg/0A1
Trying to load: pxelinux.cfg/0A
Trying to load: pxelinux.cfg/0
Trying to load: pxelinux.cfg/default
PRESS Tab and add console=ttyS0 at the end
> /images/Oracle_Linux_7.4-x86_64/vmlinuz initrd=/images/Oracle_Linux_7.4-x86_64
/initrd.img ksdevice=bootif lang= kssendmac text ks=http://192.168.1.47/cblr/s
vc/op/ks/profile/Oracle_Linux_7.4-x86_64 BOOTIF=01-52-54-00-56-f5-ff console=tty
S0
Automatic boot in 19 seconds...
Loading /images/Oracle_Linux_6.9-x86_64/vmlinuz.................................
..................................
Loading /images/Oracle_Linux_6.9-x86_64/initrd.img..............................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
..................................................ready.
Probing EDD (edd=off to disable)... ok
.
.
.
[ OK ] Reached target Network is Online.
Starting Notify NFS peers of a restart...
Starting OpenSSH server daemon...
Starting Postfix Mail Transport Agent...
Starting Logout off all iSCSI sessions on shutdown...
[ OK ] Started Notify NFS peers of a restart.
[ OK ] Started Logout off all iSCSI sessions on shutdown.
[ OK ] Started OpenSSH server daemon.
Starting Availability of block devices...
[ OK ] Started Availability of block devices.
[ OK ] Started Dynamic System Tuning Daemon.
[ OK ] Started Postfix Mail Transport Agent.
[ OK ] Started GSSAPI Proxy Daemon.
[ OK ] Reached target NFS client services.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Remote File Systems.
Starting Permit User Sessions...
Starting LSB: Starts the Spacewalk Daemon...
Starting Crash recovery kernel arming...
[ OK ] Started Permit User Sessions.
Starting Terminate Plymouth Boot Screen...
[ OK ] Started Command Scheduler.
Starting Command Scheduler...
[ OK ] Started Job spooling tools.
Starting Job spooling tools...
Starting Wait for Plymouth Boot Screen to Quit...
Oracle Linux Server 7.4
Kernel 4.1.12-94.3.9.el7uek.x86_64 on an x86_64
localhost login:
Comments
Post a Comment