Giter Club home page Giter Club logo

alpine-linux-on-termux's Introduction

Install Alpine Linux on Termux using QEMU

For this case, we will install ** Alpine Linux architecture x86_64 in the Virtual version **. Download the latest version of the virtual ISO from the Alpine Linux website. Go to the official website https://alpinelinux.org/downloads/

This was only tested on Xiaomi Redmi Note 8.

Note: You can run the script install-alpine.sh to skip most commands. Just remember you must have git installed to do git clone to the repository

Steps before installing Alpine Linux:

TERMUX

pkg update -y
pkg upgrade -y
pkg install wget -y

QEMU - Alpine Linux

  • Install QEMU and download Virtual ISO Alpine Linux

pkg install qemu-system-x86-64-headless qemu-utils -y
cd $HOME
mkdir alpine-linux
cd alpine-linux/
wget <VIRTUAL_ISO_URL>
wget https://dl-cdn.alpinelinux.org/alpine/v3.14/releases/x86_64/alpine-virt-3.14.0-x86_64.iso

Install Alpine Linux using Qemu

  • Create the Virtual Machine

qemu-img create -f qcow2 alpine.qcow2 15G
qemu-system-x86_64 -smp 2 -m 2048 \
  -drive file=alpine.qcow2,if=virtio \
  -netdev user,id=n1,hostfwd=tcp::2222-:22 \
  -device virtio-net,netdev=n1 \
  -cdrom <VIRTUAL_ISO_NAME.iso> -boot d \
  -nographic
qemu-system-x86_64 -smp 2 -m 2048 \
  -drive file=alpine.qcow2,if=virtio \
  -netdev user,id=n1,hostfwd=tcp::2222-:22 \
  -device virtio-net,netdev=n1 \
  -cdrom alpine-virt-3.14.0-x86_64.iso -boot d \
  -nographic
  • This install the non-graphical version, this means that we will only use the terminal
  • Log in as root (no password) and run:

setup-alpine

Follow the setup-alpine installation steps. Use poweroff to shut down the machine.

  • Booting the Virtual Machine

After the installation QEMU can be started from disk image (-boot c) without CDROM.

qemu-system-x86_64 -smp 2 -m 2048 \
  -drive file=alpine.qcow2,if=virtio \
  -netdev user,id=n1,hostfwd=tcp::2222-:22 \
  -device virtio-net,netdev=n1 \
  -nographic

For more information about the commands seen here, visit https://wiki.alpinelinux.org/wiki/Qemu

Qemu commands based on https://youtu.be/RL96VSKzAQo

alpine-linux-on-termux's People

Contributors

eapolinariov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

alpine-linux-on-termux's Issues

ERROR: unable to select packages: sfdisk (no such package)

Hi!
After "setup-alpine"
...
How would you like to use it? ('sys', 'data', 'lvm' or '?' for help) [?] sys
ERROR: unable to select packages:
sfdisk (no such package):
required by: world[sfdisk]
syslinux (no such package):
required by: world[syslinux]

Note:

If networking does not work, edit /etc/resolv.conf and replace the contents with
nameserver 8.8.8.8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.