<?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=Eugenfil</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=Eugenfil"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Eugenfil"/>
	<updated>2026-04-25T23:47:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Dualbooting&amp;diff=22063</id>
		<title>Dualbooting</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Dualbooting&amp;diff=22063"/>
		<updated>2022-07-06T13:29:42Z</updated>

		<summary type="html">&lt;p&gt;Eugenfil: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
It&#039;s assumed you have a box where you already run another operating system, and would like to be able to boot either the installed system or Alpine.&lt;br /&gt;
&lt;br /&gt;
= Prepare your hardware =&lt;br /&gt;
Alpine needs a separate partition where it can be installed to. If you don&#039;t already have one free, you need to create a primary partition with enough space for your Alpine installation.&lt;br /&gt;
&lt;br /&gt;
For this, see: [[Setting_up_disks_manually#Manual_partitioning | Manual_partitioning]]&lt;br /&gt;
&lt;br /&gt;
Make note of what partition you will use for your Alpine installation. In this example we are going to install Alpine on &#039;&#039;&#039;/dev/sdXY&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installing Alpine on an HDD partition =&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to install Alpine. Boot your system with a CD containing the latest Alpine Standard from [http://alpinelinux.org/downloads Downloads].&lt;br /&gt;
&lt;br /&gt;
== Format and mount the HDD partition ==&lt;br /&gt;
&lt;br /&gt;
First format your partition. We will need some tools for doing the formatting. After you are done the tools can be removed.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Make sure you format the right partition! The {{Path|/dev/sdXY}} is only a example. If you choose the wrong partition, your data will be gone.&lt;br /&gt;
Make a backup first if you are unsure.}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add e2fsprogs&lt;br /&gt;
mkfs.ext4 /dev/sdXY&lt;br /&gt;
apk del e2fsprogs}}&lt;br /&gt;
&lt;br /&gt;
Then mount the newly formatted partition. After mounting, the partition will be available at {{Path|/mnt}}.&lt;br /&gt;
{{Cmd|mount -t ext4 /dev/sdXY /mnt}}&lt;br /&gt;
&lt;br /&gt;
== Basic setup ==&lt;br /&gt;
&lt;br /&gt;
First, set up Alpine without installing to a disk.&lt;br /&gt;
&lt;br /&gt;
To do this, either run&lt;br /&gt;
{{Cmd|setup-alpine}}&lt;br /&gt;
and when to prompted &amp;quot;Which disks do you like to use?&amp;quot; make sure to answer &amp;quot;none&amp;quot;. Answer &amp;quot;none&amp;quot; to the remaining prompts about storing configs and the apk cache directory.&lt;br /&gt;
&lt;br /&gt;
Or, run this command sequence:&lt;br /&gt;
{{Cmd|setup-timezone&lt;br /&gt;
setup-alpine -q&lt;br /&gt;
setup-sshd&lt;br /&gt;
setup-ntp}}&lt;br /&gt;
&lt;br /&gt;
See [[setup-alpine]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- If the &amp;quot;answerfile&amp;quot; functionality of setup-alpine is changed to permit specifying &amp;quot;-m none&amp;quot; for setup-disk, this sequence could be expressed more concisely.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install Alpine ==&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to copy the prepared system to the prepared partition(s) that were mounted below /mnt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== In Alpine 2.2.3 or newer ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|setup-disk -m sys /mnt}}&lt;br /&gt;
See [[Alpine_setup_scripts#setup-disk|setup-disk]] for more details. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Tip|If you use extlinux (default) and didn&#039;t create a separate boot partition, ({{Path|/boot}} resides on the root partition {{Path|/}}). &lt;br /&gt;
You might need to adjust the paths to the boot files in {{Path|/boot/extlinux.conf}}, eg.:&lt;br /&gt;
&amp;lt;pre&amp;gt;[...]&lt;br /&gt;
LABEL hardened&lt;br /&gt;
  MENU DEFAULT&lt;br /&gt;
  MENU LABEL Linux hardened&lt;br /&gt;
  LINUX /boot/vmlinuz-lts&lt;br /&gt;
  INITRD /boot/initramfs-lts&lt;br /&gt;
[...]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the &amp;lt;code&amp;gt;LINUX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;INITRD&amp;lt;/code&amp;gt; paths actually point to the files shipped in your Alpine Linux release.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== With older Alpine versions up to 2.2.3 ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using an earlier version of Alpine Linux, you&#039;ll need to install the files and [[Bootloaders|bootloader]] manually.&lt;br /&gt;
&lt;br /&gt;
{{Tip|If you&#039;re using a version of Alpine Linux older than 2.2.0, replace {{Path|/etc/apk/world}} in the last line with {{Path|/var/lib/apk/world}}}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lbu package - {{!}} tar -C /mnt -xzf -&lt;br /&gt;
apk add --root /mnt --initdb --repositories-file /etc/apk/repositories --keys-dir \&lt;br /&gt;
  /etc/apk/keys $(cat /etc/apk/world) acct linux-hardened alpine-base}}&lt;br /&gt;
&lt;br /&gt;
Your system is now on {{Path|/dev/sdXY}}. &lt;br /&gt;
&lt;br /&gt;
== Configuring the bootloader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are different ways to get a boot menu that allows selecting the operating system to boot.&lt;br /&gt;
&lt;br /&gt;
It is easiest on (U)EFI based hardware platforms, where one may simply install the &amp;lt;code&amp;gt;rEFInd&amp;lt;/code&amp;gt; boot menu, as explained in [[Bootloaders]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Otherwise, one may adjust the bootloader that has already been installed (by the other operating system).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because bootloaders vary, you&#039;ll need to figure out how to make yours boot your Alpine install.&lt;br /&gt;
&lt;br /&gt;
Hopefully you can get some ideas from the following example, adjusting Grub2 to boot Alpine:&lt;br /&gt;
&lt;br /&gt;
Reboot your system &#039;&#039;(start Ubuntu)&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Start a &#039;terminal&#039; &#039;&#039;(ALT-F2 + &amp;quot;terminal&amp;quot; + [Run])&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Take notes of the UUID of the partition you are planning to use:&lt;br /&gt;
{{Cmd|sudo blkid /dev/sdXY}}&lt;br /&gt;
&lt;br /&gt;
Start editing the grub2 configuration &lt;br /&gt;
{{Cmd|gksudo gedit /etc/grub.d/40_custom}}&lt;br /&gt;
&lt;br /&gt;
I edited the file to look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
echo &amp;quot;Adding Alpine&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
cat &amp;lt;&amp;lt; EOF&lt;br /&gt;
menuentry &amp;quot;Alpine Linux&amp;quot; {&lt;br /&gt;
 set root=(hd0,3)&lt;br /&gt;
 linux /boot/vmlinuz-lts root=UUID=8de6973a-4a8c-40ed-b710-c4e2b42d6b7a modules=sd-mod,usb-storage,ext4 quiet&lt;br /&gt;
 initrd /boot/initramfs-lts&lt;br /&gt;
}&lt;br /&gt;
EOF&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{Note|The root, linux, initrd, and UUID values mentioned above should be replaced with those of your system, e.g. the UUID you got when running the &#039;blkid&#039; command.}}&lt;br /&gt;
Finally the configuration changes need to be applied to the grub2 bootloader:&lt;br /&gt;
{{Cmd|update-grub2}}&lt;br /&gt;
&lt;br /&gt;
Now it&#039;s time to test. Reboot your box.&lt;br /&gt;
{{Note|You might need to press SHIFT when booting your box in order to see the grub-menu.}}&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
For Windows partitions to be detected with grub, you need `os-prober` and `grub-mount` installed at the time grub-mkconfig runs.&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Eugenfil</name></author>
	</entry>
</feed>