|
Tag: Redirect target changed |
(21 intermediate revisions by 9 users not shown) |
Line 1: |
Line 1: |
| {{Note|This document covers 2.x.x release.}}
| | #REDIRECT [[Setting_up_disks_manually]] |
| For 1.8.x and older please see [[Native Harddisk Install 1.6]]
| |
| | |
| == Installation ==
| |
| Run ''setup-alpine'' to configure the keyboard, hostname and networking.
| |
| | |
| {{Cmd|setup-alpine}}
| |
| | |
| Create partitions with fdisk.
| |
| | |
| {{Cmd|fdisk /dev/sda}}
| |
| | |
| You should have 2 partitions: /dev/sda1 as "Linux" (type 83) and /dev/sda2 as "linux swap" (type 82). The /dev/sda1 must be bootable (command "a" within fdisk).
| |
| | |
| Install needed programs for the setup
| |
| | |
| {{Cmd|apk add e2fsprogs syslinux mkinitfs}}
| |
| | |
| Create filesystem and swap
| |
| | |
| {{Cmd|mkfs.ext4 /dev/sda1
| |
| mkswap /dev/sda2}}
| |
| | |
| Mount file-system
| |
| | |
| {{Cmd|mount -t ext4 /dev/sda1 /mnt}}
| |
| | |
| Clone the current running config created by setup-alpine (hostname, networking root password)
| |
| | |
| {{Cmd|<nowiki>lbu package - | tar -C /mnt -zx</nowiki>}}
| |
| | |
| Install base packages on harddisk
| |
| | |
| {{Cmd|<nowiki>apk add --root=/mnt --initdb $(cat /etc/apk/world)</nowiki>}}
| |
| | |
| Append the / and swap to fstab:
| |
| {{Cmd|echo -e "/dev/sda1 / ext4 defaults 1 1" >> /mnt/etc/fstab
| |
| echo -e "/dev/sda2 none swap sw 0 0" >> /mnt/etc/fstab}}
| |
| | |
| Configure the boot loader, extlinux. We use the provided syslinux as base.
| |
| | |
| {{Cmd|cp /media/cdrom/syslinux.cf /mnt/boot/extlinux.conf
| |
| vi /mnt/boot/extlinux.conf}}
| |
| | |
| It should contain something like:
| |
| timeout 20
| |
| prompt 1
| |
| default grsec
| |
| label grsec
| |
| kernel /boot/grsec
| |
| append initrd=/boot/grsec.gz root=/dev/sda1 modules=ext4 quiet
| |
| | |
| Install the bootloader:
| |
| {{Cmd|extlinux -i /mnt/boot}}
| |
| | |
| Install syslinux bootloader at the beginning of the MBR so its bootable (note that its sda and not sda1)
| |
| | |
| {{Cmd|<nowiki>dd if=/usr/share/syslinux/mbr.bin of=/dev/sda</nowiki>}}
| |
| | |
| Unmount, remove cdrom, and reboot. (If you can't eject, just remove it manually as the machine reboots)
| |
| | |
| {{Cmd|umount /mnt
| |
| umount /.modloop
| |
| eject
| |
| reboot}}
| |
| | |
| After reboot, you should be able to log in as root with the password you created in <tt>setup-alpine</tt>.
| |