Hello, now i download etherboot 5.1.8, i need more information to use this!
tnx
Serafino
* Serafino Sorrenti s.sorrenti@regia.tv [030513 11:33]:
Hello, now i download etherboot 5.1.8, i need more information to use this!
You should unpack it, and build an etherboot image for the boot method you want.
For LinuxBIOS you have to change the Config file to disable -DPCBIOS and instead use the LinuxBIOS settings. Now you can build a new image with i.e. make bin/ide_disk--tg3.zelf
this will build a compressed image that can boot from an ide disk and from a tg3 broadcom ethernet card.
Best regards, Stefan Reinauer
Serafino Sorrenti wrote:
Hello, now i download etherboot 5.1.8, i need more information to use this!
This is perhaps a little late but from my FAQ/HOWTO.
How do I make LB use etherboot IDE?
First you need to go get etherboot and compile it. You either get the developement branch with IDE support or the stable branch which need a patch to work.
Now modify the etherboot config file so that its compatible with LB. Specifically the ./src/Config file and the arch/<your arch>/Config file
For Ver 5.1.8
The options you need to make sure are set are:
-DELF_IMAGE -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONFIG_PCI_DIRECT
there are other options that are helpful like -DCONSOLE_SERIAL - DCOMCONSOLE=xxx
The option(s) you need to make sure it NOT set are:
-DPCBIOS
Then compile etherboot. You want to compile with a specific make command so that it generates the elfimage for LB to load. This is done by taggin the .zelf on to your normal makefile command.
For example to make the polling IDE loader elf image you need:
make bin/ide_disk.zelf For Ver 5.0.x: <Someone needs to fill in the info for the earlier version> Now modify your linuxbios config file to include:
option USE_ELF_BOOT=1 option PAYLOAD_SIZE=<size of you etherboot payload> payload /path/to/your/etherboot/driver
A quick note about PAYLOAD_SIZE. This parameter does not specifiy the exact size of the image but rather its fed to the bs=<size> option of 'dd'. This along with the 'sync' option causes dd to only output files that are a mutiple of the bs= size. So if you specify bs=32768 but your input filesize is 40000 you will end up with a output file thats 65536. So far I have just kept PAYLOAD_SIZE at 32768 and then go back and adjust ROM_SIZE such that the final image size is the size of my ROM part.
You also need an input stream for the elfboot code to read from so you must set one (or more?) of the following options.
USE_GENERIC_ROM=1
<What are all the other stream options?>
Now you need to create an elf kernel for the ether boot code to find. Go fetch the mkelfimage command at
ftp://ftp.lnxi.com/pub/src/mkelfImage/
Generally the latest one is better. Note that there are several older versions of binutils that are broken and mkelfimage will expose those bugs. Insure that you are running a recient copy of binutils. The following shows the version output from a known working bintuils.
# as --version GNU assembler 2.13.90.0.10 20021010 Debian GNU/Linux Now compile mkelfimage. Which should be as easy as ./configure, make, make install You can now create a elf kernel. Change to the directory where the image file for you kernel is. Normally this is somewhere in the kernel tree. In my case this is arch/i386/boot and the kernel image is bzImage. By defaut mkelfimage is installed in /usr/local/sbin so you would do /usr/local/sbin/mkelfimage bzImage elfimage Now you have your kernel elfized in the file 'elfimage' mkelfimage support several options for adding commandlines and initrd's to the kernel image type 'mkelfimage' without any arguments for the details. Ok final setp. Locate the kernel on the IDE device. Etherboot currently searchs the first 8k of disk space for the elf header. So you have to locate the start of that kernel within that space.
If you don't care about having a proper partition table on your disk then you can just splat the kernel at the front of the disk.
For the rest of the examples lets assume your disk is mounted in your *developement* machine as /dev/hde
The following will write the kernel at the beginning of the IDE device.
# cat elfimage > /dev/hde
This works well if you don't need the IDE device for anything other than booting.
If you want a filesystem on the device as well then you are going to have to protect the partition table as well.
Currently the hack for accomplishing this is
dd if=elfimage of=/dev/hde bs=4096 seek=1
This will skip over the partition table and write the data in the area where the first partition would normally be. So you have to create a disk with at least 2 partitions. /dev/hde1 should be large enough to hold your kernel plus any initrd you may want. You can then put your filesystem on /dev/hde2
Note. It appears that in some setups dd may whine about /dev/hde being an "Invalid argument" but it appears to write the data to the disk anyway. Somebody mentioned that it was a "buffer size" mismatch with dd and ext3 but nothing definitive was ever posted. If you receive this and solve the issue please report it.
Hello Richard i've tried to put the kernel on the compact flash but there are problems here:
Currently the hack for accomplishing this is dd if=elfimage of=/dev/hde bs=4096 seek=1
it seems to erase the partition table, do i have to skip some bytes at the beginning of the disk ?
i've tried also with:
dd if=elfimage of=/dev/hde1 bs=4096 seek=1
but linuxbios does not find hd0,0 /kernel when it starts.
i have a question: if i use dd do raw copy from a file to the disk, how can linuxbios use /kernel ? i don't think there is any reference to a file :|
Tnx Serafino
eep. Hrmm.. It looks like you're following the directions for one etherboot, but using a different etherboot. If you're using etherboot 5.0.6 with my polled io / file system patch, then you want to:
1) Make sure that compact flash adapter is the primary master (hda not hde as long as you're going to use (hd0,0) ).
2) Just make a regular partition table, make sure the first primary partition is ext2 or ext3, and then save that kernel image as /kernel .
3) Only follow the directions for writted a kernel to the compact flash raw if you're going to use the development branch of etherboot (5.1.8 presently)
- Adam Agnew
On Thu, 15 May 2003, Serafino Sorrenti wrote:
Hello Richard i've tried to put the kernel on the compact flash but there are problems here:
Currently the hack for accomplishing this is dd if=elfimage of=/dev/hde bs=4096 seek=1
it seems to erase the partition table, do i have to skip some bytes at the beginning of the disk ?
i've tried also with:
dd if=elfimage of=/dev/hde1 bs=4096 seek=1
but linuxbios does not find hd0,0 /kernel when it starts.
i have a question: if i use dd do raw copy from a file to the disk, how can linuxbios use /kernel ? i don't think there is any reference to a file :|
Tnx Serafino _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
Adam Agnew wrote:
eep. Hrmm.. It looks like you're following the directions for one etherboot, but using a different etherboot. If you're using etherboot 5.0.6 with my polled io / file system patch, then you want to:
- Make sure that compact flash adapter is the primary master (hda not hde
as long as you're going to use (hd0,0) ).
- Just make a regular partition table, make sure the first primary
partition is ext2 or ext3, and then save that kernel image as /kernel .
- Only follow the directions for writted a kernel to the compact flash
raw if you're going to use the development branch of etherboot (5.1.8 presently)
Ah my bad. Looks like my howto is in error then. I only have the building of etherboot seperated out. I didn't realise the boot method was different as well.
Adam can you do a short writeup on building etherboot 5.0.x apply your patches and then the process above? I'll make 2 different sections in my FAQ/HOWTO) one for each etherboot version.
Adam can you do a short writeup on building etherboot 5.0.x apply your patches and then the process above? I'll make 2 different sections in my FAQ/HOWTO) one for each etherboot version.
Certainly. See the attached diff, feel free to edit.
Also, did you decide on a permanent format? I don't mind getting better at latex if that could be of assistance to you.
- Adam A.
----------------- Adam Agnew Independent Contractor www.adamagnew.com
Adam Agnew wrote:
Also, did you decide on a permanent format? I don't mind getting better at latex if that could be of assistance to you.
No not yet. I was kinda thinking DocBook since thats the defacto FAQ and HOWTO format. But I don't have any of the tools to mess with it setup and it does look a little complex. I was hoping Open office would make that a whole lot eaiser. (plus run on my doze machine which makes it eaiser for me to work with)
Also David Barr has offered to Proofread/Technical Edit it as well so I want to use whatever he feels is best.
For Ver 5.0.6
Don't you have to apply some patches to get to this point? Where are they available at and what are the steps to apply them?
The Config file is already correct for most instances. Note that -DPCBIOS is NOT set and -DLINUXBIOS -DCONFIG_TSC_CURRTICKS -DCONSOLE_SERIAL -DCOMCONSOLE=0x3f8 -DCOMPRESERVE -DCONFIG_PCI_DIRECT -DELF_IMAGE and -DPOLLED_IDE are.
For Ver 5.0.6
Don't you have to apply some patches to get to this point? Where are they available at and what are the steps to apply them?
Line 228 of your FAQ already answers that, kinda.. so..
download etherboot-5.0.6.tar.gz from etherboot.org download etherboot-5.0.6.polled1.diff from http://www.missl.cs.umd.edu/~agnew/ (save them to the same directory) tar -vzxf etherboot-5.0.6.tar.gz cd etherboot-5.0.6 patch -p1 < ../etherboot-5.0.6.polled1.diff
- Adam A.
------------------ Adam Agnew Independent Contractor www.adamagnew.com
Serafino Sorrenti wrote:
i've tried to put the kernel on the compact flash but there are problems here:
Currently the hack for accomplishing this is
dd if=elfimage of=/dev/hde bs=4096 seek=1
it seems to erase the partition table, do i have to skip some bytes at the beginning of the disk ?
Hmmm... I't shouldn't. Thats what the seek=1 does. Its skips over 4Kib of space before it begins writing. That should more than clear your partition table. Are you sure it nuked your partition table?