Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 246759 - Booting LiveCD via PXE/NFS
Summary: Booting LiveCD via PXE/NFS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
: 236606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-14 17:42 UTC by Richard Scott
Modified: 2010-12-10 08:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
a linuxrc diff file (linuxrc.txt,564 bytes, text/plain)
2008-11-14 17:44 UTC, Richard Scott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scott 2008-11-14 17:42:44 UTC
Hi,

I have been trying to get booting a LiveCD via PXE to work and I wnated to report what I think is a bug in genkernels linuxrc script.

My setup:
I have a HP Laptop and a Gentoo server configured for DHCP, TFTP and NFS.

I have with the following in my /tftproot/pxelinux.cfg/default file:

DEFAULT /kernel
append loop=/default root=/dev/ram0 init=/linuxrc looptype=squashfs doscsi doslowusb nonfs doapm nolvm initrd=/initramfs console=tty1 vga=0x317 ip=dhcp nfsroot=192.168.200.8:/tftproot/nfs cdroot=1 real_root=/dev/nfs

I have the following files in my /tftproot directory:

# find /tftproot
/tftproot
/tftproot/nfs
/tftproot/nfs/default
/tftproot/pxelinux.0
/tftproot/initramfs
/tftproot/kernel
/tftproot/pxelinux.cfg
/tftproot/pxelinux.cfg/default

Some of these files I have coppied from the LiveCD image:

LiveCD/isolinux/gentoo -> /tftproot/kernel
LiveCD/isolinux/gentoo.igz -> /tftproot/initramfs
LiveCD/image.squashfs -> /tftproot/nfs/default

To get this all to work correctly I need to make a change to the linuxrc file as it forgets to check for NFS usage at one vital point when mounting the SquashFS file.

I have been using this tool to help unpack the initramfs:
http://oliver.net.au/files/initrdextract.sh

Anyway, I need to edit the following in the initramfs file: linuxrc

# diff linuxrc /usr/share/genkernel/generic/linuxrc -u
--- linuxrc     2008-11-14 16:50:37.000000000 +0000
+++ /usr/share/genkernel/generic/linuxrc        2008-11-14 01:07:35.000000000 +0000
@@ -404,7 +404,7 @@
                # else not a good root and start over.
                if [ "$?" = '0' ]
                then
-                       if [ -d ${NEW_ROOT}/dev -a -x ${NEW_ROOT}/sbin/init ] || [ "${REAL_ROOT}" = "/dev/nfs" ]
+                       if [ -d ${NEW_ROOT}/dev -a -x ${NEW_ROOT}/sbin/init ]
                        then
                                break
                        else

This enables me to boot correctly the LiveCD image via NFS.

This fix is applicable to sys-kernel/genkernel-3.4.10-r1

Reproducible: Always

Steps to Reproduce:
Comment 1 Richard Scott 2008-11-14 17:44:55 UTC
Created attachment 171732 [details]
a linuxrc diff file

A Diff file with the files the correct way round this time :-)
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-14 17:57:05 UTC
This is fixed in git. Thanks.
Comment 3 Richard Scott 2008-11-14 18:00:43 UTC
Wow, that was quick ta :-)
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-15 15:55:36 UTC
*** Bug 236606 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-17 15:23:02 UTC
*** Bug 236606 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Pipping gentoo-dev 2010-12-10 08:00:04 UTC
(In reply to comment #2)
> This is fixed in git. Thanks.

Due to the date of the last comment on this bug I assume that feature to be included in 3.4.10.907 or an earlier release of genkernel.

Closing, please re-open as needed.