<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=S-degoul</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=S-degoul"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/S-degoul"/>
	<updated>2026-04-29T17:27:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Install_to_disk&amp;diff=13109</id>
		<title>Install to disk</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Install_to_disk&amp;diff=13109"/>
		<updated>2017-01-07T10:45:27Z</updated>

		<summary type="html">&lt;p&gt;S-degoul: correction of a typing error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= If using Alpine Linux 2.2.3 or later =&lt;br /&gt;
&lt;br /&gt;
{{Warning|This will erase &#039;&#039;&#039;everything&#039;&#039;&#039; on your machine&#039;s harddisk. Don&#039;t blame me if someone sues you for this, your cat dies etc. You are warned.}}&lt;br /&gt;
&lt;br /&gt;
The following is meant to be an absolute newbie guide&lt;br /&gt;
&lt;br /&gt;
* [[Burning ISOs|Burn the Alpine ISO image to a CD]]&lt;br /&gt;
* Put the CD into the new computer and turn on the power. Make sure the computer is capable to boot from a CD. Your manual for the computer or the BIOS can help.&lt;br /&gt;
* Wait for the text &#039;&#039;&#039;login:&#039;&#039;&#039; to appear, type &#039;&#039;&#039;root&#039;&#039;&#039; and press enter.&lt;br /&gt;
* Run the &#039;&#039;&#039;setup-alpine&#039;&#039;&#039; script&lt;br /&gt;
** Choose your keyboard layout. If you don&#039;t know your keyboard layout choose &#039;&#039;&#039;us&#039;&#039;&#039;. Here &#039;&#039;&#039;us&#039;&#039;&#039; was chosen.&lt;br /&gt;
*** Then I chose the &#039;&#039;&#039;us&#039;&#039;&#039; variant.&lt;br /&gt;
** Host name, which will be the name of your computer, you can just press enter if you want to use the default name&lt;br /&gt;
** Choose your network card, most people can just go with the default (press enter)&lt;br /&gt;
*** Most people will use DHCP, so press enter again, or you can enter in your static IP address&lt;br /&gt;
*** You will be asked if you want to do any manual network configuration, press enter for no&lt;br /&gt;
** Type in your root password twice.&lt;br /&gt;
** Choose a time zone, you can get a list by pressing &#039;&#039;&#039;?&#039;&#039;&#039;. If you want a sub zone, e.g. Africa, type in Africa and press enter, &#039;&#039;&#039;?&#039;&#039;&#039; will give you a list of sub zones in Africa.&lt;br /&gt;
** Press &#039;&#039;&#039;f&#039;&#039;&#039; to choose the fastest mirror.&lt;br /&gt;
** Choose an SSH server, this allows you to remotely manage your machine. OpenSSH is what the big distro&#039;s use, Dropbear is a tiny SSH replacement. Choose &#039;&#039;&#039;none&#039;&#039;&#039; for best security.&lt;br /&gt;
** Choose an NTP client, this keeps your machine&#039;s time accurate using an Internet time server. Openntpd is what the big distro&#039;s use, while Chrony is a tiny replacement.&lt;br /&gt;
** Choose a disk you want to install Alpine onto, as an example, &#039;&#039;&#039;sda&#039;&#039;&#039; is the first disk in your computer.&lt;br /&gt;
*** Now choose how you would like to use it, for this guide, choose &#039;&#039;&#039;sys&#039;&#039;&#039;, this will install the entire OS onto your hard drive&lt;br /&gt;
*** You are given a final chance to back out, type in &#039;&#039;&#039;Y&#039;&#039;&#039; to continue&lt;br /&gt;
* The installation is now complete and you will be asked to reboot. Type in &#039;&#039;&#039;reboot&#039;&#039;&#039; and press enter&lt;br /&gt;
Take out the CD, and your computer should boot into Alpine using your hard drive.&lt;br /&gt;
&lt;br /&gt;
=== Continue Setting up your Computer ===&lt;br /&gt;
&lt;br /&gt;
* [[Alpine Linux package management]] &#039;&#039;(How to add/remove packages on your Alpine)&#039;&#039;&lt;br /&gt;
* [[Alpine boot services]] &#039;&#039;(Configure a service to automatically boot at next reboot)&#039;&#039;&lt;br /&gt;
* [[Setting up a ssh-server]] &#039;&#039;(Using ssh is a good way to administer your box remotely)&#039;&#039;&lt;br /&gt;
* [[Tutorials and Howtos]] &#039;&#039;(Various tutorials, including how to setup a [[XFCE Setup|XFCE desktop]])&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
= If using Alpine Linux 2.2.2 or earlier =&lt;br /&gt;
&lt;br /&gt;
A number of steps are nowadays included in the setup-disk and setup-lbu scripts, which are invoked by setup-alpine. But in these older systems, these steps have to be performed manually.&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; to configure the keyboard, hostname and networking.&lt;br /&gt;
{{Cmd|setup-alpine}}&lt;br /&gt;
&lt;br /&gt;
Now for the manual steps. Install needed programs for the setup:&lt;br /&gt;
{{Cmd|apk add e2fsprogs syslinux mkinitfs}}&lt;br /&gt;
&lt;br /&gt;
Create partitions with &amp;lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt;. &lt;br /&gt;
{{Cmd|fdisk /dev/sda}}&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say you have 2 partitions: {{Path|/dev/sda1}} as &amp;quot;Linux&amp;quot; (type 83) and {{Path|/dev/sda2}} as &amp;quot;linux swap&amp;quot; (type 82). The partition containing {{Path|/boot}}---here, {{Path|/dev/sda1}}---must be marked bootable (command &amp;quot;a&amp;quot; within &amp;lt;code&amp;gt;fdisk&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Next, create your filesystem(s) and swap:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mkfs.ext4 /dev/sda1&lt;br /&gt;
mkswap /dev/sda2}}&lt;br /&gt;
&lt;br /&gt;
Mount the filesystem:&lt;br /&gt;
{{Cmd|mount -t ext4 /dev/sda1 /mnt}}&lt;br /&gt;
&lt;br /&gt;
Clone the current running config created by &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; (hostname, networking root password):&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;lbu package - | tar -C /mnt -zxf -&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Install base packages on the mounted disk:&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;apk add --root=/mnt --initdb $(cat /etc/apk/world)&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Append the / and swap to {{Path|/etc/fstab}}:&lt;br /&gt;
{{Cmd|echo -e &amp;quot;/dev/sda1 /    ext4  defaults 1 1&amp;quot; &amp;amp;gt;&amp;amp;gt; /mnt/etc/fstab&lt;br /&gt;
echo -e &amp;quot;/dev/sda2 none swap  sw       0 0&amp;quot; &amp;amp;gt;&amp;amp;gt; /mnt/etc/fstab}}&lt;br /&gt;
&lt;br /&gt;
Configure the boot loader, &amp;lt;code&amp;gt;extlinux&amp;lt;/code&amp;gt;. We use the provided {{Path|syslinux.cfg}} as base.&lt;br /&gt;
{{Cmd|cp /media/cdrom/syslinux.cfg /mnt/boot/extlinux.conf&lt;br /&gt;
vi /mnt/boot/extlinux.conf}}&lt;br /&gt;
&lt;br /&gt;
It should contain something like:&lt;br /&gt;
 timeout 20&lt;br /&gt;
 prompt 1&lt;br /&gt;
 default grsec&lt;br /&gt;
 label grsec&lt;br /&gt;
     kernel /boot/grsec&lt;br /&gt;
     append initrd=/boot/grsec.gz root=/dev/sda1 modules=ext4 quiet&lt;br /&gt;
&lt;br /&gt;
Install the bootloader on your {{Path|/boot}} partition:&lt;br /&gt;
{{Cmd|extlinux -i /mnt/boot}}&lt;br /&gt;
&lt;br /&gt;
Install the early-stage bootloader in the disk&#039;s MBR (note that it&#039;s {{Path|/dev/sda}} not {{Path|/dev/sda1}}!)&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;dd if=/usr/share/syslinux/mbr.bin of=/dev/sda&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
This also works:&lt;br /&gt;
{{Cmd|cat /usr/share/syslinux/mbr.bin &amp;gt; /dev/sda}}&lt;br /&gt;
&lt;br /&gt;
Unmount, remove cdrom, and reboot. (If you can&#039;t eject, just remove it manually as the machine reboots) &lt;br /&gt;
{{Cmd|umount /mnt&lt;br /&gt;
umount /.modloop&lt;br /&gt;
eject &lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
In recent versions of Alpine, the second line can be accomplished by &amp;lt;code&amp;gt;rc-service modloop stop&amp;lt;/code&amp;gt;. (See [[FAQ#How_do_I_remove_the_CDROM.3F|this FAQ entry]]).&lt;br /&gt;
&lt;br /&gt;
After reboot, you should be able to log in as root with the password you created in &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>S-degoul</name></author>
	</entry>
</feed>