[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patching grub-0.92 with lvm-diff fails (ref. Bug report #977)
From: |
Erich Waelde |
Subject: |
patching grub-0.92 with lvm-diff fails (ref. Bug report #977) |
Date: |
Wed, 6 Nov 2002 12:59:30 +0100 |
Hi all,
I have Linux running on scsi+md+raid1+lvm+ext3 and ide+lvm+reiserfs.
The /boot partition resides outside of lvm, I hacked mkinitrd and
lvmcreate_initrd to create initrd images with all modules and
executables needed. So far, so nice.
As others, too, I would like to have /boot reside in lvm as well.
The order of lvols on disk (/boot, swap, / --- all contiguous)
would be just fine with me. However, I prefer grub over lilo.
When searching I found a patch by J"org Walter on the grub home page
http://savannah.gnu.org/projects/grub/
listed as bug report # 977
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=977&group_id=68
md5sum:
0f36630c321312f8e5369af8ca89ba76 grub-lvm.diff
50f2786e7bf96b1115ee82b9c101a816 grub-0.92.tar.gz
Unfortunately the posting does not mention the exact version
of grub it was applied to. However, the diff mentions "grub-0.92"
in the file names, e.g.:
diff -rubBP -x ltmain.sh -x ...
--- /home/tmp/portage/grub-0.92/work/grub-0.92/ChangeLog Thu Aug 8
20:54:29 2002
+++ grub-0.92/ChangeLog Sun Aug 11 14:17:55 2002
Unfortunately the patch does not apply cleanly:
ls -l
-rw------- 1 ew users 877112 Oct 27 09:26
grub-0.92.tar.gz
-rw------- 1 ew users 39578 Oct 27 09:23 grub-lvm.diff
tar xzf grub-0.92.tar.gz
...
patch -p0 -bl -V t --verbose < grub-lvm.diff | tee patch.log
...
Did I do something stupid, like trying to patch the wrong version ?
A closer look at the *.rej files indeed suggests that patch does
not find what it expects (see ./grub-0.92/lib/device.c).
Does someone know what the problem is? Is a solution available? Or can
I help other than trying to hack the source code ?
Any help is appreciated,
Erich
please find appended:
1. patch.log
2. the rejected context diffs
./grub-0.92/configure.in.rej
./grub-0.92/stage2/Makefile.am.rej
./grub-0.92/lib/device.c.rej
---snip-8<------------------------------------------------------------
patch.log:
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/ChangeLog grub-0.92/ChangeLog
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/ChangeLog Thu Aug 8
20:54:29 2002
|+++ grub-0.92/ChangeLog Sun Aug 11 14:17:55 2002
--------------------------
Patching file grub-0.92/ChangeLog using Plan A...
Hunk #1 succeeded at 1.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/config.h.in
grub-0.92/config.h.in
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/config.h.in Tue Apr 16
00:09:16 2002
|+++ grub-0.92/config.h.in Sun Aug 11 15:07:27 2002
--------------------------
Patching file grub-0.92/config.h.in using Plan A...
Hunk #1 succeeded at 47.
Hunk #2 succeeded at 86.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/configure.in
grub-0.92/configure.in
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/configure.in Thu Aug 8
20:54:29 2002
|+++ grub-0.92/configure.in Sun Aug 11 15:16:21 2002
--------------------------
Patching file grub-0.92/configure.in using Plan A...
Hunk #1 FAILED at 110.
Hunk #2 succeeded at 185 (offset -1 lines).
1 out of 2 hunks FAILED -- saving rejects to file
grub-0.92/configure.in.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/docs/grub.texi
grub-0.92/docs/grub.texi
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/docs/grub.texi Thu Aug
8 20:54:29 2002
|+++ grub-0.92/docs/grub.texi Sun Aug 11 14:17:50 2002
--------------------------
Patching file grub-0.92/docs/grub.texi using Plan A...
Hunk #1 succeeded at 406.
Hunk #2 succeeded at 1576.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/lib/device.c
grub-0.92/lib/device.c
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/lib/device.c Thu Aug 8
20:54:29 2002
|+++ grub-0.92/lib/device.c Sun Aug 11 14:45:26 2002
--------------------------
Patching file grub-0.92/lib/device.c using Plan A...
Hunk #1 succeeded at 648.
Hunk #2 FAILED at 680.
1 out of 2 hunks FAILED -- saving rejects to file
grub-0.92/lib/device.c.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/stage2/Makefile.am
grub-0.92/stage2/Makefile.am
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/stage2/Makefile.am Thu
Aug 8 20:54:29 2002
|+++ grub-0.92/stage2/Makefile.am Sun Aug 11 14:17:54 2002
--------------------------
Patching file grub-0.92/stage2/Makefile.am using Plan A...
Hunk #1 succeeded at 17.
Hunk #2 succeeded at 85 with fuzz 2.
Hunk #3 succeeded at 123 with fuzz 1.
Hunk #4 succeeded at 132 with fuzz 1.
Hunk #5 FAILED at 141.
Hunk #6 succeeded at 159 with fuzz 1.
Hunk #7 succeeded at 168 with fuzz 1.
Hunk #8 succeeded at 177 with fuzz 1.
Hunk #9 succeeded at 186 with fuzz 1.
1 out of 9 hunks FAILED -- saving rejects to file
grub-0.92/stage2/Makefile.am.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/stage2/builtins.c
grub-0.92/stage2/builtins.c
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/stage2/builtins.c Thu
Aug 8 20:54:29 2002
|+++ grub-0.92/stage2/builtins.c Sun Aug 11 14:47:46 2002
--------------------------
Patching file grub-0.92/stage2/builtins.c using Plan A...
Hunk #1 succeeded at 1225 (offset -115 lines).
Hunk #2 succeeded at 3109 (offset -148 lines).
Hunk #3 succeeded at 3750 (offset -326 lines).
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/stage2/char_io.c
grub-0.92/stage2/char_io.c
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/stage2/char_io.c Thu
Aug 8 20:54:29 2002
|+++ grub-0.92/stage2/char_io.c Sun Aug 11 14:44:23 2002
--------------------------
Patching file grub-0.92/stage2/char_io.c using Plan A...
Hunk #1 succeeded at 1029.
Hunk #2 succeeded at 1046.
Hunk #3 succeeded at 1403.
Hunk #4 succeeded at 1415.
Hunk #5 succeeded at 1506.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/stage2/disk_io.c
grub-0.92/stage2/disk_io.c
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/stage2/disk_io.c Thu
Aug 8 20:54:29 2002
|+++ grub-0.92/stage2/disk_io.c Sun Aug 11 15:18:53 2002
--------------------------
Patching file grub-0.92/stage2/disk_io.c using Plan A...
Hunk #1 succeeded at 34.
Hunk #2 succeeded at 126.
Hunk #3 succeeded at 299.
Hunk #4 succeeded at 368.
Hunk #5 succeeded at 688.
Hunk #6 succeeded at 753.
Hunk #7 succeeded at 919.
Hunk #8 succeeded at 959.
Hunk #9 succeeded at 1103.
Hunk #10 succeeded at 1153.
Hunk #11 succeeded at 1217.
Hunk #12 succeeded at 1326.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/stage2/linuxlvm.c
grub-0.92/stage2/linuxlvm.c
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/stage2/linuxlvm.c Thu
Jan 1 01:00:00 1970
|+++ grub-0.92/stage2/linuxlvm.c Sun Aug 11 14:56:34 2002
--------------------------
Patching file grub-0.92/stage2/linuxlvm.c using Plan A...
Hunk #1 succeeded at 1.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -rubBP -x ltmain.sh -x aclocal.m4 -x Makefile.in -x configure
/home/tmp/portage/grub-0.92/work/grub-0.92/stage2/shared.h
grub-0.92/stage2/shared.h
|--- /home/tmp/portage/grub-0.92/work/grub-0.92/stage2/shared.h Thu Aug
8 20:54:29 2002
|+++ grub-0.92/stage2/shared.h Sun Aug 11 15:20:21 2002
--------------------------
Patching file grub-0.92/stage2/shared.h using Plan A...
Hunk #1 succeeded at 837 (offset -69 lines).
Hunk #2 succeeded at 925 (offset -69 lines).
done
---snip-8<------------------------------------------------------------
./grub-0.92/configure.in.rej:
***************
*** 110,116 ****
])
# Force no alignment to save space.
- CPPFLAGS="$CPPFLAGS -falign-jumps=1 -falign-loops=1
-falign-functions=1"
if test "x$undef_flag" = xyes; then
CPPFLAGS="$CPPFLAGS -Wundef"
--- 110,116 ----
])
# Force no alignment to save space.
+ CPPFLAGS="$CPPFLAGS -malign-jumps=0 -malign-loops=0
-malign-functions=0"
if test "x$undef_flag" = xyes; then
CPPFLAGS="$CPPFLAGS -Wundef"
---snip-8<------------------------------------------------------------
./grub-0.92/stage2/Makefile.am.rej:
***************
*** 141,156 ****
# For ffs_stage1_5 target.
ffs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c disk_io.c
\
- stage1_5.c fsys_ffs.c bios.c
ffs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
- -DNO_BLOCK_FILES=1
ffs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
-DNO_BLOCK_FILES=1
ffs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
# For minix_stage1_5 target.
minix_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c
disk_io.c \
- stage1_5.c fsys_minix.c bios.c
minix_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
-DNO_BLOCK_FILES=1
minix_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
--- 141,156 ----
# For ffs_stage1_5 target.
ffs_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c disk_io.c
\
+ stage1_5.c fsys_ffs.c bios.c linuxlvm.c
ffs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
+ -DNO_BLOCK_FILES=1 -DNO_LVM_IN_STAGE1_5=1
ffs_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
-DNO_BLOCK_FILES=1
ffs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
# For minix_stage1_5 target.
minix_stage1_5_exec_SOURCES = start.S asm.S common.c char_io.c
disk_io.c \
+ stage1_5.c fsys_minix.c bios.c linuxlvm.c
minix_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
-DNO_BLOCK_FILES=1
minix_stage1_5_exec_CCASFLAGS = $(STAGE1_5_COMPILE) -DFSYS_MINIX=1 \
---snip-8<------------------------------------------------------------
./grub-0.92/lib/device.c.rej:
***************
*** 671,676 ****
strncmp(dev, "/dev/cciss/", 11) == 0 ||
strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
((partition >> 16) & 0xFF) + 1);
/* Open the partition. */
fd = open (dev, O_RDWR);
--- 680,686 ----
strncmp(dev, "/dev/cciss/", 11) == 0 ||
strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
((partition >> 16) & 0xFF) + 1);
+ }
/* Open the partition. */
fd = open (dev, O_RDWR);
- patching grub-0.92 with lvm-diff fails (ref. Bug report #977),
Erich Waelde <=