Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 11EB92235B7 for <~alpine/users@lists.alpinelinux.org>; Thu, 1 Jun 2023 06:06:24 +0000 (UTC) Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4QWwcZ74sYz9sBV for <~alpine/users@lists.alpinelinux.org>; Thu, 1 Jun 2023 06:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1685599583; bh=bbsuLWD5ps7mO619mt1XoXJF6S8ZFPh1FEWEEMjFNes=; h=Subject:From:To:Date:In-Reply-To:References:From; b=b5NedifemMSwaeUFcM0vI9CUe8/qjX/OYTXSoJzeAoxLTwC+s94IkD0OIBazXsFOM 2OE8HD9XCEe8Pg4xXCKjoyeZCIhljkZGDiJhbFY8668zzj1s39taRxPRc1zoFo8P8U x5UTODngKRM+9RIIaJQoSZsKk2b6+rfefPus7rpE= X-Riseup-User-ID: 5CE0F07ECD824517C11328970F191D6234CF46773A45EFE7943C68B7E2121398 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4QWwcZ2qGmzFq03 for <~alpine/users@lists.alpinelinux.org>; Thu, 1 Jun 2023 06:06:22 +0000 (UTC) Message-ID: <8db9c97f9f17a2d1565cb7f31c4f7b6459212578.camel@riseup.net> Subject: Re: Booting Alpine by systemd-nspawn fails - Was: Install on single partition and without a bootloader From: Ralf Mardorf To: ~alpine/users@lists.alpinelinux.org Date: Thu, 01 Jun 2023 08:06:19 +0200 In-Reply-To: References: <3405c3d90ea2b8ab5c6849f1ee17c87338e86348.camel@riseup.net> <0eab7313f6d23bf05d4e73e7db8aad05ac1bf265.camel@riseup.net> <9fdb3d754556ebb18428904b6edc2b5ddf37d6fc.camel@riseup.net> <8610b467593bd1fe5b7335242d83ce39640adc41.camel@riseup.net> <396bb310723cfb5b4d1e4c5e8e6387f3cdea96cd.camel@riseup.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi, it's solved by gaining knowledge. Microsoft employee and Pwnie Award winner Lennart Poettering once claimed that "Systemd-Nspawn is Chroot on Steroids". He's probably right about the side effects of steroid abuse, since systemd-nspawn only likes Linux that uses systemd, it's completely intolerant of other init systems, and systemd-nspawn is impotent. On my todo list is writing a chroot wrapper script, providing some comfort. On the quick I wrote a "reminder" of what I want to do. The "reminder" script is a ridiculous script, but it's just to remind me what I want to get next should I have the time to write a wrapper. Regards, Ralf ;D #! /bin/dash # chroot-alpine # v2023-05-31-1 CHROOT=3Dm1.alpine usage() { cat</dev/null 2>&1 # if Alpine was alr= eady mounted before running this script rmdir /mnt/$CHROOT/ && printf "[done]\n" # doesn't work if m= ounted countless times printf "\n" # at same or differ= ent mount points ;; "") mkdir -p /mnt/$CHROOT mount -wL$CHROOT /mnt/$CHROOT/ -o noatime mount -t proc /proc /mnt/$CHROOT/proc/ mount -t sysfs /sys /mnt/$CHROOT/sys/ mount -o bind /dev /mnt/$CHROOT/dev/ mount -o bind /run /mnt/$CHROOT/run/ #printf "\nDISPLAY=3D$DISPLAY\n\n$CHROOT is mounted:\n$(mount | sort= -u | grep $(blkid -L$CHROOT))\n\n" printf "\nDISPLAY=3D$DISPLAY\n\n$CHROOT is mounted:\n$(mount | grep = $(blkid -L$CHROOT))\n\n" # better not hiding duplicates by sort -u chroot /mnt/$CHROOT/ /bin/sh -l ;; *) usage ;; esac exit