Opened 16 years ago
Closed 15 years ago
#353 closed defect (fixed)
Mindi/GetInitrdFileSystemToUse fails on Zenwalk 6.2/kernel 2.6.30.5
Reported by: | Son|c | Owned by: | Bruno Cornec |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.9 |
Component: | mindi | Version: | 2.2.8 |
Severity: | normal | Keywords: | |
Cc: |
Description
Hi,
On Zenwalk 6.2 (Slackware based distro) and its 2.6.30.5 kernel, mindi fails to detect filesystem to use for inirtrd (function GetInirtrdFileSystemToUse).
The problem lies in :
root[~]# od -vA n -t x1 /boot/vmlinuz-2.6.30.5 | tr -d '[:space:]' | awk '{ print match($0,"1f8b0800")}'
Which returns 0.
When Hardcoding :
gvFileSystem="initramfs"
All runs well.
Change History (11)
comment:1 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This should not do the trick, as the problem lies before in the code.
As mentionned, mindi terminates because in what follows, lvOffset equals 0 :
# get offet of gzip magic "1f8b0800" in file lvOffset=`od -vA n -t x1 $lvKernelImage | tr -d '[:space:]' | awk '{ print match($0, "1f8b0800")}'` [ $lvOffset -eq 0 ] && Die "gzip magic not found in file $lvKernelImage. Terminating."
and I get the "gzip magic not found ...". So it's definitely not a problem of matching the value of lvScanRes against lcMagicInitfs as done later in the code :
# scan kernel image for initrd filessystem support lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicInitfs"`
I'll try to figure out a way to get the correct value for lvOffset from my kernel.
Thanks for your help
comment:3 by , 16 years ago
Could you check that the problem described here #354 is not the same as yours ? Abd also try the proposed patch ?
comment:4 by , 16 years ago
Hi,
This is not the same problem, as my kernel supports initramfs (cpio+gzip) and that's what we use by default in our initrd. The problem lies in the way you find this information in the kernel, via the "od -vA ..." command. Indeed this fails with my kernel. Btw, I did not find anything regarding this method and this "magic" value of 0x1f8b0800 anywhere. I guess by looking at the code that this should give you the binary offset of the location in the kernel of a relevant message which you try to match ... but is it supposed to work on any kernel (indeed it's not ... :)) in a generic manner ?
In the end, it's not really blocking in my case as far as when packaging mondo & al. for my distro I can set the value in mindi's code to the working "initramfs".
Anyway thanks for your help
comment:5 by , 16 years ago
Sorry, I wasn't sure whether you had initramfs initrd or a files system based one, and look just rapidly at the err msg.
The sequence which was provided at least worked up to 2.6.29 kernels. So now I need to look at what has changed in 2.6.30 making it incomatible with this magic value.
Some details are provided here: http://www.h-online.com/open/Kernel-Log-What-s-coming-in-2-6-30-Architecture-and-infrastructure--/news/113469
comment:6 by , 16 years ago
And the code modifications in the kernel seems to be at http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=30d65dbfe3add7f010a075991dc0bfeaebb7d9e1
comment:7 by , 15 years ago
I tried to add support for the other compression tools available now in 2.6.30 as reported in previous code ref.
Could you try to see if latest mindi-2.0.7 fix it (ftp://ftp.mondorescue.org/test/src/mindi-2.0.7.tar.gz)
If not, then could you attach your kernel to this BR please.
comment:8 by , 15 years ago
Hi Bruno,
I'm sorry but no way :
Call GetInitrdFilesystemToUse() with parameter /boot/vmlinuz-2.6.30.5 to get filesystem to use for initrd. GetInitrdFilesystemToUse(): called with parameter: /boot/vmlinuz-2.6.30.5.\n GetInitrdFilesystemToUse(): bzip2 magic found in /boot/vmlinuz-2.6.30.5 at lvOffset 41235.\n GetInitrdFilesystemToUse(): Filesytem to use for initrd is UNSUPPORTED.\n FATAL ERROR. Filesystem UNSUPPORTED not supported for initrd image. Terminating.
You can download the kernel I use here : http://download.zenwalk.org/people/emmanuel/vmlinuz
Thx for your help.
Emmanuel
comment:9 by , 15 years ago
Indeed the modifciations made in mindi do not work :-( I'm working on this today.
comment:10 by , 15 years ago
Should be fixed for good in [2429]. Mindi wanted to be too precise, which is not needed and leaded to those errors. Could you try again with the latest mondo+mindi from ftp://ftp.mondorescue.org/test/src please ?
comment:11 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Hi Bruno,
This seems to do the trick :
Call GetInitrdFilesystemToUse() with parameter /boot/vmlinuz-2.6.30.5 to get filesystem to use for initrd. GetInitrdFilesystemToUse(): called with parameter: /boot/vmlinuz-2.6.30.5.\n GetInitrdFilesystemToUse(): Filesytem to use for initial ram disk is initramfs.\n Creating a gzip'ed cpio (AKA initramfs) initrd image... ...done.
I'll take a look at your changes in order to discover the magic which is behind all this :) Closing the ticket now.
Thanks for your help.
Has been normaly fixed in mindi 2.0.7 (Cf: [2311]). You can try the latest beta versions of mindi + mondo at ftp://ftp.mondorescue.org/test to validate it. Or backport that simple fix in your current mindi version.