Boot failure with u-boot on cubietruck

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • Julien Lepiller
Owner
unassigned
Submitted by
Julien Lepiller
Severity
normal
J
J
Julien Lepiller wrote on 12 Apr 2021 13:18
(address . bug-guix@gnu.org)
20210412131830.2bb40a45@tachikoma.lepiller.eu
Hi Guix!

This week-end, I had to reboot my server and it couldn't boot anymore.
It's a Cubietruck, an armhf machine that's in my parents' basement.
They helped me debug the issue (though that was not easy, since they
only have windows machines and not a lot of knowledge about Linux).

At boot, the machine loads the kernel and initramfs, and gets stuck at
"Starting kernel...". We tried booting various generations, including
the very firts generation (as I never had to run guix gc on the
machine, I kept all the generations around, that's 129 of them!). None
of them worked, and they all get stuck at the same message.

I suspect something might have changed in u-boot recently (maybe the
upgrade to 2021.01, since I didn't have to reboot this year yet). The
board might not be initialized as expected and all kernels from 4.19 to
the latest 5.11 fail to boot.

In the end, I reinstalled a foreign distribution (that uses u-boot
2017.01) and can SSH to the machine, but I haven't reinstalled Guix
yet. Guix was installed on an external disk, so I haven't lost anything
other that the bootloader it installed. I can chroot to the Guix system:

mount -v --bind /dev /mnt/dev
mount -v --bind /dev/pts /mnt/dev/pts
mount -vt proc proc /mnt/proc
mount -vt sysfs sysfs /mnt/sys
chroot /mnt /run/current-system/profile/bin/bash
. /etc/profile

What should be my next step?

I tried running guix from inside the chroot:
/root/.config/current/bin/guix-daemon --build-users-group=guixbuild &

But when I try to use it:

guix system build /etc/config.scm
guix system: error: while setting up the build environment: cannot
pivot old root directory onto
'/gnu/store/brkm5bb59w9i4kmyznk0k4ndsz6dzq95-system.drv.chroot/real-root':
Invalid argument

My hope was to run "guix system reconfigure" from the chroot, so I
would not loose my previous generations, and would not have to build
too much, since there are almost no substitutes for armhf.
D
D
Danny Milosavljevic wrote on 13 Apr 2021 21:14
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 47723@debbugs.gnu.org)
20210413211449.5033c468@scratchpost.org
Hi Julien,

On Mon, 12 Apr 2021 13:18:30 +0200
Julien Lepiller <julien@lepiller.eu> wrote:

Toggle quote (2 lines)
> I suspect something might have changed in u-boot recently (maybe the
> upgrade to 2021.01, since I didn't have to reboot this year yet).
[...]
Toggle quote (3 lines)
> board might not be initialized as expected and all kernels from 4.19 to
> the latest 5.11 fail to boot.

Yeah, that happens sometimes with u-boot. It sucks--but I suspect there's just
not a lot of people updating their u-boot installation all the time (or at all
ever).

I'm not sure whether it's better to just provide the old u-boot or to figure
out what exactly broke (the latter is probably gonna take quite some time).

Toggle quote (17 lines)
> In the end, I reinstalled a foreign distribution (that uses u-boot
> 2017.01) and can SSH to the machine, but I haven't reinstalled Guix
> yet. Guix was installed on an external disk, so I haven't lost anything
> other that the bootloader it installed. I can chroot to the Guix system:
>
> mount -v --bind /dev /mnt/dev
> mount -v --bind /dev/pts /mnt/dev/pts
> mount -vt proc proc /mnt/proc
> mount -vt sysfs sysfs /mnt/sys
> chroot /mnt /run/current-system/profile/bin/bash
> . /etc/profile
>
> What should be my next step?
>
> I tried running guix from inside the chroot:
> /root/.config/current/bin/guix-daemon --build-users-group=guixbuild &

Try

unshare -m /root/.config/current/bin/guix-daemon --build-users-group=guixbuild &

It should work then.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmB17akACgkQ5xo1VCww
uqVTfwf+KHgbpJM3x4TlfVhHbCiP7uQFeZj4YZRbWLsC30ithP1ibs6PBmSsQ7++
lKiG6CdA7k8kjyir6MxJurfhlk7sO3epzQZm+OcxWW0S2DxzlcEyx4IELXkqzIS5
iXGw4JAxmZ6kkJBkRPAIYhTW/f/6OsfxP7XCDn2LY2nGbYM6cy8tgch4HTtKyIJK
zTFabrsQX5UEwroHIumoTbPVz/3QDuS0/Iu7wbrkkLYJzuHg5kYmd6zUiXc6kl8X
KehkCzeVD1ikJhdQiengzPlSC8EWNrXJjZTwk4CVr5YTy9LAvYnzPbKrPK9Gmcjr
w4VVAFdxwt833Ou2tMb6meUut8HRIA==
=WiVD
-----END PGP SIGNATURE-----


J
J
Julien Lepiller wrote on 17 Apr 2021 20:22
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 47723-done@debbugs.gnu.org)
20210417202258.433cca7f@tachikoma.lepiller.eu
Le Tue, 13 Apr 2021 21:14:49 +0200,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :

Toggle quote (19 lines)
> Hi Julien,
>
> On Mon, 12 Apr 2021 13:18:30 +0200
> Julien Lepiller <julien@lepiller.eu> wrote:
>
> > I suspect something might have changed in u-boot recently (maybe the
> > upgrade to 2021.01, since I didn't have to reboot this year yet).
> [...]
> > board might not be initialized as expected and all kernels from
> > 4.19 to the latest 5.11 fail to boot.
>
> Yeah, that happens sometimes with u-boot. It sucks--but I suspect
> there's just not a lot of people updating their u-boot installation
> all the time (or at all ever).
>
> I'm not sure whether it's better to just provide the old u-boot or to
> figure out what exactly broke (the latter is probably gonna take
> quite some time).

Thanks for the help, I finally managed to boot it with the newer
2021.04 u-boot. Maybe 2021.01 did something wrong that was fixed later?

Toggle quote (27 lines)
>
> > In the end, I reinstalled a foreign distribution (that uses u-boot
> > 2017.01) and can SSH to the machine, but I haven't reinstalled Guix
> > yet. Guix was installed on an external disk, so I haven't lost
> > anything other that the bootloader it installed. I can chroot to
> > the Guix system:
> >
> > mount -v --bind /dev /mnt/dev
> > mount -v --bind /dev/pts /mnt/dev/pts
> > mount -vt proc proc /mnt/proc
> > mount -vt sysfs sysfs /mnt/sys
> > chroot /mnt /run/current-system/profile/bin/bash
> > . /etc/profile
> >
> > What should be my next step?
> >
> > I tried running guix from inside the chroot:
> > /root/.config/current/bin/guix-daemon
> > --build-users-group=guixbuild &
>
> Try
>
> unshare -m /root/.config/current/bin/guix-daemon
> --build-users-group=guixbuild &
>
> It should work then.

Ah, I found another workaround, not sure how it works but, from the
foreign system I could "mount --make-rprivate /" and it would work.
Closed
?