Jump to content











Photo
- - - - -

Booting Ubuntu LTSP

pxelinux ltsp ubuntu

  • Please log in to reply
5 replies to this topic

#1 Karl1982

Karl1982

    Member

  • Members
  • 41 posts
  •  
    United States

Posted 02 July 2012 - 06:55 PM

We currently have a PXE bootable environment powered by grub4dos, containing mosty hard drive and memory diagnostics, PEs, and a few other things. I'm trying to add Ubuntu LTSP to it. I have a working Ubuntu 12.04 LTSP server, and if I provide PXE clients with /ltsp/i386/pxelinux.0 as the boot file, everything is fine.

I have been unable to load this with grub4dos. I've read a few places that you can supposedly pass chainloader --force --raw /ltsp/i386/pxelinux.0 and move from grub4dos to pxelinux, but this doesn't work in my case. I just get a blinking cursor.

I've also tried having grub4dos directly load the kernel and initrd, taking the arguments from pxelinux.cfg/default, but this doesn't work either. It partially boots, and I get dropped at initramfs.

Here are the contents of TFTP:


.:

total 40M

-rwxr-xr-x 1 root root 215K Jul  2 11:04 grldr

drwxr-xr-x 3 root root 4.0K Jul  2 09:25 ltsp

-rwxr-xr-x 1 root root  40M Jul  2 09:53 ltsp.tar.gz

-rwxr-xr-x 1 root root   94 Jul  2 11:06 menu.lst



./ltsp:

total 4.0K

drwxr-xr-x 3 root root 4.0K Jul  2 09:34 i386



./ltsp/i386:

total 43M

-rw-r--r-- 1 root root 778K Jun 14 12:32 abi-3.2.0-26-generic

-rw-r--r-- 1 root root 145K Jun 14 12:32 config-3.2.0-26-generic

-rw-r--r-- 1 root root  88K Jul  2 09:26 gpxelinux.0

lrwxrwxrwx 1 root root   27 Jul  2 09:21 initrd.img -> initrd.img-3.2.0-26-generic

-rw-r--r-- 1 root root  16M Jul  2 09:25 initrd.img-3.2.0-26-generic

-rw-r--r-- 1 root root  142 Jul  2 09:52 lts.conf

lrwxrwxrwx 1 root root   24 Jul  2 09:26 nbi.img -> nbi.img-3.2.0-26-generic

-rw-r--r-- 1 root root  20M Jul  2 09:26 nbi.img-3.2.0-26-generic

-rw-r--r-- 1 root root  26K Jul  2 09:26 pxelinux.0

drwxr-xr-x 2 root root 4.0K Jul  2 09:25 pxelinux.cfg

-rw------- 1 root root 2.2M Jun 14 12:32 System.map-3.2.0-26-generic

lrwxrwxrwx 1 root root   24 Jul  2 09:21 vmlinuz -> vmlinuz-3.2.0-26-generic

-rw-r--r-- 1 root root 4.7M Jun 14 12:32 vmlinuz-3.2.0-26-generic



./ltsp/i386/pxelinux.cfg:

total 4.0K

-rw-r--r-- 1 root root 175 Jul  2 09:26 default


And here is the contents of /ltsp/i386/pxelinux.cfg/default


default ltsp



label ltsp

kernel vmlinuz

append ro initrd=initrd.img root=/dev/nbd0 init=/sbin/init-ltsp quiet splash plymouth:force-splash vt.handoff=7 nbdroot=:ltsp_i386


Any thoughts on how I might get this working? Thanks

#2 tinybit

tinybit

    Gold Member

  • Developer
  • 1137 posts
  •  
    China

Posted 02 July 2012 - 10:57 PM

I've also tried having grub4dos directly load the kernel and initrd, taking the arguments from pxelinux.cfg/default, but this doesn't work either. It partially boots, and I get dropped at initramfs.


How did you do it? I think it could be the right way. Please post your menu.lst.

#3 Karl1982

Karl1982

    Member

  • Members
  • 41 posts
  •  
    United States

Posted 03 July 2012 - 02:07 PM

First option is this:


title Ubuntu LTSP (via PXELinux)

root (pd)

pxe keep

chainloader --force --raw /ltsp/i386/pxelinux.0


I've tried this with only --force, only --raw, and neither. The results are always the same. It says filesystem type is pxe, using whole disk. Then just a blinking cursor.

Second option is this:


title Ubuntu LTSP (load kernel directly)

root (pd)/ltsp/i386

pxe keep

kernel /vmlinuz ro root=/dev/nbd0 init=/sbin/init-ltsp vt.handoff=7 nbdroot=:ltsp-i386

initrd /initrd.img


This one I have tried several different ways. With/without pxe keep, tried without splash screens as you can see, and also tried with setting root (pd) and then kernel /ltsp/i386/vmlinuz and initrd /ltsp/i386/initrd.img. Result is always the same, it loads the kernel and initrd from TFTP, but then drops at (initramfs).

This is what it says on the (initramfs) screen:

Posted Image

And this is displayed on another tty:

Posted Image

#4 Karl1982

Karl1982

    Member

  • Members
  • 41 posts
  •  
    United States

Posted 03 July 2012 - 03:52 PM

Also for reference, this is what the successful pxelinux.0 boot looks like:

Posted Image

And this is what the other tty says on a successful boot from pxelinux.0:


ip: RTNETLINK answers: File exists

Negotiation: ..size = 253MB

bs=1024, sz=266104832 bytes


... and then proceeds to start daemons as the system starts up. Seems like it's failing to mount NBD when the kernel is loaded through grub4dos, but I have no idea why. I can see the size is very different... normally the NBD device size is negotiated to 253MB, but with grub4dos, it negotiates to 3 petabytes (!!). I can see where it would think that's too big.

In case of a compatibility issue, I tried booting a VirtualBox VM instead of Hyper-V. It negotiated the size to 2PB, but still had the same problem.

Edited by Karl1982, 03 July 2012 - 04:11 PM.


#5 tinybit

tinybit

    Gold Member

  • Developer
  • 1137 posts
  •  
    China

Posted 03 July 2012 - 10:12 PM

On a successful boot, what command-line parameters your vmlinuz finally received? I suspect pxelinux might have passed additional parameters, something like PXE_SERVER_IP=192.168.0.1 etc., to vmlinuz, in addition to the kernel line you had explicitly specified. Or say, your kernel might have been built only for pxelinux, not for other boot loaders, especially not for grub4dos. Try to boot up another Linux, e.g., a version installed on your local disk. If the latter is OK, then there should be no problem on the grub4dos side.

And you may also check your grub4dos version, an replace with other versions. Don't forget to try 0.4.5c.

And it is also possible that your pxe server, client virtual machine and grub4dos (together) are not compatible. Try to replace your pxe server software or the client.

Seeing this

ip: RTNETLINK answers: File exists
Negotiation: ..size = 253MB
bs=1024, sz=266104832 bytes


you may also try "pxe detect 1024" before you access files on the server. If this succeeded, grub4dos should probe the block size of 1024 with the next release. See readme section of Use 'pxe detect' in preset-menu.

#6 Karl1982

Karl1982

    Member

  • Members
  • 41 posts
  •  
    United States

Posted 04 July 2012 - 04:48 AM

I think we have a winner. :yess:

I checked /proc/cmdline in the LTSP client after booting from pxelinux, and it does have one more argument. However I don't think it makes a difference. It now boots both with and without the additional parameter, which is BOOT_IMAGE=vmlinuz.

I think I was using an older version of grub4dos in my Hyper-V test (I'll have to check it Thursday, I have tomorrow off). I tried version 0.4.5c as you suggested in VirtualBox, and it is able to boot the kernel directly.

This is the config that is working now. It works with both 32-bit and 64-bit thin client images (just replacing i386 with amd64 to load the other image).


title Ubuntu LTSP

pxe keep

kernel /ltsp/i386/vmlinuz ro root=/dev/nbd0 init=/sbin/init-ltsp quiet splash plymouth:force-splash vt.handoff=7 nbdroot=:ltsp_i386 BOOT_IMAGE=vmlinuz

initrd /ltsp/i386/initrd.img


Also just to note, I did try chainloading pxelinux again, and it almost works. It hangs at this screen (noting it seems to be looking for a config specific to its MAC address, rather than pxelinux.cfg/default). Could also be because the TFTP prefix appears to be wrong. The TFTP prefix is passed via a DHCP option which I disabled while trying grub4dos. It may work if it had it, but without being able to dynamically change the TFTP working folder, it just wouldn't work with my directory structure anyway.

Posted Image





Also tagged with one or more of these keywords: pxelinux, ltsp, ubuntu

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users