Install Alpine on VMware Workstation: Difference between revisions

From Alpine Linux
m (Arrogance moved page Install Alpine on VMware to Install Alpine on VMware Workstation: VMware has multiple virtualization products, disambiguate.)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{merge|[[Installing Alpine on a virtual machine]]}}
There's at least 2 ways you can setup Alpine on a VMware box.
There's at least 2 ways you can setup Alpine on a VMware box.


== Option 1: sys mode, traditional hard-disk install (preferable for a dev box) ==
== Option 1: sys mode, traditional hard-disk install (preferable for a dev box) ==


# Create a virtual machine (linux, other 3.x kernel 64 bit)
# Create a virtual machine (Linux, other 3.x kernel 64 bit)
## add a hard drive, with the size depending on your work
## Add a hard drive with your desired size
## add a cdrom to the vm that points to the alpine iso you downloaded (alpine-virt x86_64)
## Add a CD/DVD to the VM that points to the Alpine ISO you downloaded
## disable `UEFI secure boot` in VM options
## Disable "UEFI secure boot" in Settings -> Advanced
# boot into the vm (username: root)
# Boot the VM and log in with username "root"
## run `setup-alpine`
## run <code>setup-alpine</code>
## choose `sys` when asked about the disk mode (this will permanently install Alpine on the disk)
## choose '''sys''' when asked about the disk mode ([[Installation#System_Disk_Mode|sys mode]] will install Alpine to the disk)
## choose the default disk mounted by VMware
## choose the default hard disk mounted by VMware
## reboot after the installation is complete
## reboot after the installation is complete


== Option 2: USB mode, no data preserved between reboots ==
== Option 2: USB mode, no data preserved between reboots ==


# Create a virtual machine (linux, other 3.x kernel 64 bit)
# Create a virtual machine (Linux, other 3.x kernel 64 bit)
## add a minimal hard drive, 100MB for saving configs, (like an usb stick)
## add a small hard drive, e.g. 100MB for saving configs (like an usb stick)
## add a cdrom to the vm that points to the alpine iso you downloaded (alpine-virt x86_64)
## Add a CD/DVD to the VM that points to the Alpine ISO you downloaded
# boot into the vm
# boot into the VM
# press f2 on boot to enter the BIOS  
# press F2 on boot to enter the BIOS  
## change the boot order so that it boots from cd, then hd, then floppy (or whatever - as long as cd is first)
## change the boot order so that it boots from CD, then HD, then floppy (or whatever - as long as CD is first)
# boot the machine
# boot the machine
# now run the following commands:
# now run the following commands:
## mkfs.vfat /dev/sda
## <code>mkfs.vfat /dev/sda</code>
## mount /dev/sda /media/usb (Or try: mount -t vfat /dev/sda /media/usb)
## <code>mount /dev/sda /media/usb</code> (Or try: <code>mount -t vfat /dev/sda /media/usb</code>)
## grep /dev/sda /proc/mounts >> /etc/fstab
## <code>grep /dev/sda /proc/mounts >> /etc/fstab</code>
## setup-alpine (select no disk, save configs to 'usb')
## <code>setup-alpine</code> (select no disk, save configs to 'usb')
## lbu ci usb
## <code>lbu ci usb</code>


If the VM hangs at the boot prompt, reboot the VM, and when the boot prompt appears again, type <tt>pax_nouderef</tt> (i.e. append it to the kernel options) and press Enter. This should allow normal boot-up. <br />
If the VM hangs at the boot prompt, reboot the VM, and when the boot prompt appears again, type <code>pax_nouderef</code> (i.e. append it to the kernel options) and press Enter. This should allow normal boot-up. <br />


Now you should be able to reboot and it should retain your settings because they were saved to your "usb"-disk.
Now you should be able to reboot and it should retain your settings because they were saved to your "usb-disk".


== VMware Tools ==
== VMware Tools ==
Line 38: Line 39:


For VMware Tools support you need to install the package [https://pkgs.alpinelinux.org/package/edge/community/x86_64/open-vm-tools open-vm-tools].
For VMware Tools support you need to install the package [https://pkgs.alpinelinux.org/package/edge/community/x86_64/open-vm-tools open-vm-tools].


[[Category:Virtualization]]
[[Category:Virtualization]]

Latest revision as of 08:20, 30 May 2023

This material is proposed for merging ...

It should be merged with [[Installing Alpine on a virtual machine]]. (Discuss)

There's at least 2 ways you can setup Alpine on a VMware box.

Option 1: sys mode, traditional hard-disk install (preferable for a dev box)

  1. Create a virtual machine (Linux, other 3.x kernel 64 bit)
    1. Add a hard drive with your desired size
    2. Add a CD/DVD to the VM that points to the Alpine ISO you downloaded
    3. Disable "UEFI secure boot" in Settings -> Advanced
  2. Boot the VM and log in with username "root"
    1. run setup-alpine
    2. choose sys when asked about the disk mode (sys mode will install Alpine to the disk)
    3. choose the default hard disk mounted by VMware
    4. reboot after the installation is complete

Option 2: USB mode, no data preserved between reboots

  1. Create a virtual machine (Linux, other 3.x kernel 64 bit)
    1. add a small hard drive, e.g. 100MB for saving configs (like an usb stick)
    2. Add a CD/DVD to the VM that points to the Alpine ISO you downloaded
  2. boot into the VM
  3. press F2 on boot to enter the BIOS
    1. change the boot order so that it boots from CD, then HD, then floppy (or whatever - as long as CD is first)
  4. boot the machine
  5. now run the following commands:
    1. mkfs.vfat /dev/sda
    2. mount /dev/sda /media/usb (Or try: mount -t vfat /dev/sda /media/usb)
    3. grep /dev/sda /proc/mounts >> /etc/fstab
    4. setup-alpine (select no disk, save configs to 'usb')
    5. lbu ci usb

If the VM hangs at the boot prompt, reboot the VM, and when the boot prompt appears again, type pax_nouderef (i.e. append it to the kernel options) and press Enter. This should allow normal boot-up.

Now you should be able to reboot and it should retain your settings because they were saved to your "usb-disk".

VMware Tools

More info on this page: Open-vm-tools

For VMware Tools support you need to install the package open-vm-tools.