Setting up disks manually

From Alpine Linux
Revision as of 06:13, 5 March 2012 by Dubiousjim (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

You may have complex needs that aren't handled automatically by the Alpine Setup Scripts. In those cases, you'll need to prepare and mount your disks manually, and then supply the root mountpoint to setup-disk.

Setting up swap

  1. create partition with type "linux swap" (82)
  2. mkswap /dev/sda2
  3. echo -e "/dev/sda2 none swap sw 0 0" >> /mnt/etc/fstab
  4. swapon /dev/sda2

Then

free

will show how much swap space is available.

If you prefer maximum speed, you don't need configure any raid devices for swap. Just add 2 swap partitions on different disks and linux will stripe them automatically. The downside is that at the moment one disk fails, the system will go down. For better reliability, put swap on raid1.

See also setup-cryptswap.