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

Re: Net boot with tftp



On Tue, 25 Aug 1998, Stephen J. Carpenter wrote:

> On Tue, Aug 25, 1998 at 12:28:04PM +0100, Jules Bean wrote:
> > On Mon, 24 Aug 1998, Stephen J. Carpenter wrote:
> > 
> > > I am doing some work on "Diskless XTerminals" 
> > > (http://people.delphi.com/sjc/linux)
> > > I decided to give it a try with my SUN IPC.
> > > To do this I need a custom kernel so I built one with NFSROOT and bootp
> > > both on.
> > > 
> > > I did a make vmlinux in the kernel TLD mostly because I have found 
> > > "make zImage" and "make bzImage" to NOT work on the Sparc :( and
> > > when i built my custom kernel (which I am currently using) on the sparc
> > > I did a "make vmlinux" to make it...
> > > 
> > > I rdev'd it to use /dev/nfs and placed it in /boot/ then made the
> > > proper sym link so that my IPC could find it...
> > > I used the exact same name as tftpboot.img used when I installed
> > > Debian on my IPC...used the same IP adress et al
> > > 
> > > I type "boot net" on the IPC and it loads the image....I see the hex numbers
> > > scroll up then it stops (like it finished loading) then it just sits there
> > > 
> > > am I doing this wrong? 
> > > 
> > > I thought if I just built a kernel and placed it there it would load? is
> > > tftpboot.img really anything more than a kernel and a initial ram
> > > disk?
> > > 
> > > any help is apreciated 
> > > 
> > 
> > Pad the file tftpboot.img to a multiple of 4 bytes long (with dd, for
> > example.  Search this mailing list for good approaches.
> > 
> 
> ok....it was size (as reported by ls) 1166361 ....by my calcs needs 3 bytes
> more to be a multiple of 4.
> 
> so I do 
> dd if=vmlinux of=vmlinux- ibs=4 conv=sync
> 
> and it comes out 1166364
> 
> Now if I boot net (after moving vmlinux- to vmlinux ;) )
> it starts to load,....and counts up in hex
> then rather than locking up and waiting for me to hit stop-a to
> get back to the prom OK prompt....
> it just jumps right back to 'OK' without any error or anything
> 
> under my i386 system I do:
> 
> [root@Shit-Box sunboot]$file vmlinux 
> vmlinux: ELF 32-bit MSB executable, SPARC, version 1
> 
> hmmm any ideas?

Yup.  The PROM wants to boot an a.out style executable, not an ELF one.

Have a look in arch/sparc in the kernel tree - there are utilities there
which fix it up (look in the Makefile to see how it does it).  There is,
in particular, an elftoaout program in the kernel dist.  There is also an
example of how to append a RAM disk root image to the image (although you
probably don't want/need to do this).

Jules
 
/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/


Reply to: