|
Size: 2962
Comment:
|
← Revision 16 as of 2025-12-19 21:21:12 ⇥
Size: 1707
Comment: Cleanup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| ## page was renamed from AlpineLinuxSetup = Alpine Linux Setup = |
= Alpine Linux = |
| Line 4: | Line 3: |
| '''Alpine Linux''' comes from the team behind Docker, with the intention of achieving a more minimal system. | '''Alpine Linux''' is a minimal Linux-based operating system. |
| Line 14: | Line 13: |
| The Alpine Linux wiki recommends use of `fdisk`. For more general advice regarding partitioning, see [[PartitionTablesSetup|here]]. | Insert the target device and ensure it is not mounted. (If it is, try `umount /dev/sdXN`.) |
| Line 16: | Line 15: |
| First and foremost, insert the device and ensure it is not mounted. (If it is, `umount /dev/sdXN`.) Secondly, ensure that the device is '''not''' using a GPT partition table. This would be listed by 'Disklabel type' in `fdisk`. The correct value is `dos`, not `gpt`. Per the [[https://wiki.alpinelinux.org/wiki/Create_a_Bootable_USB#Format_USB_stick|wiki]]: * Run fdisk on your device (`sdX`). |
Upstream recommends use of `fdisk(8)`. The partitioning process is as follows: |
| Line 26: | Line 21: |
| * Create new partition table with one FAT32 partition | 1. Ensure that the device is ''not'' using a GPT partition table. This would be listed under ''Disklabel type''. ''(Press `p` to list the partitions.)'' The correct value is `dos`, not `gpt`. 2. Create new partition table with one FAT32 partition 1. `d` Delete all partitions (and repeat as needed) 2. `n` Create a new partition 3. `p` A primary partition 4. `1` Partition number 1 5. Use defaults for first and last cylinder (press [Enter] twice). 6. `t` Change partition type 7. `c` Partition type (Win95 FAT32/LBA) 3. Ensure that the primary partition is bootable. This is marked by an asterisk (`*`). ''(Press `p` to list the partitions.)'' To make the partition bootable... 1. `a` Set the boot flag on a partition 2. `1` Partition number 1 4. `w` Write your changes to the device |
| Line 28: | Line 35: |
| 1. `d` Delete all partitions (this may take a few steps) | For more general advice regarding partitioning, see [[Linux/PartitionTables|here]]. |
| Line 30: | Line 37: |
| 2. `n` Create a new partition 3. `p` A primary partition 4. `1` Partition number 1 5. Use defaults for first and last cylinder (just press [Enter] twice). 6. `t` Change partition type 7. `c` Partition type (Win95 FAT32/LBA) * Verify that the primary partition is bootable 1. `p` Print list of partitions 2. If there is no '*' next to the first partition, follow the next steps: 3. `a` Make the partition bootable (set boot flag) 4. `1` Partition number 1 * `w` Write your changes to the device * Format the new partition with: |
Format the new partition with: |
| Line 60: | Line 43: |
| Note that [[FileSystemSetup#MS-DOS|mkfs.vfat and mkdosfs are the same]]. | Note that [[Linux/FileSystems#MS-DOS|mkfs.vfat and mkdosfs are the same]]. |
| Line 62: | Line 45: |
| Finally, `dd` the ISO onto the device. Or for a Raspberry Pi, copy the boot binaries onto the device. | Finally, `dd(1)` the ISO onto the device. Or for a Raspberry Pi, copy the boot binaries onto the device. |
| Line 70: | Line 53: |
| Alpine does best when you do the least with it. In general you will not be installing many packages or configuring the system away from the base image. | * [[Linux/Alpine/Apk|apk]] * [[Linux/OpenRC|OpenRC]] |
| Line 74: | Line 58: |
| === Software Installation === | == Design == |
| Line 76: | Line 60: |
| Alpine's package manager is '''apk'''. To update installed packages, run `apk update && apk upgrade`. To add a package like Docker, run `apk update && apk add docker`. The package manager looks to `/etc/apk/repositories` for mirrors. Notably, the community mirror is commented-out by default. Uncomment that line to install software such as [[DockerSetup|Docker]]. === Services === Alpine uses the '''OpenRC''' `init` system, which is designed to be very similar but simpler than the traditional SysV init system. To start a service like Docker, use `service docker start && service docker status`. To set a service like Docker to run at boot, use `rc-update add docker boot`. === Storage === Alpine is a read-only operating system. To make a change persist, the change must actually be committed to the boot overlay files. This is done by running `lbu commit -d`. Persistent storage can be mounted [[FileSystemMounting|through normal processes]]. |
* [[Linux/Alpine/Storage|Storage system]] |
Alpine Linux
Alpine Linux is a minimal Linux-based operating system.
Contents
Installation
Insert the target device and ensure it is not mounted. (If it is, try umount /dev/sdXN.)
Upstream recommends use of fdisk(8). The partitioning process is as follows:
fdisk /dev/sdX
Ensure that the device is not using a GPT partition table. This would be listed under Disklabel type. (Press p to list the partitions.) The correct value is dos, not gpt.
- Create new partition table with one FAT32 partition
d Delete all partitions (and repeat as needed)
n Create a new partition
p A primary partition
1 Partition number 1
- Use defaults for first and last cylinder (press [Enter] twice).
t Change partition type
c Partition type (Win95 FAT32/LBA)
Ensure that the primary partition is bootable. This is marked by an asterisk (*). (Press p to list the partitions.) To make the partition bootable...
a Set the boot flag on a partition
1 Partition number 1
w Write your changes to the device
For more general advice regarding partitioning, see here.
Format the new partition with:
mkfs.vfat /dev/sdX1
Note that mkfs.vfat and mkdosfs are the same.
Finally, dd(1) the ISO onto the device. Or for a Raspberry Pi, copy the boot binaries onto the device.
Administration
