Summary: | sys-kernel/genkernel-3.4.19 docache doesn't work when pxe booting | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Richard Scott <gentoo.bugs> |
Component: | genkernel | Assignee: | Gentoo Genkernel Maintainers <genkernel> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Screenshot of a PXE booted system
Screenshot of a PXE booted system A patch to fix the docache issue busybox NFS patch |
Created attachment 291835 [details]
Screenshot of a PXE booted system
*** Bug 390073 has been marked as a duplicate of this bug. *** now works for me. I've re-opened this bug as it still exists. I'm using this in my pxelinux.cfg/default file: LABEL h64 kernel k64 append loop=d64 initrd=i64 looptype=squashfs doacpi nolvm nomdadm doscsi ip=dhcp cdroot real_root=/dev/nfs nfsroot=10.254.0.1:/var/tftproot/media acpi_enforce_resources=lax vga=789 scandelay=0 docache Without the "docache" entry, things work fine. Created attachment 293499 [details, diff]
A patch to fix the docache issue
This change workes for me... it may not be the correct change tho.
ok, cancel that... the patch allows you to boot, but the squashfs image is mounted in an unmountable place so things lock up when powering off or rebooting. I tried to boot the newest install-x86-minimal-20120306.iso with "docache" and this results in Kernel panic: See screenshot @ http://oi41.tinypic.com/2s9bus7.jpg Is there any chance that someone could confirm this bug as its a real show stopper for me. Other users are having the same problem now: http://forums.gentoo.org/viewtopic-t-912898-highlight-.html Should be fixed, please give branch fix-docache [1] a try .. # git clone git://git.overlays.gentoo.org/proj/genkernel.git # cd genkernel # git checkout -t origin/fix-docache # GK_SHARE="$PWD" ./genkernel initramfs --no-install --no-postclear .. and report back. [1] http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=fix-docache (In reply to comment #9) > .. and report back. Hi, I'm sorry to say that its still broken. The boot errors on trying to mount the nfs share on /mnt/cdrom Rich (In reply to comment #10) > Hi, I'm sorry to say that its still broken. The boot errors on trying to > mount the nfs share on /mnt/cdrom I'm puzzled: Does it do that without docache? In the diff from 3.4.18 to 3.4.19 I found: + 08 Oct 2011; Fabio Erculiani <lxnay@gentoo.org> defaults/initrd.defaults, + defaults/initrd.scripts, defaults/linuxrc: + Do not hardcode /mnt/cdrom path across the whole code, use CDROOT_PATH + instead. At the same time, mount cdrom into /mnt/cdrom instead of + /newroot/mnt/cdrom (which is now just a bind mount), this avoids + losetup to expose unavailable paths inside the live system, breaking + mkfs.btrfs (next upstream version, which does silly things with + /proc/mounts). I guess that's related. I welcome patches if you get to debugging this before me. I'm sorry to say that all methods for PXE are still broken in the genkernel version I've just pulled from git. It borks at mounting my squashfs image over nfs on /mnt/cdrom. This is the same issue other (older) genkernels are having (not sure if that'll help). Here's my history as I know it. 3.4.18 pxe worked with and without docache 3.4.19 - 3.4.20 pxe only worked without docache 3.4.24 - 3.4.27 pxe doesn't work with or without docache It seems to be the new code that mounts things at /mnt/cdrom as from here on it fails at mounting the squashfs image over nfs at /mnt/cdrom. This is the entry I have in my pxelinux.cfg/default file... is this still correct: kernel k64 append loop=d64 root=/dev/ram0 initrd=i64 looptype=squashfs doacpi nolvm nomdadm doscsi ip=dhcp cdroot real_root=/dev/nfs nfsroot=10.254.0.1:/var/tftproot/media acpi_enforce_resources=lax scandelay=0 vga=789 Rich In case you get to trying your scenario with sys-kernel/dracut please report back if dracut supports it or not. (In reply to comment #13) > In case you get to trying your scenario with sys-kernel/dracut please report > back if dracut supports it or not. I may be wrong as I've only googled, but as far as I can tell Dracut doesn't support caching of the entire root squashfs image in ram on the PXE booted node. This is the one feature that I need the most as without it I'm unable to disconnect the diskless node from the network once its booted i.e. to change network settings or setup interface bonding etc. Is that sceneraio of yours supported anywhere else, yet? Have you considered making a custom initramfs for your needs? I'm afraid to get it into genkernel you'll need to get into genkernel yourself. Far enough so that I trust your patches without testing them for hours myself. There's no test suite as of now and changes about stuff that I am rather new to have much potential to break stuff for whole classes of other use cases. (In reply to comment #15) > Is that sceneraio of yours supported anywhere else, yet? Yes, both Fedora and Ubuntu support caching of the image in RAM and PXE booting. > Have you considered making a custom initramfs for your needs? I currenty use genkernel-3.4.18 as it already has this feature built into it so I don't see the need (or have the time) to create a custom file. > I'm afraid to get it into genkernel you'll need to get into genkernel > yourself. Far enough so that I trust your patches without testing them for > hours myself. That's fair enough, i'm not expecing you to do all the work ;-) However, the feature is already in genkernel-3.4.18 but has been broken since genkernel-3.4.19 I'll have a dig around in the latest release from Git to see if I can figure out what's gone wrong. Thanks for taking time to look at this bug report. Rich OK, I've had a poke about in genkernel-3.4.37 (and also double checked this in the Git release). The first fix that has enabled mounting the NFS share to work. It's a tweak to the busybox kernel config: > /usr/share/genkernel/defaults/busy-config > CONFIG_FEATURE_MOUNT_NFS=y I still have the error with the docache option: >> Mounting squashfs filesystem mount: mounting /mnt/cdrom/../d64 on /newroot/mnt/livecd failed: no such file or directory The "d64" file is my squashfs loop image. I'll see if I can figure this one out too. Rich. ok, i've found a fix, not sure if its correct tho.
Basically in initrd.scripts the cache_cd_contents function is copying the LOOP file into a different place.
I've just changed this:
> /usr/share/genkernel/defaults/initrd.scripts
> #cp -a ${CDROOT_PATH}/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
> cp -a ${CDROOT_PATH}/${LOOP} ${CDROOT_PATH}/../${LOOP}
This seems to work ok fore me apart from an error about unmounting /mnt/cdrom when I shut down the booted node.
Rich
Created attachment 306931 [details]
busybox NFS patch
A patch to /usr/share/genkernel/defaults/busybox to enable NFS
(In reply to comment #19) > Created attachment 306931 [details] > busybox NFS patch > > A patch to /usr/share/genkernel/defaults/busybox to enable NFS I'm afraid I cannot apply that. See <http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=b977d66940fdbbe552bb735a54141b69da873b5b> for details. |
Created attachment 291833 [details] Screenshot of a PXE booted system When booting a LiveCD via PXE, you can't use the "docache" option if you've made the CD's kernel with genkernel-3.4.19. genkernel-3.4.18 works perfectly.