From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice Subject: Re: boot multiple Gnu/Linux Distributions from one USB key Date: Tue, 12 Mar 2019 11:34:18 +0100 Message-ID: <8736nsjs9h.fsf@nckx> References: <774d552beb6266a199523203e1ce6b8c@tuyizere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:48676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3ezN-0005wj-90 for guix-devel@gnu.org; Tue, 12 Mar 2019 06:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3ek0-00012O-LM for guix-devel@gnu.org; Tue, 12 Mar 2019 06:34:38 -0400 Received: from tobias.gr ([2001:470:7405::1]:50614) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3ejz-0000zd-TZ for guix-devel@gnu.org; Tue, 12 Mar 2019 06:34:36 -0400 In-reply-to: <774d552beb6266a199523203e1ce6b8c@tuyizere.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: gnuforever Cc: guix-devel@gnu.org gnuforever (yay!), gnuforever wrote: > I configured a usb stick to boot multiple Gnu/Linux=20 > Distributions by > following this tutorial: > https://community.linuxmint.com/tutorial/view/1846 > It works for Tails, PureOS, Trisquel and Parabola It works because these distributions have specific support for=20 loopback booting, which is a non-trivial amount of work. You'll=20 note the following in the GRUB menu entry for =E2=80=98pclinuxos=E2=80=99: linux =E2=80=A6 bootfromiso=3D/boot-isos/pclinuxos64-kde-2014.05.iso =E2= =80=A6 This tells the pclinuxos early user space (initramfs) that it=20 should do some loop mounting and other magic before mounting the=20 root partition. You'll also note that Debian-based distributions=20 use a completely different magic word: linux =E2=80=A6 iso-scan/filename=3D$isofile =E2=80=A6 because none of this is standardised or transparent. It's an=20 explicit distro feature that needs to be implemented somewhere in=20 the init code. > I am trying to add GuixSD. Unfortunately, the Guix System doesn't implement anything like=20 that yet. > For the menuentry, I always start from the grub.cfg embedded in=20 > the > iso file. > I add or remove options if needed. > > For GuixSD, I came up with this configuration: > I used label instead of uuid. > > ## GUIXSD > menuentry "GUIXSD - Gnu/Linux" { > set=20 > isofile=3D"/boot-isos/guixsd-install-0.16.0.x86_64-linux.iso" > loopback loop (hd0,1)$isofile > search --label --set GUIXSD_IMAGE > linux > (loop)/gnu/store/0zajbn9q39yva4l0zzrcshlll8qikzba-linux-libre-4.19.6/bzIm= age9 > --root=3DGUIXSD_IMAGE > --system=3D(loop)/gnu/store/l4hgd4l7acrqwi3imav9akcvv4sbj85j-system > --load=3D(loop)/gnu/store/l4hgd4l7acrqwi3imav9akcvv4sbj85j-system/boot > initrd > (loop)/gnu/store/9nqaksx40zh5d6cg5rim3f3spy56bfb9-raw-initrd/initrd.cpio.= gz > } > > It doesn't work. Well, it works up to and including booting the kernel, which is=20 still pretty cool when you think about it :-) Unfortunately, all off GRUB's loopback magic is local to GRUB.=20 You can't use it to make virtual drives appear in other operating=20 systems. (Well, maybe DOS, but that's more D than OS anyway.) > I get the following error message: > > waiting for partition 'GUIXSD_IMAGE' to appear... Once the kernel boots, Guix's early userspace only looks for real=20 partititions. It won't peek inside random files to see if they=20 contain a file system. And there's currently no way to tell it=20 to. I wonder if MAPPED-DEVICES could be a solution here, with a bit=20 (heh) of extra code=E2=80=A6 > Is there any other way to configure multiple Gnu/Linux distros=20 > to boot > from one usb? TL;DR: there is no one reliable way, only distro-specific support. Kind regards, T G-R