Netboot Mailing List (by thread)

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

Re: Hello...





> 1-> Compied with ./configure --enable-bootrom
> 2-> make dep; make clean
> 3-> make bootrom ----> image.flo and image.rom
> 4-> with dd command I make the bootfloppy:
>     dd if=image.flo of=/dev/fd0

That's all correct.

> 5-> boot from floppy -> The server is ok. The server
>                         send the IP number and the vmlinuz kernel file
>                         but the secuence of boot is stopped with the
>                         next message:  ERROR invalid header !!

You must use mknbi-linux to make the boot image, consisting primarly of
the kernel, and optionally an initrd, the initial (root) ram disk.

In my case I'm using initrd and then also remounting root via NFS,
so I get my initrd and vmlinuz and use mknbi-linux as follows:

mknbi-linux -d ram -i rom -r initrd.gz -k vmlinuz -o bootImage -a "root=/dev/nfs"

The "-a /dev/nfs" is necessary if you want to remount root via NFS
after exiting in the initrd.

In initrd, I have a linuxrc script, which can insert modules, etcetera,
and in fact I use this script to configure the root-NFS parameters
directly into the /proc filesystem:

-------- linuxrc
#!/bin/sh

#echo Initialising network adapter
#/bin/insmod /boot/8390.o
#/bin/insmod /boot/ne.o io=0x300

echo Initialising Ethernet interface

DEVICE=eth0
GATEWAY=160.124.114.81
IPADDR=160.124.114.84
NETMASK=255.255.255.248
NETWORK=160.124.114.80
BROADCAST=160.124.114.87
HOSTNAME=aoh4

hostname ${HOSTNAME}

/bin/ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
/bin/route add -net ${NETWORK} netmask ${NETMASK} ${DEVICE}
/bin/route add -host ${IPADDR} ${DEVICE}
/bin/route add default gw ${GATEWAY} metric 1 ${DEVICE}

echo Setting NFS root parameters
/bin/mount -t proc none /proc
echo /rboot/rootfs > /proc/sys/kernel/nfs-root-name
echo 160.124.114.84:160.124.114.82::255.255.255.248:aoh4 > /proc/sys/kernel/nfs-root-addrs
echo 255 > /proc/sys/kernel/real-root-dev
/bin/umount /proc

/bin/sh

--------

The final /bin/sh is just for testing. You get a shell, and then when
you exit, the kernel will remount root via NFS, using the parameters
set by linuxrc, in /proc/sys/kernel/stuff.

By the way to make a 4Mb initrd:

# dd if=/dev/zero of=initrd count=4096 bs=1024
# mkfs.ext2 initrd
# mount -o loop initrd /mnt
# cd /mnt
# tar xvzf sample-initrd-rootfs.tgz
# cd -
# umount /mnt
# gzip initrd

By the way the default ramdisk size is 4Mb. If you have a 4Mb machine
only, you'll want to make an initrd that is 2Mb, and append to the kernel
parameters, "ramdisk_size=2048"

You determine what libs you need by doing "ldd" on the binary files you
need. You can see from the above script that I need insmod, ifconfig,
route, mount, hostname, umount.

In addition, you'll need some devices, which you must tar from your /dev
directory and untar into the image. I'm appending an ls of my initrd
after this email.

Hope this helps!


Regards

Evan

-------------------------------------------------------------|-----|--
Evan Summers, PhD           Tel +27 82 900-8632   Symphony  /|\   /|\
Linux systems integration   http://sr.co.za       Research {   } {   }
Johannesburg, South Africa  mailto:evan@sr.co.za  (Pty)Ltd {___} {___}



------------------------------ ls of my custom initrd

-rwxr-xr-x   1 root     root          821 Jun 15 18:22 /rboot/image/linuxrc

/rboot/image/app:
total 1
drwxr-xr-x   2 root     root         1024 Jun 15 15:54 fonts

/rboot/image/bin:
total 490
-rwxr-xr-x   1 root     root        16568 Aug 10  1996 cat
-rwxr-xr-x   1 root     root        56924 Apr 20 18:20 ftp
-rwxr-xr-x   1 root     root         8116 Apr 20 18:47 hostname
-rwxr-xr-x   1 root     root        23608 Mar  1 21:04 ifconfig
-rwxr-xr-x   1 root     root        23752 Mar  1 20:37 insmod
-rwxr-xr-x   1 root     root        36792 Apr 20 18:04 ls
-rwxr-xr-x   1 root     root          118 Mar  1 20:37 lsmod
-rwxr-xr-x   1 root     root        16536 Jun 15 17:47 mkdir
-rwsr-xr-x   1 root     root        29712 Apr 20 19:46 mount
-rwxr-xr-x   1 root     root        85744 Apr 20 19:55 nslookup
-rwxr-xr-x   1 root     root        12268 Oct 29  1996 ping
lrwxrwxrwx   1 root     root            6 Jun 15 16:21 rmmod -> insmod
-rwxr-xr-x   1 root     root        22364 Apr 20 17:30 route
-rwxr-xr-x   1 root     root        61460 Mar  2 13:41 sh
-rwxr-xr-x   1 root     root        71460 Apr 22 11:51 telnet
-rwsr-xr-x   1 root     root        16360 Jun 15 17:47 umount

/rboot/image/boot:
total 32
-rw-r--r--   1 root     root         7352 Jun 15 16:13 8390.o
-rw-r--r--   1 root     root         9112 Jun 15 16:13 ne.o
-rw-r--r--   1 root     root         6780 Jun 15 16:14 smc-ultra.o
-rw-r--r--   1 root     root         7388 Jun 15 16:14 wd.o

/rboot/image/dev:
total 1
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 arp -> inet/arp
lrwxrwxrwx   1 root     root            4 Apr 22 12:18 console -> tty0
lrwxrwxrwx   1 root     root           11 Apr 22 12:18 core -> /proc/kcore
crw-r-----   1 root     uucp       5,  64 Mar  1 18:03 cua0
crw-r-----   1 root     uucp       5,  65 Mar  1 18:03 cua1
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 egp -> inet/egp
lrwxrwxrwx   1 root     root           13 Apr 22 12:18 fd -> /proc/self/fd
crw-r--r--   1 root     sys        1,   7 Mar  1 18:02 full
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 ggp -> inet/ggp
brw-r-----   1 root     disk       3,   0 Mar  1 18:03 hda
brw-r-----   1 root     disk       3,   1 Mar  1 18:03 hda1
brw-r-----   1 root     disk       3,   2 Mar  1 18:03 hda2
lrwxrwxrwx   1 root     root            9 Apr 22 12:18 icmp -> inet/icmp
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 idp -> inet/idp
drwxr-xr-x   2 root     root         1024 Jan 22 20:28 inet
lrwxrwxrwx   1 root     root            7 Apr 22 12:18 ip -> inet/ip
lrwxrwxrwx   1 root     root            9 Apr 22 12:18 ipip -> inet/ipip
crw-r-----   1 root     kmem       1,   2 Mar  1 18:02 kmem
crw-r-----   1 root     kmem       1,   1 Mar  1 18:02 mem
crw-r--r--   1 root     sys        1,   3 Mar  1 18:02 null
crw-r-----   1 root     kmem       1,   4 Mar  1 18:02 port
crw-r--r--   1 root     tty        2,   0 Mar  1 18:13 ptyp0
crw-r--r--   1 root     tty        2,   1 Mar  1 18:13 ptyp1
crw-r--r--   1 root     tty        2,   2 Mar  1 18:13 ptyp2
crw-r--r--   1 root     tty        2,   3 Mar  1 18:13 ptyp3
crw-r--r--   1 root     tty        2,   4 Mar  1 18:13 ptyp4
crw-r--r--   1 root     tty        2,   5 Mar  1 18:13 ptyp5
crw-r--r--   1 root     tty        2,   6 Mar  1 18:13 ptyp6
crw-r--r--   1 root     tty        2,   7 Mar  1 18:13 ptyp7
crw-r--r--   1 root     tty        2,   8 Mar  1 18:13 ptyp8
crw-r--r--   1 root     tty        2,   9 Mar  1 18:13 ptyp9
crw-r--r--   1 root     tty        2,  10 Mar  1 18:13 ptypa
crw-r--r--   1 root     tty        2,  11 Mar  1 18:13 ptypb
crw-r--r--   1 root     tty        2,  12 Mar  1 18:13 ptypc
crw-r--r--   1 root     tty        2,  13 Mar  1 18:13 ptypd
crw-r--r--   1 root     tty        2,  14 Mar  1 18:13 ptype
crw-r--r--   1 root     tty        2,  15 Mar  1 18:13 ptypf
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 pup -> inet/pup
brw-r-----   1 root     disk       1,   1 Mar  1 18:02 ram
lrwxrwxrwx   1 root     root           10 Apr 22 12:18 rawip -> inet/rawip
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 rip -> inet/rip
lrwxrwxrwx   1 root     root            4 Apr 22 12:18 stderr -> fd/2
lrwxrwxrwx   1 root     root            4 Apr 22 12:18 stdin -> fd/0
lrwxrwxrwx   1 root     root            4 Apr 22 12:18 stdout -> fd/1
lrwxrwxrwx   1 root     root            4 Apr 22 12:18 systty -> tty0
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 tcp -> inet/tcp
crw-r--r--   1 root     tty        5,   0 Mar  1 18:02 tty
crw-------   1 root     tty        4,   0 Mar  1 18:02 tty0
crw-r--r--   1 root     tty        4,   1 Mar  1 18:02 tty1
crw-r--r--   1 root     tty        4,   2 Mar  1 18:02 tty2
crw-r--r--   1 root     tty        4,   3 Mar  1 18:02 tty3
crw-r--r--   1 root     tty        4,   4 Mar  1 18:02 tty4
crw-r--r--   1 root     tty        4,   5 Mar  1 18:02 tty5
crw-r--r--   1 root     tty        4,   6 Mar  1 18:02 tty6
crw-r--r--   1 root     tty        4,   7 Mar  1 18:02 tty7
crw-r--r--   1 root     tty        4,   8 Mar  1 18:02 tty8
crw-r--r--   1 root     tty        4,  64 Mar  1 18:03 ttyS0
crw-r--r--   1 root     tty        4,  65 Mar  1 18:03 ttyS1
crw-r--r--   1 root     tty        3,   0 Mar  1 18:13 ttyp0
crw-r--r--   1 root     tty        3,   1 Mar  1 18:13 ttyp1
crw-r--r--   1 root     tty        3,   2 Mar  1 18:13 ttyp2
crw-r--r--   1 root     tty        3,   3 Mar  1 18:13 ttyp3
crw-r--r--   1 root     tty        3,   4 Mar  1 18:13 ttyp4
crw-r--r--   1 root     tty        3,   5 Mar  1 18:13 ttyp5
crw-r--r--   1 root     tty        3,   6 Mar  1 18:13 ttyp6
crw-r--r--   1 root     tty        3,   7 Mar  1 18:13 ttyp7
crw-r--r--   1 root     tty        3,   8 Mar  1 18:13 ttyp8
crw-r--r--   1 root     tty        3,   9 Mar  1 18:13 ttyp9
crw-r--r--   1 root     tty        3,  10 Mar  1 18:13 ttypa
crw-r--r--   1 root     tty        3,  11 Mar  1 18:13 ttypb
crw-r--r--   1 root     tty        3,  12 Mar  1 18:13 ttypc
crw-r--r--   1 root     tty        3,  13 Mar  1 18:13 ttypd
crw-r--r--   1 root     tty        3,  14 Mar  1 18:13 ttype
crw-r--r--   1 root     tty        3,  15 Mar  1 18:13 ttypf
lrwxrwxrwx   1 root     root            8 Apr 22 12:18 udp -> inet/udp
crw-------   1 root     sys        7,   0 Mar  1 18:02 vcs0
crw-------   1 root     sys        7,   1 Mar  1 18:02 vcs1
crw-------   1 root     sys        7,   2 Mar  1 18:02 vcs2
crw-------   1 root     sys        7,   3 Mar  1 18:02 vcs3
crw-------   1 root     sys        7,   4 Mar  1 18:02 vcs4
crw-------   1 root     sys        7,   5 Mar  1 18:02 vcs5
crw-------   1 root     sys        7,   6 Mar  1 18:02 vcs6
crw-------   1 root     sys        7,   7 Mar  1 18:02 vcs7
crw-------   1 root     sys        7,   8 Mar  1 18:02 vcs8
crw-r--r--   1 root     sys        1,   5 Mar  1 18:02 zero

/rboot/image/etc:
total 30
-rw-r--r--   1 root     root           26 Apr 20 19:59 host.conf
-rw-r--r--   1 root     root           78 Jun 15 17:41 hosts
-rw-r--r--   1 root     root          161 Apr 20 18:21 hosts.allow
-rw-r--r--   1 root     root          347 Apr 20 18:21 hosts.deny
-rw-r--r--   1 root     root         4216 Mar  1 20:22 ld.so.cache
-rw-r--r--   1 root     root          221 Apr 22 11:45 lilo.conf
-rw-r--r--   1 root     root         1208 Apr 20 20:01 nsswitch.conf
-rwxr-xr-x   1 root     root           95 Jun 15 18:25 profile
-rw-r--r--   1 root     root          715 Apr 20 18:21 protocols
-rw-r--r--   1 root     root           42 Apr 20 18:39 resolv.conf
-rw-------   1 root     root           76 Apr 20 18:21 securetty
-rw-r--r--   1 root     root         4491 Apr 20 18:21 services
-rwxr-xr-x   1 root     root          272 Jun 15 16:57 startlo
-rwxr-xr-x   1 root     root          103 Jun 15 16:57 startne
-rwxr-xr-x   1 root     root          459 Jun 15 16:58 startnet
-rwxr-xr-x   1 root     root          278 Jun 15 17:43 startrootnfs
-rwxr-xr-x   1 root     root          102 Jun 15 17:06 startsmc
-rwxr-xr-x   1 root     root          109 Jun 15 17:06 startsmcultra
-rw-------   1 root     root         1952 Apr 22 14:53 termcap
drwxr-xr-x   2 root     root         1024 May 12 10:46 vga

/rboot/image/lib:
total 1015
-rwxr-xr-x   2 root     root        21367 Aug 26  1996 ld-linux.so.1
-rwxr-xr-x   2 root     root        21367 Aug 26  1996 ld-linux.so.1.7.14
lrwxrwxrwx   1 root     root           14 Apr 22 12:18 libc.so.5 -> libc.so.5.3.12
-rwxr-xr-x   1 root     root       706960 Dec  5  1996 libc.so.5.3.12
lrwxrwxrwx   1 root     root           13 Apr 22 12:18 libm.so.5 -> libm.so.5.0.6
-rwxr-xr-x   1 root     root        36309 Dec  5  1996 libm.so.5.0.6
lrwxrwxrwx   1 root     root           19 Apr 22 12:18 libtermcap.so.2 -> libtermcap.so.2.0.8
-rwxr-xr-x   1 root     root        11293 Apr 22 11:52 libtermcap.so.2.0.8
lrwxrwxrwx   1 root     root           16 May 12 10:40 libvga.so.1 -> libvga.so.1.2.10
-rwxr-xr-x   1 root     root       182356 May 12 10:40 libvga.so.1.2.10
lrwxrwxrwx   1 root     root           18 May 12 10:40 libvgagl.so.1 -> libvgagl.so.1.2.10
-rwxr-xr-x   1 root     root        46548 May 12 10:40 libvgagl.so.1.2.10

/rboot/image/lost+found:
total 0

/rboot/image/proc:
total 0



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.