yaboot cannot handle kernels and/or initrds >6MB uncompressed for netbooting

Bug #26426 reported by Rick Altherr
42
This bug affects 3 people
Affects Status Importance Assigned to Milestone
yaboot-installer
Fix Released
Unknown
yaboot (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

With 5.10, the netboot images for powerpc and powerpc64 have exceeded 6MB uncompressed for either the kernel
(powerpc64) or the ramdisk (powerpc). Yaboot is unable to do a netboot with those images since they exceed a
limitation within yaboot that limits the uncompressed images to 6MB each. Ideally, work on yaboot2 will be
completed and this limitation will be removed, but in the meantime, the kernel and ramdisk images need to be pruned
for netbooting.

Revision history for this message
Colin Watson (cjwatson) wrote :

Are you sure it's 6MB *un*compressed? I'm pretty sure that it's a limit on the
compressed size, since yaboot doesn't decompress the initrd itself. That makes
the problem rather more tractable; in fact, at the moment the Dapper netboot
images fit within that limit, although I should leave this bug open to make sure
it stays that way.

Revision history for this message
Rick Altherr (kc8apf) wrote :

(In reply to comment #1)
> Are you sure it's 6MB *un*compressed? I'm pretty sure that it's a limit on the
> compressed size, since yaboot doesn't decompress the initrd itself. That makes
> the problem rather more tractable; in fact, at the moment the Dapper netboot
> images fit within that limit, although I should leave this bug open to make sure
> it stays that way.

It could be the compressed size, but the yaboot team claims that the max is roughly 6.1MB. The 64-bit kernel fails
to load at all (LOAD failed error message) meaning that it ran out of space. The vmlinux image is exactly 6.1MB.

Revision history for this message
Colin Watson (cjwatson) wrote :

The source I'm looking at says 0x600000 which == 6MB.

Anyway, try Dapper netboot ...

Revision history for this message
Colin Watson (cjwatson) wrote :

(In reply to comment #3)
> The source I'm looking at says 0x600000 which == 6MB.
>
> Anyway, try Dapper netboot ...

Oh, the powerpc64 vmlinux is too big. That's harder to do anything about.
Perhaps the kernel team can comment?

Revision history for this message
Ben Collins (ben-collins) wrote :

(In reply to comment #4)
> (In reply to comment #3)
> > The source I'm looking at says 0x600000 which == 6MB.
> >
> > Anyway, try Dapper netboot ...
>
> Oh, the powerpc64 vmlinux is too big. That's harder to do anything about.
> Perhaps the kernel team can comment?

Not much I can do about this. Things are about as modular as they can be. Dapper
2.6.15 kernels were based on breezy configs, and new drivers were just made modular.

As for initrd, that's a matter for the initramfs-tools. My G4's initramfs is
7Megs compress (heck, I have some machines that are 11Megs compressed).

Even if some things were made modular, they are most likely things that when
moved from the kernel, will have to be placed in the initrd. So there's a catch-22.

Revision history for this message
Rick Altherr (kc8apf) wrote :

(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > The source I'm looking at says 0x600000 which == 6MB.
> > >
> > > Anyway, try Dapper netboot ...
> >
> > Oh, the powerpc64 vmlinux is too big. That's harder to do anything about.
> > Perhaps the kernel team can comment?
>
> Not much I can do about this. Things are about as modular as they can be. Dapper
> 2.6.15 kernels were based on breezy configs, and new drivers were just made modular.
>
> As for initrd, that's a matter for the initramfs-tools. My G4's initramfs is
> 7Megs compress (heck, I have some machines that are 11Megs compressed).
>
> Even if some things were made modular, they are most likely things that when
> moved from the kernel, will have to be placed in the initrd. So there's a catch-22.

Could a reduced kernel/image be made specifically for netboot installs? The 6MB limit only applies to netbooting.
Once the OS is installed, the image can be any size.

Revision history for this message
Colin Watson (cjwatson) wrote :

(In reply to comment #6)
> Could a reduced kernel/image be made specifically for netboot installs?

No, not really. The "same vmlinux for installer and installed system" thing is a
relatively deeply embedded assumption (different optimisation is possible, but
the hardware support really needs to not vary too wildly), and the "same vmlinux
for netboot installs and CD-ROM installs" thing is a *very* deeply embedded
assumption.

The only way to do this, really, would be to construct a separate kernel config
which is the default installed-system config for powerpc64, and then have a more
complete config that one could install later (more kernels on the powerpc
install CD being infeasible for CD-space reasons); however I suspect without
proof that we would do that at the loss of hardware compatibility in the
installer, and that would affect CD-ROM installs too unless we do some fairly
serious reengineering which I'm loath to do.

Revision history for this message
Oliver Grawert (ogra) wrote :

This bug also affects LTSP. Since LTSP uses a nfs root and only needs the yaboot
loaded initramfs to mount the nfs root blockdevice drivers can be supressed in
the particular netboot initramfs. The attached patch adds a "noblock" modules
option to mkinitramfs, so you can easily have a small netbootable initramfs by
setting MODULES=noblock in /etc/mkinitramfs/initramfs.conf and recreating the
initrd.img. The new hardwaredetection in dapper cares for blockdevice module
loading after the nfsroot is mounted, so ide and scsi drivers get loaded as
usual from /lib/modules in the later bootprocess... A nice side effect is that
the loading of a ~2MB smaller initramfs speeds up the netbooting a lot.

Revision history for this message
Oliver Grawert (ogra) wrote :

Created an attachment (id=5494)
initramfs-tools.patch

Revision history for this message
Carthik Sharma (carthik) wrote :

Confirming this, and Ogra seems to have a patch too. Thank you, folks.

Changed in yaboot:
status: Unconfirmed → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

Oliver's patch is not sufficient for this bug; it's been moved to a separate more appropriate bug anyway.

Revision history for this message
Carl Karsten (carlfk) wrote :

Just tried to use netboot to install to a PowerBook G4 - guessing I ran into this bug.

Transfer FILE: initrd.gz method 'load' failed 00000300
ramdisk load failed !
 ok

http://archive.ubuntu.com/ubuntu/dists/edgy/main/installer-powerpc/20060711ubuntu18/images/powerpc/netboot/
initrd.gz 21-Oct-2006 01:41 6.6M

>> Could a reduced kernel/image be made specifically for netboot installs?
> No, not really. The "same vmlinux for installer and installed system" thing is a relatively deeply embedded assumption

How about 3? one different set that uses tftp/kexec to boot the installer, which would be the same as the installed system?

So the installer could still rely on the full kernel/initrd.gz - but there would be a small one that was just there to get the full one loaded.

Colin Watson (cjwatson)
Changed in yaboot:
assignee: kamion → nobody
Revision history for this message
Philipp Kern (pkern) wrote :

Please remove the netboot images from the powerpc distribution. It does not work (tested with Gutsy), although one might think that by the sheer presence of those files.

Revision history for this message
Matt Sealey (mwsealey) wrote :

I heartily disagree with Philipp, the netboot images do boot on some systems - Pegasos and Efika are perfectly capable of combining these images (uncompressed!) and loading them as is GRUB.

Removing netboot images means removing netboot functionality, and right now that's the best way we can get these images for our users. If there is ever any official Pegasos or Efika kernel support [that works] and we can organise our boot loader situation, they *will* work for a certain subset of users.

I'm curious of this talk of "yaboot2", is this serious? What on earth is the point? :D

Revision history for this message
didier (did447-deactivatedaccount) wrote : Re: [Bug 26426] Re: yaboot cannot handle kernels and/or initrds >6MB uncompressed for netbooting

Hi,

On yaboot mailing list there's a patch for netboot > 6MB.

BTW how do we put a newer yaboot, latest SVN version should solve 90%
of Ubuntu pbs...

Revision history for this message
Philipp Kern (pkern) wrote :

Where does that SVN live?

Revision history for this message
didier (did447-deactivatedaccount) wrote :

My mistake it's rather a git repository:

git://ozlabs.org/srv/projects/yaboot/yaboot

Revision history for this message
Kenneth Finnegan (kennethfinnegan2007) wrote :

Got tired of waiting, so I found the patch mentioned by didier for >6MB netboot.
Applied it to 1.3.13a-1ubuntu4 from apt (couldn't get vanilla to compile). Attached is my binary from that. I also posted the patch applied in bzr: https://code.launchpad.net/~kennethfinnegan2007/+junk/yaboot

I'm currently netbooting Hardy on my G3, so it works as far as I can tell.

Revision history for this message
TJ (tj) wrote :

This issue affects Lucid on G3 iMacs too.

Installing Kenneth Finnegan's yaboot binary from comment #18 to the TFTP server solves the issue. Both vmlinuz and initrd load, and the kernel starts. Sizes are:

/var/lib/tftpboot$ ls -l iso-image/ubuntu-10.04-desktop-powerpc/casper/powerpc/
total 18360
-r--r--r-- 2 root root 9241444 2010-04-28 14:37 initrd
-r--r--r-- 2 root root 9558100 2010-04-16 12:44 vmlinux

/var/lib/tftpboot$ ls -l yaboot*
-r--r--r-- 1 root root 163886 2010-05-18 06:18 yaboot
-rw-r--r-- 1 root root 295 2010-05-18 05:26 yaboot.conf

/var/lib/tftpboot$ cat yaboot.conf
device=enet:
partition=0
timeout=60
init-message="Ubuntu GNU/Linux NetBoot"
default=ubuntu-10.04-desktop-powerpc

image=/iso-image/ubuntu-10.04-desktop-powerpc/casper/powerpc/vmlinux
    label=ubuntu-10.04-desktop-powerpc
    initrd=/iso-image/ubuntu-10.04-desktop-powerpc/casper/powerpc/initrd

This currently boots to busybox since I've not yet added the NFS root to the kernel's command-line, but hopefully it will help others.

Revision history for this message
TJ (tj) wrote :

In case it helps someone else, here's the complete yaboot.conf from my TFTP server that leads to an iBook G3 starting the Live CD environment.

The TFTP server is combined with NFS and loop-mounted Ubuntu ISO images.

/var/lib/tftpboot$ cat yaboot.conf
device=enet:
partition=0
timeout=60
init-message="Ubuntu GNU/Linux NetBoot"
default=ubuntu-10.04-desktop-powerpc

image=/iso-image/ubuntu-10.04-desktop-powerpc/casper/powerpc/vmlinux
    label=ubuntu-10.04-desktop-powerpc
    initrd=/iso-image/ubuntu-10.04-desktop-powerpc/casper/powerpc/initrd
    append="boot=casper netboot=nfs nfsroot=10.254.251.2:/srv/boot/iso-image/ubuntu-10.04-desktop-powerpc"

I have a sophisticated shell script that auto-configures a PXE environment for multiple Intel ISO images. Here's the resulting configuration just for the PPC ISO images:

$ sudo losetup -a
/dev/loop4: [fb03]:262152 (/home/all/iso-image/ubuntu/ubuntu-10.04-desktop-powerpc.iso)

$ mount
/dev/loop4 on /var/lib/tftpboot/iso-image/ubuntu-10.04-desktop-powerpc type iso9660 (rw)
/var/lib/tftpboot/iso-image/ubuntu-10.04-desktop-powerpc on /srv/boot/iso-image/ubuntu-10.04-desktop-powerpc type none (rw,bind)

$ sudo exportfs
/srv/boot/iso-image/ubuntu-10.04-desktop-powerpc
  0.0.0.0/0.0.0.0

Revision history for this message
Vagrant Cascadian (vagrantc) wrote :

the 6MB limit appears to be fixed in recent versions of yaboot, but now there's a 16MB, and the ubuntu 12.04 powerpc64 kernels are larger than this...

Changed in yaboot-installer:
status: Unknown → New
Changed in yaboot-installer:
status: New → Confirmed
Changed in yaboot-installer:
status: Confirmed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote :

Current yaboot boots our current giant images just fine.

Changed in yaboot (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.