Installing Alpine: Difference between revisions

From Alpine Linux
(→‎Initial setup: mention LBU_MEDIA in lbu.conf)
Line 10: Line 10:
Alpine is shipped in compressed tar.gz archives for USB.
Alpine is shipped in compressed tar.gz archives for USB.


==== From windows ====
==== Make USB-stick bootable ====
* Download a alpine-x.x.x-yyyyyy.tar.gz package.
===== From windows =====
* Unpack all the files to your usb drive using a unpacker like [http://www.7-zip.org 7-zip].
* Download the [http://dl.alpinelinux.org/alpine/v1.6/usbdrive/syslinux.exe syslinux.exe] utility.
* Download the [http://dl.alpinelinux.org/alpine/v1.6/usbdrive/syslinux.exe syslinux.exe] utility.
* Start a command prompt (Start->run, type ''cmd'' and press >enter>)
* Start a command prompt (Start->run, type ''cmd'' and press >enter>)
* Run syslinux with your USB drive as parameter. If your USB drive is E:, then you type:
* Run syslinux with your USB drive as parameter. If your USB drive is E:, then you type:
  syslinux E:
  syslinux E:
* Flag the pertition bootable
fdisk E:
(Make the partition bootable somehow :-)


USB drive os ready for booting.
===== From Linux =====
* install syslinux (I.E ''sudo apt-get syslinux'' or ''emerge apt-get syslinux'')
* Copy MBR to the USB drive (assuming your USB drive is /dev/sda)
  dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
* Run syslinux with your USB drive as parameter.
  sudo syslinux /dev/sda1
* Flag the pertition bootable
fdisk /dev/sda
  a (Toggle's the bootable flag)
  1 (The partition you want to have the flag)
  w (Writing your changes to the disk)


==== From Linux ====
==== Unpack Alpine to USB drive ====
* Download a alpine-x.x.x-yyyyyy.tar.gz package.
* Download a alpine-x.x.x-yyyyyy.tar.gz package.
* Unpack all the files to your usb drive.
* Unpack all the files to your usb drive using a unpacker like [http://www.7-zip.org 7-zip].
* install syslinux (I.E ''sudo apt-get syslinux'' or ''emerge apt-get syslinux'')
* Run syslinux with your USB drive as parameter. If your USB drive is /dev/sda1, then you type:
  sudo syslinux /dev/sda1


== Initial setup ==
== Initial setup ==

Revision as of 08:02, 4 July 2008

vivividomc There are currently two supported ways of running Alpine, from CDROM or from USB stick.

Preparing the media

CDROM

Download the latest iso image from the download area and burn it.

USB

Alpine is shipped in compressed tar.gz archives for USB.

Make USB-stick bootable

From windows
  • Download the syslinux.exe utility.
  • Start a command prompt (Start->run, type cmd and press >enter>)
  • Run syslinux with your USB drive as parameter. If your USB drive is E:, then you type:
syslinux E:
  • Flag the pertition bootable
fdisk E:

(Make the partition bootable somehow :-)

From Linux
  • install syslinux (I.E sudo apt-get syslinux or emerge apt-get syslinux)
  • Copy MBR to the USB drive (assuming your USB drive is /dev/sda)
 dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
  • Run syslinux with your USB drive as parameter.
 sudo syslinux /dev/sda1
  • Flag the pertition bootable
fdisk /dev/sda
 a (Toggle's the bootable flag)
 1 (The partition you want to have the flag)
 w (Writing your changes to the disk)

Unpack Alpine to USB drive

  • Download a alpine-x.x.x-yyyyyy.tar.gz package.
  • Unpack all the files to your usb drive using a unpacker like 7-zip.

Initial setup

After booting up you will see a login prompt. Log in as root.

To do the basic initial configuration run:

 setup-alpine


There you will set the hostname, configure the network and set the root password.

Add the following line to your /etc/lbu/lbu.conf file:

 LBU_MEDIA=usb

If you want to store the configureation on floppy you set LBU_MEDIA=floppy instead.

To save the configuration for next reboot run:

 lbu commit


Managing software packages

To list all the packages that are available in repository, run:

 apk_fetch -l
 apk_fetch -v -l


To install a package run:

 apk_add <PACKAGE>

To remove the package run:

 apk_delete <PACKAGE>

To also remove the dependencies togehter with the package, run:

 apk_delete -R <PACKAGE>

To list all installed packages run:

 apk_info

Managing boot services

To start a service during boot run:

 rc_add <service>

Managing local backups

To add a config file to the local backup list run:

 lbu_add /path/to/file

To save all the files in the local backup list to floppy run:

 lbu_commit floppy

To save the configs to USB drive run:

 lbu_commit usb

To list files in the local backup list run:

 cat /etc/backuplist