Chinaunix

标题: 关于在BSD4.8下PXE网络安装问题???(求助) [打印本页]

作者: km    时间: 2005-07-03 00:51
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
我按照
http://www.tnpi.biz/computing/freebsd/pxe-netboot.shtml
可到了
FreeBSD/i386 bootstrap loader, Revision 0.8
(root@matt.simerson.net), Thu Nov 30 11:45:41 PST 2000)
pxe_open: server addr: 192.168.1.25
pxe_open: server path: /usr/local/export/pxe
pxe_open: gateway ip: 192.168.1.1

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel]
显示
can't load kerenl
can't load kernel.old
可我已经把
-r-xr-xr-x   1 root  wheel  4157227 Jul  1 22:47 kernel
-r-xr-xr-x   1 root  wheel  4122347 Apr  3  2003 kernel.GENERIC
-r-xr-xr-x   1 root  wheel  4122347 Apr  3  2003 kernel.old
全都拷贝到/usr/local/export/pxe/boot下了。。。
:(
请那为老大指点一下。。。:(
作者: webmasters    时间: 2005-07-03 11:03
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
我做过,但是也是在一年之前的事情了,现在记不得了,但是有一点只要按照手册做基本没有问题。
但是看你的情况你好像是把本系统的内核复制进去了,建议你严格按照手册上来做,用光盘里面的引导内核试试。
作者: km    时间: 2005-07-03 22:49
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
rsync -av /boot/kernel /usr/local/export/pxe/boot/
可这1部不是把本系统内核复制过去么。。
我做的是
rsync -av /kernel /usr/local/export/pxe/boot/
作者: km    时间: 2005-07-04 23:28
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
ding ding ~~~
作者: km    时间: 2005-07-05 01:13
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
我换了5.3的完全按上面步骤做的。。可还是显示can't load kernel ...。。。
到底是哪个地方出了错:(
作者: km    时间: 2005-07-05 18:42
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
有那位老大做过呀指点指点。。:(
作者: km    时间: 2005-07-06 13:45
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
顶~~~~:(
作者: km    时间: 2005-07-07 18:25
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
不会吧。。。。没人呀。。。:(
难道没人搞这东西。。。:(
作者: webmasters    时间: 2005-07-07 20:50
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
我做过,但是你没有把相关的配置文件,以及日志贴上来谁也不知道发生了什么事。
作者: km    时间: 2005-07-08 03:49
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
hehe 马上贴出
bq# cat /usr/local/etc/dhcpd.conf
# dhcpd.conf
#

default-lease-time 600;
max-lease-time 7200;
ddns-update-style ad-hoc;
option domain-name-servers 192.168.1.25;
option domain-name "ntu-kpi.kiev.ua";
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
server-name "pxe-gw";
server-identifier 192.168.1.25;
next-server 192.168.1.25;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.220 192.168.1.230;
  option root-path "/usr/local/export/pxe";
  filename "pxeboot";
}
作者: km    时间: 2005-07-08 03:50
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
bq# pwd
/usr/local/export/pxe
bq# ll
total 25034
drwxr-xr-x  3 root  wheel      4096 Jul  5 18:05 boot
-r-xr-xr-x  1 root  wheel  5828080 Nov  5  2004 kernel
-rwxrwxrwx  1 root  wheel       291 Jul  5 18:27 loader.rc
-rwxrwxrwx  1 root  wheel        92 Jul  5 18:27 loader.rc-freebsd-ide
-rwxrwxrwx  1 root  wheel        88 Jul  5 18:27 loader.rc-ide
-rwxrwxrwx  1 root  wheel  25600000 Jul  5 18:34 mfsroot
作者: km    时间: 2005-07-08 03:51
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
bq# ls -al /usr/local/export/pxe/boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  5828080 Nov  5  2004 /usr/local/export/pxe/boot/kernel/kernel

bq# ll /tftpboot/
total 240
-r--r--r--  1 root  wheel  215040 Jul  4 12:01 pxeboot

bq# pwd
/usr/local/export/pxe/boot
bq# ls -all
-rwxr-xr-x  1 root  wheel     512 Jul  5 17:28 boot1
-rw-r--r--  1 root  wheel    7680 Jul  5 17:28 boot2
drwxr-xr-x  2 root  wheel    8192 Jul  3 21:09 kernel
-rw-r--r--  1 root  wheel  212992 Jul  5 17:27 loader
-rwxr-xr-x  1 root  wheel     291 Jul  5 18:26 loader.rc
-rwxr-xr-x  1 root  wheel      92 Jul  5 18:05 loader.rc-freebsd-ide
-rwxr-xr-x  1 root  wheel      88 Jul  5 18:05 loader.rc-ide
作者: km    时间: 2005-07-08 03:52
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
bq# cat  /usr/local/export/pxe/boot/loader.rc
echo Loading kernel
load /boot/kernel/kernel
load linux.ko
set choice=freebsd-ide
echo
echo ide
echo
read -t 5 -p "Type in your selection EXACTLY:" choice
echo
include /boot/loader.rc-$choice
echo booting
echo \007\007
echo initializing h0h0magic
set vfs.root.mountfrom=ufs:"/dev/md0c"
boot
bq# cat /usr/local/export/pxe/boot/loader.rc-ide
echo Loading FreeBSD installer mfsroot for IDE/UDMA drives
load -t mfs_root/mfsroot-ide
作者: km    时间: 2005-07-08 04:44
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
showmount -e
Exports list on localhost:
/usr                               Everyone
作者: webmasters    时间: 2005-07-08 10:18
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
FreeBSD Jumpstart Guide
Alfred Perlstein

<alfred@FreeBSD.org>;

$FreeBSD: doc/en_US.ISO8859-1/articles/pxe/article.sgml,v 1.20 2003/09/18 15:32:53 simon Exp $

FreeBSD is a registered trademark of Wind River Systems, Inc. This is expected to change soon.

Intel, Celeron, EtherExpress, i386, i486, Itanium, Pentium, and Xeon are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the ``™'' or the ``®'' symbol.

This article details the method used to allow machines to install FreeBSD using the Intel® PXE method of booting a machine over a network.
[ Split HTML / Single HTML ]
1 Introduction

    Warning: This procedure will make the ``Server'' both insecure and dangerous, it is best to just keep the ``Server'' on its own hub and not in any way accessible by any machines other than the ``Clients''.

Terminology:
Server         The machine offering netboot and install options.
Client         The machine that will have FreeBSD installed on it.

Requires: Clients supporting the Intel PXE netboot option, an Ethernet connection.

Please let me know if you come across anything you have problems with or suggestions for additional documentation.

If you would like someone to train/implement a specific netinstall system for you, please send email so that we can discuss terms.

I would also like to thank Paul Saab <ps@FreeBSD.org>; and John Baldwin <jhb@FreeBSD.org>; for doing most of the programming work on pxeboot, the interface to the Intel PXE (netboot) system.
2 Server Configuration

   1.

      Install DHCP: Install net/isc-dhcp3 you can use this config file dhcpd.conf, stick it in /usr/local/etc/
   2.

      Enable tftp:
         1.

            Make a directory /usr/tftpboot
         2.

            Add this line to your /etc/inetd.conf:

tftp    dgram   udp     wait    nobody  /usr/libexec/tftpd    tftpd /usr/tftpboot

   3.

      Enable NFS:
         1.

            Add this to /etc/rc.conf:

nfs_server_enable="YES"

         2.

            Add this to /etc/exports:

/usr -alldirs -ro

   4.

      Reboot to enable the new services or start them manually.

3 Bootstrap Setup

   1.

      Download bootfiles: Download the kern.flp and mfsroot.flp floppy images.
   2.

      Setup tftp/pxe-boot directory:
         1.

            Put pxeboot in the boot directory:

# rm -rf /usr/obj/*
# cd /usr/src/sys/boot
# make
# cp /usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot

         2.

            Using the vndevice mount the kern.flp file and copy its contents to /usr/tftpboot:

# vnconfig vn0 kern.flp    # associate a vndevice with the file
# mount /dev/vn0 /mnt      # mount it
# cp -R /mnt /usr/tftpboot # copy the contents to /usr/tftpboot
# umount /mnt              # unmount it
# vnconfig -u vn0          # disassociate the vndevice from the file

   3.

      Compile a custom kernel for the clients (particularly to avoid the device config screen at boot) and stick it in /usr/tftpboot.
   4.

      Make a special loader.rc to and install it in /usr/tftpboot/boot/loader.rc so that it does not prompt for the second disk, here is mine.
   5.

      Extract the installer and helper utilities from the mfsroot disk and uncompress them, put them in /usr/tftpboot as well:

# vnconfig vn0 mfsroot.flp         # associate a vndevice with the file
# mount /dev/vn0 /mnt              # mount it
# cp /mnt/mfsroot.gz /usr/tftpboot # copy the contents to /usr/tftpboot
# umount /mnt                      # unmount it
# vnconfig -u vn0                  # disassociate the vndevice from the file
# cd /usr/tftpboot                 # get into the pxeboot directory
# gunzip mfsroot.gz                # uncompress the mfsroot

   6.

      Make your sysinstall script install.cfg, you can use mine as a template, but you must edit it.
   7.

      Copy the sysinstall script into the extracted and uncompressed mfsroot image:

# cd /usr/tftpboot
# vnconfig vn0 mfsroot
# mount /dev/vn0 /mnt
# cp install.cfg /mnt
# umount /mnt
# vnconfig -u vn0

4 Install Setup

   1.

      Put the install files in an NFS accessible location on the Server. Make a directory corresponding the 'nfs' directive in the install.cfg file and mirror the FreeBSD install files there, you will want it to look somewhat like this:

ABOUT.TXT       TROUBLE.TXT     compat20        floppies        ports
ERRATA.TXT      UPGRADE.TXT     compat21        games           proflibs
HARDWARE.TXT    XF86336         compat22        info            src
INSTALL.TXT     bin             compat3x        kern.flp
LAYOUT.TXT      catpages        crypto          manpages
README.TXT      cdrom.inf       dict            mfsroot.flp
RELNOTES.TXT    compat1x        doc             packages

   2.

      Copy the compressed packages into the packages/All directory under nfs.
   3.

      Make sure you have an INDEX file prepared in the packages directory. You can make your own INDEX entries like so:

alfred-1.0||/|Alfred install bootstrap||alfred@FreeBSD.org||||

      Then you can install custom packages, particularly your own custom post-install package.

5 Custom Post-Install Package

You can use the script pkgmaker.sh to create a custom package for post install, the idea is to have it install and configure any special things you may need done. pkgmaker is run in the directory above the package you wish to create with the single argument of the package (ie mypkg) which will then create a mypkg.tgz for you to include in your sysinstall package.

Inside your custom package dir you will want a file called PLIST which contains all the files that you wish to install and be incorporated into your package.

You will also want files called pre and post in the directory, these are shell scripts that you want to execute before and after your package is installed.

Since this package is in your install.cfg file it should be run and do the final configuration for you.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>;.
For questions about this documentation, e-mail <doc@FreeBSD.org>;.

这个是FreeBSD的官方文档,和你所做的有些不同,不同点就是在于pxeboot与内核的几个文件不在一起,我想可能就是因为当引导到pxeboot以后找不到内核所致。所以建议你还是用官方的文档做做一遍。
第二你的dhcp与messages的日志应该贴上来,这样会了解的更全一些。
作者: xmgu    时间: 2005-07-08 11:47
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
cat /etc/exports 看一下
作者: km    时间: 2005-07-08 15:53
标题: 关于在BSD4.8下PXE网络安装问题???(求助)
q# cat /etc/exports
/usr -alldirs -maproot=root -ro

# cat /etc/inetd.conf | grep tftp
tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l /tftpboot




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2