Native Harddisk Install 1.6: Difference between revisions
(Made a few minor changes... Because of changes ;)) |
|||
Line 7: | Line 7: | ||
This is how it is done. The Alpine version is 1.6.1 | This is how it is done. The Alpine version is 1.6.1 | ||
==Installation== | == Installation == | ||
Create partitions with fdisk. | |||
fdisk /dev/hda | fdisk /dev/hda | ||
Install needed programs for the setup | You should have 2 partitions: /dev/hda1 as "Linux" (type 83) and /dev/hda2 as "linux swap" (type 82). | ||
Install needed programs for the setup | |||
apk_add e2fsprogs rsync grub | apk_add e2fsprogs rsync grub | ||
Create filesystem and swap | Create filesystem and swap | ||
mkfs.ext3 /dev/hda1 | mkfs.ext3 /dev/hda1 | ||
mkswap /dev/hda2 | mkswap /dev/hda2 | ||
Turn on swap already now | Turn on swap already now | ||
swapon /dev/hda2 | swapon /dev/hda2 | ||
Mount file-system | Mount file-system | ||
mount -t ext3 /dev/hda1 /mnt | mount -t ext3 /dev/hda1 /mnt | ||
Install base packages on harddisk | Install base packages on harddisk | ||
ROOT=/mnt apk_add uclibc busybox apk-tools alpine-baselayout alpine-conf grub | ROOT=/mnt apk_add uclibc busybox apk-tools alpine-baselayout alpine-conf grub | ||
If you want pcmcia support, then also add the pcmciautils package | If you want pcmcia support, then also add the pcmciautils package | ||
ROOT=/mnt apk_add pcmciautils | ROOT=/mnt apk_add pcmciautils | ||
Install busybox links | Install busybox links | ||
mkdir /mnt/proc | mkdir /mnt/proc | ||
mount --bind /proc /mnt/proc | mount --bind /proc /mnt/proc | ||
Line 38: | Line 47: | ||
umount /mnt/proc | umount /mnt/proc | ||
For convenience, copy the apk repository. | For convenience, copy the apk repository. | ||
rsync -ruav /media/cdrom/apks /mnt | rsync -ruav /media/cdrom/apks /mnt | ||
Create the apk.conf: | Create the apk.conf: | ||
mkdir /mnt/etc/apk | mkdir /mnt/etc/apk | ||
echo "APK_PATH=file://apks" | echo "APK_PATH=file://apks" > /mnt/etc/apk/apk.conf | ||
Copy the hd/ext3 initramfs image, kernel and kernel modules. | |||
rsync -ruav /media/cdrom/kernel/generic/hd-ext3.gz /media/cdrom/vmlinuz /mnt | |||
rsync -ruav /lib/modules /mnt/lib/modules | |||
Configure grub | |||
grub-install --root-directory=/mnt /dev/hda1 | grub-install --root-directory=/mnt /dev/hda1 | ||
vi /mnt/boot/grub/menu.lst | vi /mnt/boot/grub/menu.lst | ||
It should contain something like: | It should contain something like: | ||
default 0 | default 0 | ||
Line 59: | Line 72: | ||
title Alpine Linux | title Alpine Linux | ||
root (hd0,0) | root (hd0,0) | ||
kernel / | kernel /bzImage root_dev=hda1:ext3 alpine_dev=../:ext3 | ||
initrd /hd-ext3.gz | initrd /hd-ext3.gz | ||
Install grub on MBR: | Install grub on MBR: | ||
grub | grub | ||
root (hd0,0) | root (hd0,0) | ||
Line 68: | Line 82: | ||
quit | quit | ||
Append the swap to fstab: | Append the swap to fstab: | ||
echo -e "/dev/hda2 none swap sw 0 0" | |||
echo -e "/dev/hda2 none swap sw 0 0" >> /mnt/etc/fstab | |||
Unmount, remove cdrom and reboot. (If you can't eject, just remove it manually as the machine reboots) | |||
umount /mnt | umount /mnt | ||
eject | eject | ||
reboot | reboot | ||
After reboot, log in as "root" and run: | After reboot, log in as "root" and run: | ||
setup-alpine | setup-alpine |
Revision as of 15:02, 27 February 2009
Alpine HD install
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
Alpine is more geared toward live-cd or usb-key usage, but it is possible to install it to a harddisk.
This is how it is done. The Alpine version is 1.6.1
Installation
Create partitions with fdisk.
fdisk /dev/hda
You should have 2 partitions: /dev/hda1 as "Linux" (type 83) and /dev/hda2 as "linux swap" (type 82).
Install needed programs for the setup
apk_add e2fsprogs rsync grub
Create filesystem and swap
mkfs.ext3 /dev/hda1 mkswap /dev/hda2
Turn on swap already now
swapon /dev/hda2
Mount file-system
mount -t ext3 /dev/hda1 /mnt
Install base packages on harddisk
ROOT=/mnt apk_add uclibc busybox apk-tools alpine-baselayout alpine-conf grub
If you want pcmcia support, then also add the pcmciautils package
ROOT=/mnt apk_add pcmciautils
Install busybox links
mkdir /mnt/proc mount --bind /proc /mnt/proc chroot /mnt /bin/busybox --install -s umount /mnt/proc
For convenience, copy the apk repository.
rsync -ruav /media/cdrom/apks /mnt
Create the apk.conf:
mkdir /mnt/etc/apk echo "APK_PATH=file://apks" > /mnt/etc/apk/apk.conf
Copy the hd/ext3 initramfs image, kernel and kernel modules.
rsync -ruav /media/cdrom/kernel/generic/hd-ext3.gz /media/cdrom/vmlinuz /mnt rsync -ruav /lib/modules /mnt/lib/modules
Configure grub
grub-install --root-directory=/mnt /dev/hda1 vi /mnt/boot/grub/menu.lst
It should contain something like:
default 0 timeout 0 title Alpine Linux root (hd0,0) kernel /bzImage root_dev=hda1:ext3 alpine_dev=../:ext3 initrd /hd-ext3.gz
Install grub on MBR:
grub root (hd0,0) setup (hd0) quit
Append the swap to fstab:
echo -e "/dev/hda2 none swap sw 0 0" >> /mnt/etc/fstab
Unmount, remove cdrom and reboot. (If you can't eject, just remove it manually as the machine reboots)
umount /mnt eject reboot
After reboot, log in as "root" and run:
setup-alpine