[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#805965: boot-s390-common, d390.ins: initrd overwrites kernel due to a low offset



On Tue, Nov 24, 2015 at 01:00:13PM +0000, Steve McIntyre wrote:
> On Tue, Nov 24, 2015 at 12:38:16PM +0100, Hendrik Brueckner wrote:
> >Package: debian-cd
> >Version: 3.1.17
> >Severity: important
> >
> >Dear debian-cd Maintainers,
> >
> >I recently encountered a problem at the installation of Debian on s390:
> >
> >The d390.ins specifies where to load the kernel image and the initrd into
> >memory.  The current d390.ins uses:
> >
> >--------------------------------------------------------------
> >* Debian GNU/Linux for S/390 (boot from CD-ROM or FTP-Server)
> >linux_vm 0x00000000
> >root.off 0x0001040c
> >root.siz 0x00010414
> >parmfile 0x00010480
> >root.bin 0x00800000
> >--------------------------------------------------------------
> >
> >The size of the linux_vm is about 11M and the initrd is loaded at
> >the memory address 0x00800000 (8M) which overrides the kernel image.
> >A result, the kernel and debian installer cannot be started on logical
> >partitions (LPAR) on z Systems.
> >
> >To correct this problem, please update the memory location to which
> >the initrd is loaded from 0x00800000 (8M) to 0x02000000 (32MB).
> >
> >The 0x02000000 memory location is the preferred and commonly used
> >memory location.   As far as I could see, this affects all d390.ins
> >files, as well as, the boot-s390-common files which create the
> >root.off file.
> 
> ACK, thanks for your report. In fact, just 2 weeks back Philipp Kern
> (in CC) has added some fixes in this exact area in debian-cd
> git. He's moved the root.bin up to 0x01000000 (16MB); I'd be happy to
> move it up to 0x02000000 as you suggest. Phil - what do you think?

Actually, the best solution would be to calculate this offset dynamically,
and write the modified root.off and d390.ins file.  For the initrd offset
calcuation, take the size of the vmlinuz kernel image + 4MB (0x00400000).

The 4MB just adds some place for the kernel BSS section.  It is not
strictly necessary, as the kernel moves the initrd out of its BSS
section before it clearing it.

This would be the better solution and it works even if the kernel grows
over time.

> 
> I'm also going to make sure the fixes are backported to our stable
> build tree for the next point release.

Thanks.  For backports, it should be sufficient to increase the offset
for current and future, we might consider the dynamic approach above.

Thanks and kind regards,
  Hendrik


Reply to: