https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&user=Rnicksic&feedformat=atomAlpine Linux - User contributions [en]2024-03-29T14:45:11ZUser contributionsMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=Installing_Alpine&diff=2480Installing Alpine2008-12-15T01:38:05Z<p>Rnicksic: /* From Linux */</p>
<hr />
<div>vivividomc<br />
There are currently two supported ways of running Alpine, from CDROM or from USB stick.<br />
<br />
== Preparing the media ==<br />
<br />
=== CDROM ===<br />
Download the latest iso image from the [http://www.alpinelinux.org/mediawiki/index.php/Downloads download] area and burn it.<br />
<br />
=== USB ===<br />
Alpine is shipped in compressed tar.gz archives for USB.<br />
<br />
==== Make USB-stick bootable ====<br />
===== From windows =====<br />
* Download the [http://dl.alpinelinux.org/alpine/v1.6/usbdrive/syslinux.exe syslinux.exe] utility.<br />
* Start a command prompt (Start->run, type ''cmd'' and press >enter>)<br />
* Run syslinux with your USB drive as parameter. If your USB drive is E:, then you type:<br />
syslinux E:<br />
* Flag the pertition bootable<br />
fdisk E:<br />
(Make the partition bootable somehow :-)<br />
<br />
===== From Linux =====<br />
* install syslinux (I.E ''sudo apt-get syslinux'' or ''emerge apt-get syslinux'')<br />
* Copy MBR to the USB drive (assuming your USB drive is /dev/sda)<br />
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda<br />
* Run syslinux with your USB drive as parameter.<br />
sudo syslinux /dev/sda1<br />
* Flag the partition bootable<br />
fdisk /dev/sda<br />
a (Toggle's the bootable flag)<br />
1 (The partition you want to have the flag)<br />
w (Writing your changes to the disk)<br />
<br />
==== Unpack Alpine to USB drive ====<br />
* Download a alpine-x.x.x-yyyyyy.tar.gz package.<br />
* Unpack all the files to your usb drive using a unpacker like [http://www.7-zip.org 7-zip].<br />
<br />
== Initial setup ==<br />
After booting up you will see a login prompt. Log in as ''root''.<br />
<br />
To do the basic initial configuration run:<br />
setup-alpine<br />
<br />
<br />
There you will set the hostname, configure the network and set the root password.<br />
<br />
Add the following line to your ''/etc/lbu/lbu.conf'' file:<br />
LBU_MEDIA=usb<br />
<br />
If you want to store the configureation on floppy you set ''LBU_MEDIA=floppy'' instead.<br />
<br />
To save the configuration for next reboot run:<br />
lbu commit<br />
<br />
<br />
=== Managing software packages ===<br />
To list all the packages that are available in repository, run:<br />
apk_fetch -l<br />
apk_fetch -v -l<br />
<br />
<br />
To install a package run:<br />
apk_add <PACKAGE><br />
<br />
To remove the package run:<br />
apk_delete <PACKAGE><br />
<br />
To also remove the dependencies togehter with the package, run:<br />
apk_delete -R <PACKAGE><br />
<br />
To list all installed packages run:<br />
apk_info<br />
<br />
=== Managing boot services ===<br />
<br />
To start a service during boot run:<br />
rc_add <service><br />
<br />
=== Managing local backups ===<br />
<br />
To add a config file to the local backup list run:<br />
lbu_add /path/to/file<br />
<br />
To save all the files in the local backup list to floppy run:<br />
lbu_commit floppy<br />
<br />
To save the configs to USB drive run:<br />
lbu_commit usb<br />
<br />
To list files in the local backup list run:<br />
cat /etc/backuplist</div>Rnicksichttps://wiki.alpinelinux.org/w/index.php?title=Native_Harddisk_Install_1.6&diff=2479Native Harddisk Install 1.62008-12-12T05:27:00Z<p>Rnicksic: </p>
<hr />
<div>=Alpine HD install=<br />
<br />
'''NOTE''': This document covers 1.6 release. From version 1.7.3 there is an albootstrap script that will install the basic packages (except grub) into a subdir. The script is available here: http://dev.alpinelinux.org/alpine/v1.7/albootstrap<br />
<br />
Alpine is more geared toward live-cd or usb-key usage, but it is possible to install it to a harddisk.<br />
<br />
This is how it is done. The Alpine version is 1.6.1<br />
<br />
==Installation==<br />
<br />
Create partitions with fdisk.<br />
fdisk /dev/hda<br />
You should have 2 partitions: /dev/hda1 as "Linux" (type 83) and /dev/hda2 as "linux swap" (type 82).<br />
<br />
Install needed programs for the setup<br />
apk_add e2fsprogs rsync grub<br />
<br />
Create filesystem and swap<br />
mkfs.ext3 /dev/hda1<br />
mkswap /dev/hda2<br />
<br />
Turn on swap already now<br />
swapon /dev/hda2<br />
<br />
Mount file-system<br />
mount -t ext3 /dev/hda1 /mnt<br />
<br />
Install base packages on harddisk<br />
ROOT=/mnt apk_add uclibc busybox apk-tools alpine-baselayout alpine-conf grub<br />
<br />
If you want pcmcia support, then also add the pcmciautils package<br />
ROOT=/mnt apk_add pcmciautils<br />
<br />
Install busybox links<br />
mkdir /mnt/proc<br />
mount --bind /proc /mnt/proc<br />
chroot /mnt /bin/busybox --install -s<br />
umount /mnt/proc<br />
<br />
For convenience, copy the apk repository.<br />
rsync -ruav /media/cdrom/apks /mnt<br />
<br />
Create the apk.conf:<br />
mkdir /mnt/etc/apk<br />
echo "APK_PATH=file://apks" > /mnt/etc/apk/apk.conf<br />
<br />
Copy the hd/ext3 initramfs image, kernel and kernel modules.<br />
rsync -ruav /media/cdrom/hd-ext3.gz /media/cdrom/vmlinuz /mnt<br />
rsync -ruav /lib/modules /mnt/lib/<br />
<br />
Configure grub<br />
grub-install --root-directory=/mnt /dev/hda1<br />
vi /mnt/boot/grub/menu.lst<br />
<br />
It should contain something like:<br />
<br />
default 0<br />
timeout 0<br />
title Alpine Linux<br />
root (hd0,0)<br />
kernel /vmlinuz root_dev=hda1:ext3 alpine_dev=../:ext3<br />
initrd /hd-ext3.gz<br />
<br />
Install grub on MBR:<br />
grub<br />
root (hd0,0)<br />
setup (hd0)<br />
quit<br />
<br />
Append the swap to fstab:<br />
echo -e "/dev/hda2 none swap sw 0 0" >> /mnt/etc/fstab<br />
<br />
Unmount, remove cdrom and reboot. (If you can't eject, just remove it manually as the machine reboots)<br />
umount /mnt<br />
eject <br />
reboot<br />
<br />
After reboot, log in as "root" and run:<br />
setup-alpine</div>Rnicksic