Installation Guide
Prerequisites
Installing LankeOS requires:
- Basic Linux command-line operations
- Understanding of disk partitioning concepts (GPT, EFI system partition, etc.)
- x86_64 UEFI system
Method 1: Using the Built-in Installer (Recommended)
Boot into the live environment and run:
sudo lanke_installInstaller workflow:
- Select Disk — Lists all available disks
- Partition Scheme — Automatically creates GPT partitions:
- EFI System Partition (512 MiB, Label set to
LANKE_BASE) - Root partition (remaining space, Label optionally set to
LANKE_DATA)
- EFI System Partition (512 MiB, Label set to
- Format and Copy — Formats partitions and copies live system data to the hard disk
- Finish — Reboot into the installed system
Method 2: Manual Installation
1. Partitioning
Use gdisk or fdisk to create the following partitions:
# Example: /dev/nvme0n1
gdisk /dev/nvme0n1| Partition | Size | Type | Label | Description |
|---|---|---|---|---|
/dev/nvme0n1p1 | 512 MiB | EF00 (EFI System) | LANKE_BASE | Required — initramfs uses this label to locate the boot media |
/dev/nvme0n1p2 | Remaining | 8300 (Linux) | LANKE_DATA | Optional, for persistent storage |
2. Formatting
# EFI partition — Label MUST be set to LANKE_BASE
mkfs.fat -F 32 -n LANKE_BASE /dev/nvme0n1p1
# Root partition (if persistence is needed)
mkfs.ext4 -L LANKE_DATA /dev/nvme0n1p2The
-n LANKE_BASEflag sets the FAT partition label. The initramfs usesfindfs LABEL=LANKE_BASEto locate the boot partition.
3. Copy Data
After booting into the live environment, copy the boot files and rootfs from the ISO to the hard disk:
# Locate the boot media path (mounted by initramfs in live mode)
LIVE_MNT="/mnt/lanke_live"
# Mount the target partition
mount /dev/nvme0n1p1 /mnt
# Copy kernel, initramfs, and GRUB EFI bootloader
cp -a "$LIVE_MNT/boot" /mnt/
cp -a "$LIVE_MNT/EFI" /mnt/
# If using a persistence partition, copy rootfs.sfs as well
mount /dev/nvme0n1p2 /data
cp -a "$LIVE_MNT/live" /data/Note: Running
grub-installwithin an OverlayFS environment will fail, so we directly copy the pre-installed GRUB EFI files from the Live ISO.
4. Configure GRUB
The installed system does not need the live or toram kernel parameters. Write a new GRUB configuration:
cat > /mnt/boot/grub/grub.cfg << 'EOF'
# ---------------------------------------------------------
# LankeOS GRUB Configuration
# ---------------------------------------------------------
# Load basic modules
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod ext2
# Video output
insmod all_video
insmod video_bochs
insmod video_cirrus
insmod gfxterm
# Basic display settings
terminal_input console
terminal_output console
# Timeout and defaults
set timeout=10
set default=0
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
# ---------------------------------------------------------
# Boot Entries
# ---------------------------------------------------------
menuentry "LankeOS" --class lankeos --class gnu-linux {
echo "Loading LankeOS Kernel..."
linux /boot/vmlinuz-lanke rw loglevel=3 console=ttyS0 console=tty1
echo "Loading LankeOS Initramfs..."
initrd /boot/initrd.img
}
menuentry "Reboot System" {
reboot
}
menuentry "Power Off" {
halt
}
EOFUnlike live mode, the installed system runs without the
liveparameter. This tells initramfs to skip live-specific steps like password clearing, auto-login injection, and installer execution. If aLANKE_DATApartition is present, initramfs will automatically mount it as an OverlayFS upper directory for persistence.
Persistent Storage
To use persistent storage on a Live USB (retaining changes after reboot):
- Create a second partition on the USB drive with label
LANKE_DATA - Format as ext4
- The system will automatically detect it and mount it as the OverlayFS upper directory on boot
# Example: create a persistence partition on /dev/sda
# First create the second partition
gdisk /dev/sda
# Then format it
mkfs.ext4 -L LANKE_DATA /dev/sda2Troubleshooting
Cannot enter graphical environment after boot
Check graphics driver support:
# View system logs
journalctl -b | grep -i "drm\|i915\|amdgpu\|nouveau"
# Check session type
loginctl show-session <SESSION_ID> -p TypeWi-Fi not connecting
Check if wpa_supplicant is running:
systemctl status wpa_supplicant
nmcli device wifi list
nmcli device wifi connect <SSID> password <password>Repository connection failure
Check network connectivity and mirror configuration:
lpkg --version
cat /etc/lpkg/mirror.conf
curl -I https://lankerepo.wtada233.top/x86_64/index.txt