From mboxrd@z Thu Jan 1 00:00:00 1970 From: csanchezdll@gmail.com (Carlos =?utf-8?Q?S=C3=A1nchez?= de La Lama) Subject: Re: Store on separate partition Date: Wed, 31 Aug 2016 14:48:45 +0200 Message-ID: <7twpix5ck2.fsf@gmail.com> References: <7toa4iir1p.fsf@gmail.com> <87pooyy3zq.fsf@gmail.com> <87poory2j4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, Alex Kost , bug-guix@gnu.org List-Id: bug-guix.gnu.org >>> I am trying to move the store to a separate partition, but this is >>> problematic as you need the store at boot time for the system >>> utilities (and to mount partitions, actually). >>> >> I tried to do it recently but failed. My understanding is that it's >> impossible, but I may be wrong. > > It would be interesting to fix it. In theory there=E2=80=99s no reason w= hy it > shouldn=E2=80=99t work (you need to mark the /gnu/store file system as > =E2=80=98needed-for-boot?=E2=80=99.) > > If you or Carlos could try it and report details to bug-guix@gnu.org, we > could start from there. I got it more-or-less working. What I did is a plain 0.11 install, but before the "herd start cow-store /mnt" step I had prepared the target filesystems so I had: /dev/sda1 mount as /mnt /dev/sdb1 mounted as /mnt/gnu To make the store go into /dev/sdb1 My system definition included: --8<---------------cut here---------------start------------->8--- (file-systems (cons* (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4")) (file-system (device "/dev/sdb1") (mount-point "/gnu") (type "ext4") (needed-for-boot? #t)) %base-file-systems)) --8<---------------cut here---------------end--------------->8--- When rebooting the installed system, I have to edit GRUB command line (pressing 'e'), which was: --8<---------------cut here---------------start------------->8--- search --file --set /gnu/store/2qh58nr4sxc5jwv2ng9sqq06niab8sjp-linux-lib= re-4.7/bzImage linux /gnu/store/2qh58nr4sxc5jwv2ng9sqq06niab8sjp-linux-libre-4.7/bzImage= --root=3Dmy-root --system=3D/gnu/store/4ji3d5v5ci91l69fgi4hdi73kc558whp-sy= stem --load=3D/gnu/store/4ji3d5v5ci91l69fgi4hdi73kc558whp-system/boot initrd /gnu/store/4ji3d5v5ci91l69fgi4hdi73kc558whp-system/initrd --8<---------------cut here---------------end--------------->8--- By: 1) removing "/gnu" from search command, so GRUB root (not kernel root) is correctly set as (hd1,msdos1), i.e. /dev/sdb1 2) removing "/gnu" from linux command, so the kernel is correctly loaded by GRUB (/gnu is not removed from --system or --load, as those commands are interpreted by gnu/build/linux-boot.scm after all needed-for-boot filesystems have been mounted in their correct mount points). 3) changing initrd path. Removing "/gnu" is not enough, as the path in grub.cfg is a symlink to the real initrd, pointing into /gnu/store which is not available at initrd-loading time. So I placed the synlink destination there, removing "/gnu", so: initrd /store/-base-initrd/initrd And voil=C3=A1, I can boot into my newly installed GuixSD with /gnu/store in a separate partition. Some other files (modules, background image) fail to be accesses by GRUB as well with generated grub.cfg, but those are not essential to make the system boot, in my system at least. BR Carlos