Requirements

= Alpine Linux from 3.3.0 and later

From Alpine Linux 3.3.0, the generated ISO's are a hybridISO, which means they contain a valid MBR and can be raw copied directly to the USB stick, Hard Drive (If you really know what you're doing), or burnt to a CD/DVD.

If the USB stick is in a Unix/Linux/OSX system, you will need to find out what the USB device is (I use fdisk -l), and then you can use dd to copy the iso to it:

dd if=alpine.iso of=/dev/sdx

Boot Alpine Linux CD-ROM

Insert the Alpine Linux CD-ROM into a computer.

Boot the computer from the Alpine Linux CD-ROM.

This step may require changes to the BIOS settings to select booting from CD.

Determine the Device Name of the USB stick

Determine the name your computer uses for your USB stick. The following step is one way to do this.

After inserting the USB stick, run the command:

dmesg

At the end of this command you should see the name of your USB stick, likely starting with "sd". (For example: "sda").

The remainder of this document will assume that your USB stick is called /dev/sda

Use "fdisk -l" or "blkid" to check the device name by size or label

Format USB stick

Run fdisk (replacing sdX with your USB stick name):

fdisk /dev/sdX

(Optional) - Create new partition table with one FAT32 partition

d Delete all partitions (this may take a few steps)

n Create a new partition

p A primary partition

1 Partition number 1

Use defaults for first and last cylinder (just press [Enter] twice).

t Change partition type

c Partition type (Win95 FAT32/LBA)

Verify that the primary partition is bootable

p Print list of partitions

If there is no '*' next to the first partition, follow the next steps:

aMake the partition bootable (set boot flag)

1 Partition number 1

w Write your changes to the device

Format the new partition with:

mkfs.vfat /dev/sdX1

Add Alpine Linux to the USB stick

To boot from your USB stick you need to copy the contents of the CDROM to the USB stick and make it bootable. Those two operations can be automated with the setup-bootable tool or can be done manually.

Warning: If you are installing to a USB Stick, you may need to modify the syslinux.cfg file to say usbdisk as described below, or you will face possible problems booting and definite problems with the package cache. Recent versions of setup-bootable will specify the alpine_dev using a UUID instead, so it should work properly by default.

Manual

(Optional) - If you created a new partition above, format the USB stick with a FAT32 filesystem (replacing sda with your USB stick name):

in the case of an ext3 formatted partition. A similar procedure might apply to other filesystems (if they are supported by syslinux and the Alpine Linux kernel).

Slow USB Devices

Specifying the 'waitusb=X' option at the end of the syslinux.cfg line might help with certain USB devices that take a bit longer to register. X stands for the amount of seconds kernel will wait before looking for the installation media.