[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reinstall GuixSD from another distribution with chroot (Recover Grub
From: |
Ludovic Courtès |
Subject: |
Re: Reinstall GuixSD from another distribution with chroot (Recover Grub) |
Date: |
Fri, 02 Mar 2018 14:51:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Oleg,
Thanks for sharing your tips.
Oleg Pykhalov <address@hidden> skribis:
> I got a ‘grub.cfg’ with following entries for all system generations:
>
> menuentry "GNU with Linux-Libre 4.15.6 (beta)" {
> search --label --set magnolia-root
> }
How did you end up with that? :-)
> Chrooting into GuixSD system:
>
> mkdir /tmp/guixsd
> sudo mount /dev/sda2 /tmp/guixsd # GuixSD partition
> sudo mount -t proc none /tmp/guixsd/proc
> sudo mount -t sysfs sys /tmp/guixsd/sys
> sudo mount -o bind /dev /tmp/guixsd/dev
> sudo mount /dev/sda1 /tmp/guixsd/boot/efi # UEFI partition with ‘EFI’
> directory inside
> sudo chroot /tmp/guixsd /bin/sh
>
>
> You need to “source” a Bash profile with environment variables which
> will setup an environment as was GuixSD (such as ‘PATH’ to find
> executables). The thing is if you make a ‘source /etc/profile’ then
> you cannot get YOUR-USER's profile PATH environment variable. Because
> of that “source” only a ‘per-user’ profile.
>
> source /var/guix/profiles/per-user/YOUR-USER/guix-profile/etc/profile
Looking at this, I thought we should be able to do a better job to start
an already installed GuixSD, for instance by providing a script that
boots the system.
Actually, I suspect that something like this would work:
cd /tmp/guixsd
chroot . /gnu/store/…/bin/guile /run/current-system/boot
With a bit of work, we could make it as simple as:
/tmp/guixsd/run/current-system/spawn
or similar.
Thoughts?
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Reinstall GuixSD from another distribution with chroot (Recover Grub),
Ludovic Courtès <=