================================================
***VM Machine Configuration Using Virtual Box***
================================================
General
Version Ubuntu (64 bit)
System
Memory 384MG
Chipset: PIIX3
Extended Features: Enable I/O APIC + Hardware Clock in UTC Time
Processor
Extended Features: Enable PAE/NX
Acceleration
Paravirtualization Interface: KVM
Hardware virtualization: Enable Nested Paging
Storage
Hard Drive Storage Type: virtio-scsi
Network
Adapter Type: Paravirtualized Network (virtio-net)
Port forwarding
Name Protocol Host IP Host Port Guest IP Guest Port
SSH TCP 127.0.0.1 2222 VM IP 22
http TCP 127.0.0.1 8080 VM IP 80
===============================
***Alpine Linux Installation***
===============================
1. Boot from a Alpine Linux Virtual Machine Optimized Image: alpine-virt-3.12.0-
x86_64.iso
2. type root and enter as a password
3. Change the following Environment variables
export BOOTLOADER=grub
export ROOTFS=xfs # optional, but I recommend it
export DISKOPTS='-L -s 512 -m sys /dev/sda'
-L Use LVM
-s 512 Create only 512m of swap
-m sys Use the disk as the system disk.
/dev/sda the disk to target.
4. setup-alpine
proxy: none
ntp client: none
mirror number: 1
SSH Server: openssh
Interface: eth0
DHCP: yes
5. reboot
6. grub configuration
Edit /etc/default/grub
vi /etc/default/grub
add the following lines
GRUB_DISTRIBUTOR="Alpine"
GRUB_TIMEOUT=2
GRUB_DISABLE_SUBMENU=y
GRUB_DISABLE_RECOVERY=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --word=8 --parity=no --speed 38400 --stop=1"
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,38400n8d modules=sd-mod,usb-storage,xfs
quiet rootfstype=xfs"
save the changes. wq!
update grub
grub-mkconfig -o /boot/grub/grub.cfg
7. Getty Configuration
Getty Configuration
edit /etc/inittab and make it look something like this
ttyS0::respawn:/sbin/getty -L ttyS0 38400 vt100
8.
poweroff
umount -R /mnt