Create a Bootable Device: Difference between revisions

From Alpine Linux
m (Changed some phrasings in dd instructions)
(3 intermediate revisions by the same user not shown)
Line 15: Line 15:
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.
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:
The following '''dd''' instructions follow helpful guidance from https://wiki.voidlinux.eu/Live_Images wholly or in part.
   dd if=alpine.iso of=/dev/sdx
 
If the USB stick is in a Unix/Linux/OSX system, you will need to find out what the USB device is.  There are various utilities to determine the device name (e.g. {{Path|/dev/sdx}}) for your USB device.  One way is:
 
$ sudo fdisk -l
 
If it is still unclear which is your USB's device name, in Linux you could try <code>sudo lsblk -a</code> ;  or use {{Pkg|parted}} (<code>sudo parted -l</code>).
 
Then, in order to dd the iso, ensure that your usb drive is '''not''' mounted, as various desktop environments automatically mount usb pen drives:
 
$ sudo umount /dev/sdx
 
Next, change to the directory where your Alpine .iso file is located, for example:
 
$ cd ~/Downloads
 
{{Warning|The following instruction will '''destroy''' data on the device being written to - be sure that you have identified your USB device name correctly first!}}
Then you can use '''dd''' to copy the iso to it.  Change <code>alpine.iso</code> in the following command to the name of your '''.iso''' file; and change <code>/dev/sdx</code> to the name of your pen drive's device name.  The following command may take a few minutes to execute:
   $ sudo dd if=alpine.iso of=/dev/sdx && sync


{{:Include:Copying Alpine to Flash|USB stick}}
{{:Include:Copying Alpine to Flash|USB stick}}
=== Slow USB Devices ===
=== 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.
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.

Revision as of 20:55, 15 October 2017

Creating a bootable Alpine Linux USB Stick from the command line

This process applies to Alpine Linux 1.9.0 or later, and results in a run-from-ram style installation.

Warning: This process can potentially totally or partly erase the contents of your hard drive. For this reason, it is recommended to do this procedure using VirtualBox rather than your own computer.


Requirements

In order to follow this document, you will need:

  • Alpine Linux CD-ROM (Download a .iso file containing an Alpine release.)
  • A USB drive (flash, external HD, card reader, etc.)

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.

The following dd instructions follow helpful guidance from https://wiki.voidlinux.eu/Live_Images wholly or in part.

If the USB stick is in a Unix/Linux/OSX system, you will need to find out what the USB device is. There are various utilities to determine the device name (e.g. /dev/sdx) for your USB device. One way is:

$ sudo fdisk -l

If it is still unclear which is your USB's device name, in Linux you could try sudo lsblk -a ; or use parted (sudo parted -l).

Then, in order to dd the iso, ensure that your usb drive is not mounted, as various desktop environments automatically mount usb pen drives:

$ sudo umount /dev/sdx

Next, change to the directory where your Alpine .iso file is located, for example:

$ cd ~/Downloads
Warning: The following instruction will destroy data on the device being written to - be sure that you have identified your USB device name correctly first!


Then you can use dd to copy the iso to it. Change alpine.iso in the following command to the name of your .iso file; and change /dev/sdx to the name of your pen drive's device name. The following command may take a few minutes to execute:

 $ sudo dd if=alpine.iso of=/dev/sdx && sync
This material is proposed for deletion ...

This include has become obsolete. It is completely unused on the wiki (Discuss)
Make sure no other pages link here and check the page's history before deleting.

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.

append initrd=/boot/grsec.gz alpine_dev=usbdisk:vfat modules=loop,cramfs,sd-mod,usb-storage quiet waitusb=3

See Also

Alpine Linux has some special applications that helps you to use it in the way you want.
Some of the first scripts you are suggested to use is:

  • setup-alpine (Configures all basic things on your Alpine Linux)
  • setup-acf (was named setup-webconf before Alpine 1.9 beta 4) (Configures ACF (webconfiguration) so you can manage your box through https)
Note: Just type any of the above commands on your console and hit Enter to execute the script.

Other useful pages