Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id D5B05223622 for <~alpine/users@lists.alpinelinux.org>; Tue, 8 Aug 2023 17:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=net-c.cat; s=mailo; t=1691514708; bh=1pA0sSweFf2vMA/bN0wvq0gBwnSd4d14dMz+c6KxHSU=; h=X-EA-Auth:Message-ID:Date:MIME-Version:To:Reply-To:From:Subject: Content-Type:Content-Transfer-Encoding; b=nGHJ/HoCZCfgIrMdDYtUQpZv4IAovRmuWNg4U+CK0f3D3vjdsDRbpMFHzwxr4NCJu eCaN3xcnUFHJGkA5k1TlTcT7bA7M9pSoio9XR2HAif/YO4Z+GLR8daFxYe1QFCbMeQ 9G1jTqJpYKw96y4alnbuPU0D+zn/uwTR2dMs7Ugw= Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Tue, 8 Aug 2023 19:11:48 +0200 (CEST) X-EA-Auth: ZxOt3TW6omHSBQkbNCsyyOK9/BL2HCZERoy2iRfe+YFSBobSijTBZTDcnSMnj8bhqCAFN2o2zNBjttokvLqH35BD64JzurFA Message-ID: <28a77818-9007-469a-94d6-c421e0591b0e@net-c.cat> Date: Tue, 8 Aug 2023 18:11:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ~alpine/users@lists.alpinelinux.org Reply-To: github-siiky@net-c.cat Content-Language: en-GB From: siiky Subject: Help installing in data mode Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi all, I've been trying to install Alpine in data mode for the past couple of days without success. I was using the wiki[0,1] and the handbook[2] as references; today I realized that the handbook is largely untouched for about a year[3]. Wonder if the content is still up-to-date. Some details on what I need/want, and what I tried so far. I want to install Alpine in data mode on an Intel x86_64 SBC with 16GB of internal memory. The board only supports UEFI (I think[4]). The disk should have at least two partitions: a data partition (e.g. 1GB); and the root filesystem partition filling the rest of the disk (minus whatever is necessary for boot &c). In case it does make a difference, I'm currently trying Alpine out with QEMU, because it's a little easier than having the board powered on next to me. One small (maybe big) problem is I couldn't figure out how to run QEMU in UEFI mode, so this makes the install process slightly different from what I'll need on the real board, but I figured the difference should be easy to overcome once the rest of process is nailed down. These are the commands I use to create a disk and to start the VM, as per [5,6]: qemu-img create -f qcow2 disk.qcow2 16G qemu-system-x86_64 -m 2G -nic user -boot d -cdrom alpine-standard-3.18.2-x86_64.iso -hda disk.qcow2 -display gtk After booting and logging in, I run setup-alpine and follow along. When it asks which disk to use, and where to store configs, I reply "none" to both (I understood from the wiki that setup-alpine can't automatically install Alpine the way I want it, and so have to do some steps manually later). I partition the disk according to the plan, adapting the instructions from the handbook[7]: alias p="parted -sa optimal /dev/sda" p mklabel gpt p mkpart p 1MiB 2MiB # none p mkpart p 2MiB 1G # boot p mkpart p 1G 2G # data p mkpart p 2G 100% # rootfs p set 1 bios_grub p set 2 boot mkfs.ext4 /dev/sda2 mkfs.ext4 /dev/sda3 mkfs.ext4 /dev/sda4 And now comes what confuses me most: setup-disk and setup-bootable. Do I need to run both? Only one of them? Which one? setup-bootable is used to make a whole disk the bootable system? What does setup-disk do? If I now run the following, it complains /dev/sda3 is not a block device suitable for partitioning: setup-disk -m data -s 0 /dev/sda3 But if I mount /dev/sda3 at e.g. /mnt/data/, and run again I get this: # setup-disk -m data -s 0 /mnt/data/ extlinux: Not a directory: /mnt/data/boot # ( a progress bar ) => initramfs: creating /boot/initramfs-lts /boot is device /dev/sda3 extlinux: no previous syslinux boot sector found You might need fix the MBR to be able to boot So it apparently made the data partition the boot partition? In any case, after poweroff the VM doesn't boot from the disk... With setup-bootable I get the following: # setup-bootable /media/cdrom/ /dev/sda4 installing /dev/sda4 to alpine-standard-3.18.2 230508 Making /dev/sda4 bootable... syslinux: invalid media signature (not an FAT/NTFS volume?) I'm very confused by this all, as you can probably tell (having read through many wiki pages other than those already referenced). I would really appreciate it if anyone could help me understand what I'm doing wrong, and what I should be doing instead. [0]: https://wiki.alpinelinux.org/wiki/Installation [1]: https://wiki.alpinelinux.org/wiki/Create_a_Bootable_Device [2]: https://docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html [3]: https://gitlab.alpinelinux.org/alpine/docs/user-handbook/-/commits/master [4]: at least other distros are installed in UEFI, so I'd go for that with Alpine too because I don't really need to worry about this otherwise [5]: https://wiki.alpinelinux.org/wiki/Install_Alpine_in_QEMU [6]: https://wiki.alpinelinux.org/wiki/QEMU [7]: https://docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html#_bios_gpt Thanks, siiky