Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

grub2 fails to emerge: problem with patch in prepare phase


--->yoalli<---

Question

In a fresh funtoo installation i have the problem just after compiling and installing a new kernel with its respective better-initrafms ready to work, the next logical step now is to install a boot loader, in this case i'm following the funtoo installation tutorial:

emerge boot-update

but fails in the part of emerging grub: Failed Patch: 0002-grub-install-support-for-partitioned-partx-loop-devi.patch !

 

Ii'm attaching the build log here :

[32;01m * [39;49;00mPackage:    sys-boot/grub-2.02_beta2-r3
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mMaintainer: funtoo
[32;01m * [39;49;00mUSE:        amd64 binfont elibc_glibc grub_platforms_efi-64 grub_platforms_pc kernel_linux nls userland_GNU
[32;01m * [39;49;00mFEATURES:   preserve-libs sandbox
>>> Unpacking source...
>>> Unpacking grub-2.02~beta2.tar.xz to /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Unpacking unifont-7.0.01.pcf.gz to /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Unpacking unifont-1.0.pf2.xz to /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Source unpacked in /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Preparing source in /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2 ...
 [32;01m*[0m Applying various patches (bugfixes/updates) ...
 [32;01m*[0m   0001-Makefile.util.def-Link-grub-ofpathname-with-zfs-libs.patch ...
[A[123C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m   0002-grub-install-support-for-partitioned-partx-loop-devi.patch ...

 [31;01m*[0m Failed Patch: 0002-grub-install-support-for-partitioned-partx-loop-devi.patch !
 [31;01m*[0m  ( /usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch )
 [31;01m*[0m 
 [31;01m*[0m Include in your bugreport the contents of:
 [31;01m*[0m 
 [31;01m*[0m   /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/temp/0002-grub-install-support-for-partitioned-partx-loop-devi.patch.out

 [31;01m*[0m ERROR: sys-boot/grub-2.02_beta2-r3 failed (prepare phase):
 [31;01m*[0m   Failed Patch: 0002-grub-install-support-for-partitioned-partx-loop-devi.patch!
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m     ebuild.sh, line   93:  Called src_prepare
 [31;01m*[0m   environment, line 4635:  Called epatch
 [31;01m*[0m   environment, line 1951:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m               die "Failed Patch: ${patchname}!";
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=sys-boot/grub-2.02_beta2-r3'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-boot/grub-2.02_beta2-r3'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2'
 [31;01m*[0m S: '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2'

Also i have here the patch.out info:

***** 0002-grub-install-support-for-partitioned-partx-loop-devi.patch *****
PWD: /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2
PATCH TOOL: patch -> /usr/bin/patch
VERSION INFO:
GNU patch 2.7.5
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Larry Wall and Paul Eggert

===========================================================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1

Do i need to mask the grub-2.02_beta2-r3? Thanks in advance :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

woooooooops!!!!! everything gone bad because of a bad chroot procedure, should i erase this topic? or maybe let it there to allow another newbies to see what can happen if the things are done by skipping important parts on the installation?  So i'm asking another thing: the other two packages that are merged with grub2 with

emerge boot-update

are wrong compilled because of the bad chroot?

Link to comment
Share on other sites

  • 0

In a fresh funtoo installation i have the problem just after compiling and installing a new kernel with its respective better-initrafms ready to work, the next logical step now is to install a boot loader, in this case i'm following the funtoo installation tutorial:

emerge boot-update

but fails in the part of emerging grub: Failed Patch: 0002-grub-install-support-for-partitioned-partx-loop-devi.patch !

 

Ii'm attaching the build log here :

[32;01m * [39;49;00mPackage:    sys-boot/grub-2.02_beta2-r3
[32;01m * [39;49;00mRepository: gentoo
[32;01m * [39;49;00mMaintainer: funtoo
[32;01m * [39;49;00mUSE:        amd64 binfont elibc_glibc grub_platforms_efi-64 grub_platforms_pc kernel_linux nls userland_GNU
[32;01m * [39;49;00mFEATURES:   preserve-libs sandbox
>>> Unpacking source...
>>> Unpacking grub-2.02~beta2.tar.xz to /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Unpacking unifont-7.0.01.pcf.gz to /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Unpacking unifont-1.0.pf2.xz to /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Source unpacked in /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work
>>> Preparing source in /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2 ...
 [32;01m*[0m Applying various patches (bugfixes/updates) ...
 [32;01m*[0m   0001-Makefile.util.def-Link-grub-ofpathname-with-zfs-libs.patch ...
[A[123C [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m   0002-grub-install-support-for-partitioned-partx-loop-devi.patch ...

 [31;01m*[0m Failed Patch: 0002-grub-install-support-for-partitioned-partx-loop-devi.patch !
 [31;01m*[0m  ( /usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch )
 [31;01m*[0m 
 [31;01m*[0m Include in your bugreport the contents of:
 [31;01m*[0m 
 [31;01m*[0m   /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/temp/0002-grub-install-support-for-partitioned-partx-loop-devi.patch.out

 [31;01m*[0m ERROR: sys-boot/grub-2.02_beta2-r3 failed (prepare phase):
 [31;01m*[0m   Failed Patch: 0002-grub-install-support-for-partitioned-partx-loop-devi.patch!
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m     ebuild.sh, line   93:  Called src_prepare
 [31;01m*[0m   environment, line 4635:  Called epatch
 [31;01m*[0m   environment, line 1951:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m               die "Failed Patch: ${patchname}!";
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=sys-boot/grub-2.02_beta2-r3'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-boot/grub-2.02_beta2-r3'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2'
 [31;01m*[0m S: '/var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2'

Also i have here the patch.out info:

***** 0002-grub-install-support-for-partitioned-partx-loop-devi.patch *****
PWD: /var/tmp/portage/sys-boot/grub-2.02_beta2-r3/work/grub-2.02~beta2
PATCH TOOL: patch -> /usr/bin/patch
VERSION INFO:
GNU patch 2.7.5
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Larry Wall and Paul Eggert

===========================================================================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p1 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p2 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p3 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1
===========================================================================

PATCH COMMAND:  patch -p4 -g0 -E --no-backup-if-mismatch  < '/usr/portage/sys-boot/grub/files/2.02_beta2/0002-grub-install-support-for-partitioned-partx-loop-devi.patch'

===========================================================================
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e407b6f1e9bf71877104eee2ed513b4065667f60 Mon Sep 17 00:00:00 2001
|From: Mike Gilbert <floppym@gentoo.org>
|Date: Sun, 26 Jan 2014 02:56:04 +0100
|Subject: [PATCH 2/5] 	grub-install: support for partitioned partx loop
| devices.
|
|	* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|	/dev/loopX as being the parent of /dev/loopXpY.
|
|Conflicts:
|	ChangeLog
|---
| grub-core/osdep/linux/getroot.c | 13 +++++++++++++
| 1 file changed, 13 insertions(+)
|
|diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|index 772de0a..19581d3 100644
|--- a/grub-core/osdep/linux/getroot.c
|+++ b/grub-core/osdep/linux/getroot.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

patch program exited with status 1

Do i need to mask the grub-2.02_beta2-r3? Thanks in advance :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...