The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
Invalid or corrupt kernel image во время удаленной загрузки через PXE, !*! dima_k, 05-Апр-06, 16:50  [смотреть все]
Народ, столкнулся с такой проблемой во время удаленной загрузки с boot-сервера.
После чтения файла конфигурации /tftpboot/pxelinux.cfg/default на сервере:

LABEL linux
  KERNEL vmlinuz-2.6.16
  APPEND root=/dev/nfs

получаю сообщение Invalid or corrupt kernel image.
Ядро было собрано из исходников с поддержкой NFS-root, на локальной системе оно грузится без проблем. Удаленно даже не хочет вытягиваться по tftp. Прерывается сразу.
Поставил вместо него установочное ядро - оно грузится без проблем, но затем выскакивает Kernel panic при попытке монтирования файловых систем (что правильно).

Конфигурации системы:
сервер P4 3.2Ghz, 1G RAM, ОС FC4
Системное ядро:
1572 -rwxrwxrwx  1 root root 1603152 Apr  5 02:38 vmlinuz-2.6.15
# file vmlinuz-2.6.15
vmlinuz-2.6.15: x86 boot sector
Собранное:
8616 -rwxrwxrwx  1 root root 8804531 Apr  5 07:17 vmlinuz-2.6.16
# file vmlinuz-2.6.16
vmlinuz-2.6.16: x86 boot sector

Клиент Celeron 600Mhz, 256M RAM
Может ли это быть связано с размером ядра?
Заранее всех благодарю за ответ.

  • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! Solo_Wolf, 17:03 , 05-Апр-06 (1)
    • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! dima_k, 17:33 , 05-Апр-06 (2)

      >APPEND=/dev/nfs - это в корне неверно... man mknbi

      Поставил mknbi. Почитал. Нашел хорошую команду:

      mkelf-linux --ip=192.168.4.100:192.168.4.110:192.168.4.97:255.255.255.224:dk1.loc vmlinuz-2.6.16 > test

      Сделал тестовое загрузочное ядро. Возможности проверить сейчас нет, но по-моему дело было в этом.

      Вопрос насчет APPEND=/dev/nfs. Здесь все сделано по мануалу.
      На сервере до этого было сделано: cd /dev; ./MAKEDEV nfs
      В результате добавился файл устройства /dev/nfsd
      В чем здесь проблемы?

      • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! Solo_Wolf, 17:52 , 05-Апр-06 (3)
      • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! Solo_Wolf, 17:53 , 05-Апр-06 (4)
        • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! dima_k, 18:12 , 06-Апр-06 (5)

          >И еще совет. Совсем не надо заново компилить ядро. Можно все что
          >нужно закинуть в initrd.

          Как я понял, сейчас моя строка предачи параметров ядру должна быть:
          APPEND root=/dev/nfs nfsroot=192.168.4.110:/clients/192.168.4.100/root
          где 192.168.4.110 - сервер
          /clients/192.168.4.100/root - дира, которая будет монтироваться как root
          Странно, что этого в мануале не было (пользовался мануалом на linux-mag.org).
          Кстати там же говорится об обязательном компилировании нового ядра с поддержкой nfsroot, что я и сделал. Насчет initrd сложно представить, как это можно сделать. Ведб это же образ, который тоже компилится. Можно правит только стартовые скрипты, но у меня загрузка дропается еще до их авполнения (я говорил, kernel panic из-за nfsroot).
          Спасибо за ответ. Завтра попробую протестить.

          • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! Solo_Wolf, 20:27 , 06-Апр-06 (6)
            • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! dima_k, 18:27 , 07-Апр-06 (7)
              Короче, запустил я все это дело.

              Мой файл pxelinux.cfg/default
              LABEL linux
                KERNEL vmlinuz-2.6.15
                APPEND nfsroot=192.168.4.110:/clients/192.168.4.100/root

              Ядро test не загрузилось (такая же ошибка), поэтому поставил системное ядро.
              192.168.4.110 - адрес сервера
              /clients/192.168.4.100/root - рутовая директория на сервере для клиента (полностью реплицированная файловая система).

              Ядро предполагаю скомпилено без поддержки nfsroot (просто так оно компилится по дефолту). В мануале делается упор на сборку именно с nfsroot.

              Итак, выскакивает ошибка:
              EXT2-fs: unable to read superblock
              iso_fill_super: bread failed, dev=md1, iso_blknum=16, block=32
              Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (9, 1)

              Кстати, насчет документации. Думаю, там ошибка: вместо root=/dev/nfs следует писать boot=/dev/nfs. При этой замене выскакивает такая же ошибка.
              Повторяю, ядро собрано скорее всего без поддержки nfsroot и с модулями. То, что я скомпилил - не хочет удаленно грузиться. До initrd дело не доходит, так что дело не в нем.
              В чем же все таки здесь дело?

              Могу привести строчки из документации:
              INSTALL PXELINUX

              With DHCP configured to tell the PXE ROM the location of the network boot program, you need to find and install a suitable NBP. PXELinux is a network boot program developed by the author of the SYSLinux boot loader. It uses the PXE API to locate and download a configuration file, and then uses that configuration file to download and execute the Linux kernel. You can download the newest version of SysLinux from www.kernel.org and copy the file pxelinux.0 to the /tftpboot directory.

              When PXELinux boots on the client, it tries to load a configuration file. Create an initial configuration file /tftpboot/pxelinux.cfg/default containing the following lines:

              LABEL linux
                KERNEL vmlinuz-2.2.20
                APPEND root=/dev/nfs

              COMPILING A NEW KERNEL

              Although there are other approaches, let's recompile the kernel to include all of the network drivers that are needed, plus a few other useful tidbits. Using make menuconfig, make sure you have the items shown in Figure One compiled into the kernel (do not compile them as modules):

              Figure One: Building a kernel for the network boot clients
              Network Device Support/Ethernet

              No real harm comes from including unused PCI Ethernet drivers, so go ahead and include any that are in common use on your network.
              Networking Options

              The kernel needs to perform a DHCP request when it boots to initialize the network interfaces. You should enable IP: kernel-level configuration support (CONFIG_IP_PNP) and the two sub-options Enable by default (CONFIG_IP_PNP_ENABLE) and DHCP support (CONFIG_IP_PNP_DHCP).
              Filesystems/Network File Systems

              The kernel needs to be able to access its root filesystem using NFS. You should enable NFS filesystem support (CONFIG_NFS _FS) and the two sub-options NFS version 3 support (CONFIG _NFS_V3) and Root file system on NFS (CONFIG_ROOT_NFS).
              Block Devices

              While not strictly necessary, ram disk support can be very useful. Enable RAM disk support (CONFIG_BLK_DEV_RAM).

              Once you've configured the client kernel of your dreams save the configuration, compile the new kernel, and copy the kernel file to /tftpboot:

              # make dep bzImage
              # cp arch/i386/boot/bzImage \ /tftpboot/vmlinuz-X.X.X
              #

              Remember to replace X.X.X with the correct version for this kernel. Also remember that this is the kernel for the client, so you should not use make install to install it.

              TEST BOOT

              Double-check the PXELinux configuration in /tftpboot/ pxelinux.cfg/default to make sure the kernel file specified there matches the kernel file in the /tftpboot directory. Then try booting your client machine.

              This time, PXELinux should boot and load the Linux kernel file. Watch to make sure that the kernel successfully detects the Ethernet card in the client machine and successfully obtains startup information from DHCP.

              If anything goes wrong, double-check your kernel configuration. You may have accidentally compiled a critical component as a module.

              This time, the boot will fail when Linux is unable to mount the root filesystem. That's ok. We're making progress. Next, we mount filesystems from the server.

              Благодярю всех ответивших.

            • Invalid or corrupt kernel image во время удаленной загрузки ..., !*! dima_k, 20:24 , 07-Апр-06 (8)
              Предыдущий пост можно не читать. Пофиксил проблему. Мой конфиг:
              LABEL linux
                KERNEL vmlinuz-2.6.16
                APPEND initrd=initrd-2.6.16.img root=192.168.4.110:/clients/192.168.4.100/root

              Ядро системное.
              Но при загрузке выскакивает другая ошибка
              switchroot: mount failed: 22
              Kernel panic - not syncing: Attempted tp kill init!
              Перед этим она ругается на мою ext3 и то, что не может найти /dev/console. Глянул - /dev для клиента у меня путой. Все файлы устройств перекинул в /clients/192.168.4.100/root/dev/ - такие же ошибки.
              Есть ли какие-либо приколы с настройкой dev? И почему он не переваривает ext3? И, наконец, как пофиксить ошибку.
              Благодарю всех ответивших.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру