Create a Bootable Device: Difference between revisions
m (Typos) |
mNo edit summary |
||
Line 3: | Line 3: | ||
This process applies to Alpine Linux 1.9.0 or later. | This process applies to Alpine Linux 1.9.0 or later. | ||
= Requirements = | |||
In order to follow this document, you will need: | In order to follow this document, you will need: | ||
* Alpine Linux CD-ROM ([https://alpinelinux.org/downloads/ Download] | * An Alpine Linux CD-ROM or an .iso file containing an Alpine release ([https://alpinelinux.org/downloads/ Download]). | ||
* A USB drive (flash, external HD, card reader, etc.) | * A USB drive (flash, external HD, card reader, etc.) | ||
== | = Using setup-bootable = | ||
The preferable method to write a bootable system onto a device now is to use the <code>[[Alpine_setup_scripts#setup-bootable|setup-bootable]]</code> script . | |||
= Manually copying Alpine files = | |||
{{:Include:Copying Alpine to Flash|USB stick}} | {{:Include:Copying Alpine to Flash|USB stick}} | ||
Line 16: | Line 21: | ||
== Finishing installation == | == Finishing installation == | ||
After one has booted previously created Alpine Linux bootable USB medium, | After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run ''setup-alpine'' to finish the installation. | ||
First let's find out where is our just booted USB media mounted, the location could vary. | First let's find out where is our just booted USB media mounted, the location could vary. | ||
Line 39: | Line 44: | ||
Enter apk cache directory (or '?' or 'none') [/media/sda1/cache]: | Enter apk cache directory (or '?' or 'none') [/media/sda1/cache]: | ||
After the installer finished you can see how many | After the installer finished you can see how many created/modified files are detected and will be added to the backup: | ||
# lbu status | |||
# lbu status | wc -l | # lbu status | wc -l | ||
59 | 59 | ||
Line 47: | Line 52: | ||
-rwxr-xr-x 1 root root 9591 Oct 19 15:23 /media/sda1/foo.apkovl.tar.gz | -rwxr-xr-x 1 root root 9591 Oct 19 15:23 /media/sda1/foo.apkovl.tar.gz | ||
Now all the customization are saved into the ''foo.apkovl.tar.gz'' compressed tarball on the USB stick itself. | |||
== Troubleshooting == | == Troubleshooting == |
Revision as of 18:14, 12 May 2021
Generally there's no difference between Alpine Linux USB bootable installation medium and installed system in diskless or run-from-ram installation mode. The only difference is that after finished installation modified files have to be saved somewhere, hence Alpine Local Backup. Thus this document describes how to proceed to end with an installation of a system in diskless or run-from-ram installation mode with locally saved modifications.
This process applies to Alpine Linux 1.9.0 or later.
Requirements
In order to follow this document, you will need:
- An Alpine Linux CD-ROM or an .iso file containing an Alpine release (Download).
- A USB drive (flash, external HD, card reader, etc.)
Using setup-bootable
The preferable method to write a bootable system onto a device now is to use the setup-bootable
script .
Manually copying Alpine files
This material is proposed for deletion ... This include has become obsolete. It is completely unused on the wiki
(Discuss) |
Finishing installation
After one has booted the previously created Alpine Linux bootable USB medium, one has to prepare USB stick to hold local customizations and run setup-alpine to finish the installation.
First let's find out where is our just booted USB media mounted, the location could vary.
# mount | grep /media /dev/sda1 on /media/sda1 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
Create local directory on USB media to hold local APK cache (see APK Local Cache for details).
# mount -o remount,rw /media/sda1 # mkdir /media/sda1/cache # setup-apkcache /media/sda1/cache # ls -l /etc/apk/cache lrwxrwxrwx 1 root root 17 Oct 19 13:16 /etc/apk/cache -> /media/sda1/cache
Now run setup-alpine and proceed until a question about local disk selection - in diskless mode we won't use any disk (ie. our bootable media files is basically untouched) and we are going to use sda1 to hold our system customization.
# setup-alpine ... Which disk(s) would you like to use? (or '?' for help or 'none') [none] Enter where to store configs ('floppy', 'sda1', 'usb' or 'none') [sda1]: Enter apk cache directory (or '?' or 'none') [/media/sda1/cache]:
After the installer finished you can see how many created/modified files are detected and will be added to the backup:
# lbu status # lbu status | wc -l 59 # lbu commit # ls -l /media/sda1/*apkovl.tar.gz -rwxr-xr-x 1 root root 9591 Oct 19 15:23 /media/sda1/foo.apkovl.tar.gz
Now all the customization are saved into the foo.apkovl.tar.gz compressed tarball on the USB stick itself.
Troubleshooting
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)
Other useful pages
- Configure Networking
- Setting up a SSH server (Using ssh is a good way to administer your box remotely)
- Package Management (apk) (How to add/remove packages on your Alpine)
- Init System (rc) (Configure a service to automatically boot at next reboot)
- Alpine local backup (lbu) (Permanently store your modifications in case your box needs reboot)