No ISO, no guided installer. Boot any live Linux with
tar, curl or wget, and disk
tools - ScrapLinux's own media is not needed for this step. The short
version is on the main
page; this covers the parts that guide leaves out.
By hand, with fdisk/sfdisk/cfdisk
or whatever the live environment gives you. What you need depends on
firmware and bootloader:
| Layout | Partitions |
|---|---|
| UEFI + Limine | EFI System Partition (FAT32, ~512M) + root |
| BIOS + Limine | a small unformatted boot-stub partition (~1M, type 21686148-6449-6E6F-744E-656564454649) + a FAT32 /boot (~512M, Limine's BIOS build has no ext4 reader) + root |
| BIOS + GRUB | a small unformatted BIOS boot partition (~1M, type 21686148-6449-6E6F-744E-656564454649) + root - GPT disks need one, GRUB refuses to embed in a bare gap |
mkfs.ext4 /dev/sdX2 mount /dev/sdX2 /mnt mkfs.fat -F32 /dev/sdX1 mount --mkdir /dev/sdX1 /mnt/boot
Root can be ext4, ext3, ext2, btrfs, xfs or f2fs - whatever the
live environment's mkfs.* tools support. For an
encrypted root, run cryptsetup luksFormat and
cryptsetup open before formatting, and write
/etc/crypttab by hand once chrooted in (a single
cryptroot UUID=<luks-uuid> none luks line) -
scraplinux-mkinitramfs reads it back to decide whether to
bundle cryptsetup into the initramfs.
tar -xJf scraplinux-def-tarball.tar.xz -C /mnt
Two flavors: def (busybox init, the tested default)
and openrc (OpenRC already wired up as init instead).
Both bundle glibc, toybox, busybox, zsh, doas, e2fsprogs, and
scraps itself, pre-installed and ready to sync. Neither
bundles scraplinux-base, a kernel, or a bootloader - those
come from scraps add once repo indexes are synced.
/mnt/usr/bin/scraps-strap /mnt
scraps-strap's only job is syncing fresh repository
indexes into the extracted tree. It passes
SCRAPS_CONF/SCRAPS_REPOD explicitly rather than
relying on their defaults, because those default to host-absolute
paths - correct when a live ScrapLinux session with real
/etc/scraps config is doing the installing, wrong here,
since whatever booted this could be any live Linux with no
/etc/scraps at all.
SCRAPS_ROOT=/mnt SCRAPS_CONF=/mnt/etc/scraps/scraps.conf SCRAPS_REPOD=/mnt/etc/scraps/repos.d \ /mnt/usr/bin/scraps add genfstab /mnt/usr/bin/genfstab /mnt >> /mnt/etc/fstab
genfstab reads /proc/mounts from the
live environment's own view - it has to run before chroot, not after,
since a chroot has no view of the outer mount table without
/proc bind-mounted first. It writes UUID=,
never PARTUUID=: the initramfs resolves root=
with busybox findfs, which only understands
LABEL=/UUID=.
/mnt/usr/bin/scraplinux-chroot /mnt
Bind-mounts /proc /sys /dev /run and drops you into a
shell with a correct backspace (stty erase ^? is set
explicitly, since the target has no terminfo database yet to agree
with the terminal on what backspace even sends).
passwd adduser you scraps add scraplinux-base scraps add scraplinux-base-kernel scraps add limine scraplinux-mkinitramfs scraplinux-rebuild
Swap limine for grub on a BIOS install
if you'd rather have GRUB. Swap scraplinux-base-kernel for
any other flavor - scraps search kernel lists them, see
kernels. scraplinux-mkinitramfs
only needs to run explicitly here because you're doing it from inside
a chroot rather than through a normal package upgrade, which triggers
it as a hook automatically afterward.
scraplinux-rebuild has to run here, inside the chroot,
not after exiting it - it reads plain /etc/fstab,
/etc/crypttab and /boot, which only mean
the target's own copies from inside the target. It activates any
kernel package still marked -nomod (a kernel installed
from inside a chroot can't run its own post-install hooks there -
no running kernel to build an initramfs against yet) and writes
limine.conf/grub.cfg. It never runs the
actual deploy command - that's the one manual step left, and it
happens back outside.
Exit the chroot when done (exit or Ctrl-D).
Back on the live environment, as root:
# BIOS, Limine limine bios-install /dev/sdX # EFI, Limine - the target's own copy, not the live environment's mkdir -p /mnt/boot/EFI/BOOT /mnt/boot/EFI/scraplinux cp /mnt/usr/share/limine/BOOTX64.EFI /mnt/boot/EFI/BOOT/ cp /mnt/usr/share/limine/BOOTX64.EFI /mnt/boot/EFI/scraplinux/scraplinuxx64.efi efibootmgr --create --disk /dev/sdX --part 1 \ --loader '\EFI\scraplinux\scraplinuxx64.efi' --label 'ScrapLinux linux' # BIOS, GRUB grub-install --target=i386-pc --boot-directory=/mnt/boot /dev/sdX
Reboot.
Mount the root partition (and boot partition, if separate) under
/mnt, then /mnt/usr/bin/scraplinux-chroot /mnt - the
same tool used during install works identically afterward. Re-run
scraplinux-rebuild from inside that chroot, same as during
install, to fix a stale
bootloader config or reactivate a kernel.