AlpineLinux 3.6: Install AlpineLinux 3.6

This article will describe installing AlpineLinux 3.6 and upgrading from AlpineLinux 3.5 to AlpineLinux 3.6.

1 Install AlpineLinux 3.6

Download and run alpine-standard-3.6.2-x86_64.iso. Live environment will be started. Login with root user without password.

0001_AlpineLinux.png

Run setup-alpine command to install AlpinLinux to disk.

# setup-alpine

Select keyboard layout.

Available keyboard layouts:
af     be     cm     epo    gh     iq     kr     ma     nl     rs     tj
al     bg     cn     es     gr     ir     kz     md     no     ru     tm
am     br     cz     fi     hr     is     la     me     ph     se     tr
ara    brai   de     fo     hu     it     latam  mk     pk     si     tw
at     by     dk     fr     ie     jp     lk     ml     pl     sk     ua
az     ca     dz     gb     il     ke     lt     mt     pt     sy     us
ba     ch     ee     ge     in     kg     lv     ng     ro     th     uz
Select keyboard layout [none]: jp
Available variants: jp-OADG109A jp-dvorak jp-kana jp-kana86 jp-mac jp
Select variant []: jp

Input hostname.

Enter system hostname (short form, e.g. 'foo') [localhost]: alpinelinux-3-6

Select network interface.

Which one do you want to initialize? (or '?' or 'done') [eth0] eth0

Select network initialization way.

Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp] dhcp

Input yes if you need to modify /etc/network/interfaces manually.

Do you want to do any manual network configuration? [no] no

Input root password.

Changing password for root
New password:
Retype password:

Select your timezone.

Which timezone are you in? ('?' for list) [?] Asia/Tokyo

Input HTTP/FTP proxy.

HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none

Select mirror server of repository. f will select fastest mirror server.

Available mirrors:
1) dl-cdn.alpinelinux.org
2) nl.alpinelinux.org
3) dl-2.alpinelinux.org
<snip>
r) Add random from the above list
f) Detect and add fastest mirror from above list
e) Edit "/"etc/apk/repositores with text editor

Enter mirror number (1-21) or URL to add (or r/f/e/done) [f]:

Select ssh server package.

Which SSH server? ('openssh', 'dropbear' or 'none') [openssh] openssh

Select NTP client package.

Which NTP client to run? ('busybox', 'openntpd', 'chrony' or 'none') [chrony] chrony

Select disk which installs AlpineLinux.

Which disk(s) would you like to use? (or '?' for help or 'none') [none] vda

Select install mode. For installing AlpineLinux to disk, select sys or lvm.

How would you like to use it? ('sys', 'data', 'lvm' or '?' for help) [?] lvm

If selected lvm, select install mode again.

The following disk is selected (with LVM):
  vda   (10.7 GB 0x1af4 )
How would you like to use it? ('sys', 'data' or '?' for help) [?] sys

Confirm erasing disk.

WARNING: The following disk(s) will be erased:
  vda   (10.7 GB 0x1af4 )
WARNING: Erase the above disk(s) and continue? [y/N]: y

Installation will be completed. Reboot and eject DVD.

# reboot

2 Configuration on Live environment

This article will describe about configuration on Live environment.

2.1 Use DHCP client

Make network be up and run udhcp client. DHCP request will be sent.

# ip link set eth0 up
# udhcpc -i eth0

2.2 Install package with apk

The repository has only DVD on Live environment. Adding mirror server to repository make enable to install package with apk.

# echo http://mirror.leaseweb.com/alpine/v3.6/main >> /etc/apk/repositories
# apk update
# apk add <pkg>

2.3 Use serial console

Using serial console is useful for copy and paste.

# echo ttyS0 >> /etc/securetty
# su - root -c "getty 115200 ttyS0" &

2.4 Modify file on LVM

You can use rescue flavor DVD for rescue AlpineLinux. But you can install media for rescue AlpinLinux too.

# apk add lvm2 # After enable install package with apk.
# vgchange -a y vg0
# mount /dev/vg0/lv_root /mnt

3 Upgrade from AlpineLinux 3.5 to AlpineLinux 3.6

The following command will upgrade from AlpineLinux 3.5 to AlpineLinux 3.6.

# apk add busybox-static apk-tools-static
# sed -e 's;v3\.5;v3.6;g' -i /etc/apk/repositories
# apk.static update
# apk.static upgrade --no-self-upgrade --available --simulate # Detect problem
# apk.static upgrade --no-self-upgrade --available # Upgrade except kernel and firmware
# apk.static upgrade --no-self-upgrade --available # Upgrade kernel and firmware
# reboot