unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* failed to resolve partition “my-root”
@ 2017-06-27 18:45 Ricardo Wurmus
  2017-06-27 19:15 ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2017-06-27 18:45 UTC (permalink / raw)
  To: help-guix

Hi Guix,

I just installed Guix onto a server.  I ran “guix pull” before “guix
system init” and I made sure that my config file is correct.  It is
based on “bare-bones.scm” – I only changed the user name and replaced
“sdX” with “sdb” (because the hard disk was recognized as sdb).

In the GRUB console I confirmed that the first partition on the hard
disk has in fact the label “my-root”.

Linux appears to boot but then fails with “failed to resolve partition
"my-root"”.  I suspect that something in (gnu build file-systems) is
broken.  koosha on IRC previously reported a similar problem.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-27 18:45 failed to resolve partition “my-root” Ricardo Wurmus
@ 2017-06-27 19:15 ` Ricardo Wurmus
  2017-06-28 16:38   ` Ricardo Wurmus
  0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2017-06-27 19:15 UTC (permalink / raw)
  To: help-guix


Ricardo Wurmus <rekado@elephly.net> writes:

> Linux appears to boot but then fails with “failed to resolve partition
> "my-root"”.  I suspect that something in (gnu build file-systems) is
> broken.  koosha on IRC previously reported a similar problem.

“cat /proc/partitions” shows that only the ram* devices are listed.
None of the hard disk partitions are listed.  Also, in the rescue REPL I
don’t see any disk under /dev/.

So (gnu build file-systems) works as it should.  Curious.

When I boot with the USB stick, however, /dev/sda (the USB disk) and
/dev/sdb (the hard disk) both exist.

I’m guessing that it’s a problem with the initrd; some missing kernel
module maybe.  Is there a way to regenerate the initrd without having to
reinstall the whole system?  I’m willing to fall back to my old ways of
manipulating things in the store just to get this thing booted soon.
(I’ll ask for forgiveness later.)

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-27 19:15 ` Ricardo Wurmus
@ 2017-06-28 16:38   ` Ricardo Wurmus
  2017-06-28 21:54     ` Marius Bakke
  2017-06-29 14:37     ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2017-06-28 16:38 UTC (permalink / raw)
  To: help-guix


Ricardo Wurmus <rekado@elephly.net> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Linux appears to boot but then fails with “failed to resolve partition
>> "my-root"”.  I suspect that something in (gnu build file-systems) is
>> broken.  koosha on IRC previously reported a similar problem.
>
> “cat /proc/partitions” shows that only the ram* devices are listed.
> None of the hard disk partitions are listed.  Also, in the rescue REPL I
> don’t see any disk under /dev/.
>
> So (gnu build file-systems) works as it should.  Curious.
>
> When I boot with the USB stick, however, /dev/sda (the USB disk) and
> /dev/sdb (the hard disk) both exist.
>
> I’m guessing that it’s a problem with the initrd; some missing kernel
> module maybe.  Is there a way to regenerate the initrd without having to
> reinstall the whole system?  I’m willing to fall back to my old ways of
> manipulating things in the store just to get this thing booted soon.
> (I’ll ask for forgiveness later.)

I fixed this by re-init-ing the system with a tiny change to the
operating system definition:

--8<---------------cut here---------------start------------->8---
  (initrd (lambda (fs . args)
            (apply base-initrd fs
                   #:extra-modules (list "sata_nv")
                   args)))
--8<---------------cut here---------------end--------------->8---

The module is needed because this is an NVIDIA disk controller.

Fixing this was tedious, though.  Before the installation I ran “guix
pull”.  When I noticed that the system would not boot I had to boot from
USB again — and then would have to run “guix pull” again.

Is there a way to avoid this?  We can’t just chroot and my attempts to
just bind mount /mnt/gnu and /mnt/var/guix after booting the disk image
from USB failed; at least when building software because the build
environment appears to fail when things are bind mounted.

I couldn’t just use Guix from /mnt/gnu, because it uses symlinks to
/gnu, which are all broken when /gnu is provided by the USB disk.

Should I have used some unionfs trickery?

Is there a “fixup recipe” we can recommend to people in the manual for
those cases where the initrd doesn’t contain the necessary kernel
modules?  Or maybe a “guix system enter /mnt” command that remounts
things and creates user accounts as necessary?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-28 16:38   ` Ricardo Wurmus
@ 2017-06-28 21:54     ` Marius Bakke
  2017-06-29 14:33       ` Ludovic Courtès
  2017-06-29 14:37     ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2017-06-28 21:54 UTC (permalink / raw)
  To: Ricardo Wurmus, help-guix

[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]

Ricardo Wurmus <rekado@elephly.net> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Linux appears to boot but then fails with “failed to resolve partition
>>> "my-root"”.  I suspect that something in (gnu build file-systems) is
>>> broken.  koosha on IRC previously reported a similar problem.
>>
>> “cat /proc/partitions” shows that only the ram* devices are listed.
>> None of the hard disk partitions are listed.  Also, in the rescue REPL I
>> don’t see any disk under /dev/.
>>
>> So (gnu build file-systems) works as it should.  Curious.
>>
>> When I boot with the USB stick, however, /dev/sda (the USB disk) and
>> /dev/sdb (the hard disk) both exist.
>>
>> I’m guessing that it’s a problem with the initrd; some missing kernel
>> module maybe.  Is there a way to regenerate the initrd without having to
>> reinstall the whole system?  I’m willing to fall back to my old ways of
>> manipulating things in the store just to get this thing booted soon.
>> (I’ll ask for forgiveness later.)
>
> I fixed this by re-init-ing the system with a tiny change to the
> operating system definition:
>
> --8<---------------cut here---------------start------------->8---
>   (initrd (lambda (fs . args)
>             (apply base-initrd fs
>                    #:extra-modules (list "sata_nv")
>                    args)))
> --8<---------------cut here---------------end--------------->8---
>
> The module is needed because this is an NVIDIA disk controller.

Maybe we could add all disk drivers to the base initrd image?

$ du -h $(guix build linux-libre 2>/dev/null)/lib/modules/*/kernel/drivers/ata
1.3M    /gnu/store/b7nk7glwlrjk8fnw4g7zylzlx7g2f6jd-linux-libre-4.11.6/lib/modules/4.11.6-gnu/kernel/drivers/ata

That doesn't sound too much to me and will save many users some trouble.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-28 21:54     ` Marius Bakke
@ 2017-06-29 14:33       ` Ludovic Courtès
  2017-06-29 20:51         ` Alex Kost
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2017-06-29 14:33 UTC (permalink / raw)
  To: Marius Bakke; +Cc: help-guix

Marius Bakke <mbakke@fastmail.com> skribis:

> Maybe we could add all disk drivers to the base initrd image?
>
> $ du -h $(guix build linux-libre 2>/dev/null)/lib/modules/*/kernel/drivers/ata
> 1.3M    /gnu/store/b7nk7glwlrjk8fnw4g7zylzlx7g2f6jd-linux-libre-4.11.6/lib/modules/4.11.6-gnu/kernel/drivers/ata
>
> That doesn't sound too much to me and will save many users some trouble.

Maybe not “all” because it’s a moving target, but at least “some”.

Also, the problem is that currently the initrd code loads every kernel
module that we specify (we don’t have udev in there to determine which
modules are needed and which are not), and that’s not great.

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-28 16:38   ` Ricardo Wurmus
  2017-06-28 21:54     ` Marius Bakke
@ 2017-06-29 14:37     ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-06-29 14:37 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Ricardo Wurmus <rekado@elephly.net> skribis:

> Fixing this was tedious, though.  Before the installation I ran “guix
> pull”.  When I noticed that the system would not boot I had to boot from
> USB again — and then would have to run “guix pull” again.
>
> Is there a way to avoid this?  We can’t just chroot and my attempts to
> just bind mount /mnt/gnu and /mnt/var/guix after booting the disk image
> from USB failed; at least when building software because the build
> environment appears to fail when things are bind mounted.
>
> I couldn’t just use Guix from /mnt/gnu, because it uses symlinks to
> /gnu, which are all broken when /gnu is provided by the USB disk.
>
> Should I have used some unionfs trickery?

Maybe with unshare + chroot as in
<https://www.gnu.org/software/guix/news/creating-bundles-with-guix-pack.html>,
but then you’d need to be able to start the daemon in that environment
with “/run/current-system/profile/bin/guix-daemon
--build-users-group=guixbuild”.  I haven’t tried, it’s quite
inconvenient, but it may work.

> Is there a “fixup recipe” we can recommend to people in the manual for
> those cases where the initrd doesn’t contain the necessary kernel
> modules?  Or maybe a “guix system enter /mnt” command that remounts
> things and creates user accounts as necessary?

I like the idea of “guix system enter” and it shouldn’t be that hard.
Perhaps a wishlist item for bug-guix?

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-29 14:33       ` Ludovic Courtès
@ 2017-06-29 20:51         ` Alex Kost
  2017-06-30 12:45           ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2017-06-29 20:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Ludovic Courtès (2017-06-29 16:33 +0200) wrote:

> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> Maybe we could add all disk drivers to the base initrd image?
>>
>> $ du -h $(guix build linux-libre 2>/dev/null)/lib/modules/*/kernel/drivers/ata
>> 1.3M
>> /gnu/store/b7nk7glwlrjk8fnw4g7zylzlx7g2f6jd-linux-libre-4.11.6/lib/modules/4.11.6-gnu/kernel/drivers/ata
>>
>> That doesn't sound too much to me and will save many users some trouble.
>
> Maybe not “all” because it’s a moving target, but at least “some”.

I vote for adding "sata_nv".  It is also required for my computer.  And
as Ricardo, I had a hard time trying to figure out why I get:

  waiting for partition 'root' to appear

Also I recall there was another person who had the same problem (missing
"sata_nv" module).  There was a conversation on the subject here:

  https://gnunet.org/bot/log/guix/2015-05-30#T666910

A missing kernel module required for HDD, may be the end of the game for
most users who want to try GuixSD, so I think we should add such modules
by default.  I don't know what else is missing, but "sata_nv" looks like
a good candidate to be added.

-- 
Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: failed to resolve partition “my-root”
  2017-06-29 20:51         ` Alex Kost
@ 2017-06-30 12:45           ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2017-06-30 12:45 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2017-06-29 16:33 +0200) wrote:
>
>> Marius Bakke <mbakke@fastmail.com> skribis:
>>
>>> Maybe we could add all disk drivers to the base initrd image?
>>>
>>> $ du -h $(guix build linux-libre 2>/dev/null)/lib/modules/*/kernel/drivers/ata
>>> 1.3M
>>> /gnu/store/b7nk7glwlrjk8fnw4g7zylzlx7g2f6jd-linux-libre-4.11.6/lib/modules/4.11.6-gnu/kernel/drivers/ata
>>>
>>> That doesn't sound too much to me and will save many users some trouble.
>>
>> Maybe not “all” because it’s a moving target, but at least “some”.
>
> I vote for adding "sata_nv".  It is also required for my computer.  And
> as Ricardo, I had a hard time trying to figure out why I get:
>
>   waiting for partition 'root' to appear
>
> Also I recall there was another person who had the same problem (missing
> "sata_nv" module).  There was a conversation on the subject here:
>
>   https://gnunet.org/bot/log/guix/2015-05-30#T666910
>
> A missing kernel module required for HDD, may be the end of the game for
> most users who want to try GuixSD, so I think we should add such modules
> by default.  I don't know what else is missing, but "sata_nv" looks like
> a good candidate to be added.

Agreed, sounds good to me.  I’ll let you add it.

(At the end of the day every committer will have their favorite drivers
in the initrd, muahaha.  ;-))

Longer-term, we should probably listen for kernel “uevents” and figure
out what modules need to be loaded.

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-30 12:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-27 18:45 failed to resolve partition “my-root” Ricardo Wurmus
2017-06-27 19:15 ` Ricardo Wurmus
2017-06-28 16:38   ` Ricardo Wurmus
2017-06-28 21:54     ` Marius Bakke
2017-06-29 14:33       ` Ludovic Courtès
2017-06-29 20:51         ` Alex Kost
2017-06-30 12:45           ` Ludovic Courtès
2017-06-29 14:37     ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).