help-grub
[Top][All Lists]
Advanced

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

Using (http) to load Linux?


From: Preston L. Bannister
Subject: Using (http) to load Linux?
Date: Tue, 7 Dec 2021 20:35:40 -0800

Looking for a hint. In the end, the error I am trying to track down is:

  *error: premature end of file
(http)/boot/vmlinuz-4.18.0-305.3.1.el8.x86_64*

Are there known-issues with loading via HTTP? Has anyone else seen this
error?

If I use *curl* to fetch the same URL, I get a byte-identical copy of the
source and no complaints. So ... kind of doubting the above error.

Did not see anything obvious in the mailing list archive. Looking through
the GRUB sources from Git, at present.


== Full background ==

Have thirty or so diskless computers I am trying to boot off the network.
The computers are Xeon-D CPUs with a UEFI BIOS.

Have a script (in Javascript, mostly) that generates *dnsmasq* and *GRUB*
configuration files, specific to each computer. From the log (below), I can
see that the appropriate configuration files are picked up by both dnsmasq
and GRUB.

Both the boot-server and diskless computers are or will run Centos 8.4
(though that should be largely not relevant). Started from GRUB version
2.03 (as that comes with Centos 8.4, but switched to GRUB version 2.06
(latest released, last I looked).

Using  NodeJS and a custom HTTP server written in Javascript to serve Linux
and initrd. I can see from the HTTP server side the (correct) URL requested.


Log from the boot:
===============
Version 2.17.1255 VT-R11. Copyright (C) 2021 American Megatrends, Inc.
BIOS Date: 08/02/2021 12:12:11 Ver: 0ACFK023
Press <DEL> or <ESC> to enter setup.

>>Checking Media Presence......
>>Media Present......
>>Start PXE over IPv4.

  Station IP address is 10.32.20.10
  Server IP address is 10.32.0.1

  NBP filename is /boot/grub/x86_64-efi/core.efi
  NBP filesize is 225280 Bytes

>>Checking Media Presence......
>>Media Present......

 Downloading NBP file...
  Succeed to download NBP file.

Welcome to GRUB!

    HOST.KEY      = 00133A139CDB
    HOST.KIND     = VPX552
    HOST.SERIAL   = 09210156
 GENERAL.DEVICE   = enp0s20u1
 GENERAL.TYPE     = ethernet
 GENERAL.VENDOR   = Standard Microsystems Corp.
 GENERAL.PRODUCT  = LAN7800
 GENERAL.HWADDR   = 00:13:3A:13:9C:E3
    CAST.HOST     = 00133A139CDB
    CAST.SYSTEM   = LRR
    CAST.ROLE     = txantenna
  LINKED.LINK     = 00:13:3A:13:9C:E3
  LINKED.SUBNET   = cp.inner
  SYSTEM.SYSTEM   = LRR
  SYSTEM.KIND     = radar
  SYSTEM.NET      = 20

==== environment - START
?=0
cmdpath=(tftp,10.32.0.1)/boot/grub/x86_64-efi
color_highlight=black/light-gray
color_normal=light-gray/black
config_directory=(tftp,10.32.0.1)//boot/grub
config_file=(tftp,10.32.0.1)//boot/grub/grub.cfg-01-00-13-3a-13-9c-e3
debug=cache,chain,devalias,disk,diskfilter,dl,dns,drivemap,efi,efidisk,efiemu,f
dt,fdtbus,fs,gpt,hostdisk,http,init,linux,loader,memdisk,mmap,modules,net,net,s
ections,serial,syslinux,tftp,ubootdisk
feature_200_final=y
feature_all_video_module=y
feature_chainloader_bpb=y
feature_default_font_path=y
feature_menuentry_id=y
feature_menuentry_options=y
feature_nativedisk_cmd=y
feature_ntldr=y
feature_platform_search_hint=y
feature_timeout_style=y
grub_cpu=x86_64
grub_platform=efi
lang=
locale_dir=
net_default_interface=efinet0
net_default_ip=10.32.20.10
net_default_mac=00:13:3a:13:9c:e3
net_default_server=10.32.0.1
net_efinet0_boot_file=/boot/grub/x86_64-efi/core.efi
net_efinet0_domain=radar
net_efinet0_hostname=txantenna
net_efinet0_ip=10.32.20.10
net_efinet0_mac=00:13:3a:13:9c:e3
net_efinet0_next_server=10.32.0.1
pager=
prefix=(tftp,10.32.0.1)//boot/grub
pxe_default_server=10.32.0.1
root=tftp,10.32.0.1
secondary_locale_dir=
==== environment - END

##  linux (http)/boot/vmlinuz-4.18.0-305.3.1.el8.x86_64 ip=dhcp
root=nfs:10.32.0.1:/nfsroot rw raid=noautodetect console=ttyS0,115200

kern/disk.c:196: Opening `tftp,10.32.0.1'...
disk/efi/efidisk.c:482: opening tftp
kern/disk.c:281: Opening `tftp,10.32.0.1' failed.
kern/disk.c:295: Closing `tftp'.
kern/dl.c:611: module at 0x68507360, size 0x4c40
kern/dl.c:635: relocating to 0x68576d60
kern/disk.c:196: Opening `tftp,10.32.0.1'...
disk/efi/efidisk.c:482: opening tftp
kern/disk.c:281: Opening `tftp,10.32.0.1' failed.
kern/disk.c:295: Closing `tftp'.
kern/dl.c:611: module at 0x68564e40, size 0x2278
kern/dl.c:635: relocating to 0x68576b80
kern/dl.c:565: flushing 0x1f7d bytes at 0x68567da0
kern/dl.c:658: module name: video
kern/dl.c:659: init function: 0x0
kern/disk.c:196: Opening `tftp,10.32.0.1'...
disk/efi/efidisk.c:482: opening tftp
kern/disk.c:281: Opening `tftp,10.32.0.1' failed.
kern/disk.c:295: Closing `tftp'.
kern/dl.c:611: module at 0x684f8ca0, size 0x6650
kern/dl.c:635: relocating to 0x685769a0
kern/disk.c:196: Opening `tftp,10.32.0.1'...
disk/efi/efidisk.c:482: opening tftp
kern/disk.c:281: Opening `tftp,10.32.0.1' failed.
kern/disk.c:295: Closing `tftp'.
kern/dl.c:611: module at 0x68513780, size 0x2498
kern/dl.c:635: relocating to 0x685767c0
kern/dl.c:565: flushing 0x2136 bytes at 0x68564f80
kern/dl.c:658: module name: mmap
kern/dl.c:659: init function: 0x68565cb7
kern/dl.c:565: flushing 0x62aa bytes at 0x6850f960
kern/dl.c:658: module name: relocator
kern/dl.c:659: init function: 0x0
kern/dl.c:565: flushing 0x4d5e bytes at 0x685025e0
kern/dl.c:658: module name: linux
kern/dl.c:659: init function: 0x68503ad5
kern/disk.c:196: Opening `http'...
disk/efi/efidisk.c:482: opening http
kern/disk.c:281: Opening `http' failed.
kern/disk.c:295: Closing `http'.
kern/disk.c:196: Opening `tftp,10.32.0.1'...
disk/efi/efidisk.c:482: opening tftp
kern/disk.c:281: Opening `tftp,10.32.0.1' failed.
kern/disk.c:295: Closing `tftp'.
kern/dl.c:611: module at 0x6850a6e0, size 0x2240
kern/dl.c:635: relocating to 0x68577f80
kern/dl.c:565: flushing 0x1eb6 bytes at 0x68508800
kern/dl.c:658: module name: http
kern/dl.c:659: init function: 0x68509545
mmap/efi/mmap.c:66: EFI memory region 0x0-0x8000: 3
mmap/efi/mmap.c:66: EFI memory region 0x8000-0x70000: 7
mmap/efi/mmap.c:66: EFI memory region 0x70000-0xa0000: 3
mmap/efi/mmap.c:66: EFI memory region 0x100000-0x3882000: 2
mmap/efi/mmap.c:66: EFI memory region 0x3882000-0x4b7b7000: 7
mmap/efi/mmap.c:66: EFI memory region 0x4b7b7000-0x685d0000: 1
mmap/efi/mmap.c:66: EFI memory region 0x685d0000-0x686d0000: 4
mmap/efi/mmap.c:66: EFI memory region 0x686d0000-0x73803000: 7
mmap/efi/mmap.c:66: EFI memory region 0x73803000-0x73804000: 2
mmap/efi/mmap.c:66: EFI memory region 0x73804000-0x7380a000: 7
mmap/efi/mmap.c:66: EFI memory region 0x7380a000-0x73841000: 1
mmap/efi/mmap.c:66: EFI memory region 0x73841000-0x78145000: 4
mmap/efi/mmap.c:66: EFI memory region 0x78145000-0x7829f000: 7
mmap/efi/mmap.c:66: EFI memory region 0x7829f000-0x78808000: 3
mmap/efi/mmap.c:66: EFI memory region 0x78808000-0x79380000: 0
mmap/efi/mmap.c:66: EFI memory region 0x79380000-0x79489000: 7
mmap/efi/mmap.c:66: EFI memory region 0x79489000-0x798f6000: 10
mmap/efi/mmap.c:66: EFI memory region 0x798f6000-0x7bd09000: 6
mmap/efi/mmap.c:66: EFI memory region 0x7bd09000-0x7bd8c000: 5
mmap/efi/mmap.c:66: EFI memory region 0x7bd8c000-0x7bd8d000: 4
mmap/efi/mmap.c:66: EFI memory region 0x7bd8d000-0x7be13000: 6
mmap/efi/mmap.c:66: EFI memory region 0x7be13000-0x7c000000: 4
mmap/efi/mmap.c:66: EFI memory region 0x100000000-0x880000000: 7
mmap/efi/mmap.c:66: EFI memory region 0xa0000-0x100000: 0
mmap/efi/mmap.c:66: EFI memory region 0x7c000000-0x80000000: 0
mmap/efi/mmap.c:66: EFI memory region 0x80000000-0x90000000: 11
mmap/efi/mmap.c:66: EFI memory region 0xfed1c000-0xfed20000: 11
mmap/efi/mmap.c:66: EFI memory region 0xff000000-0x100000000: 11
loader/i386/linux.c:206: prot_mode_mem = 0x3a00000, prot_mode_target =
3a00000,
prot_size = 3782000
loader/i386/linux.c:859: bzImage, setup=0x4400, size=0x3782000
error: premature end of file (http)/boot/vmlinuz-4.18.0-305.3.1.el8.x86_64.

... loaded Linux
... loading ramdisk
error: you need to load the kernel first.
... loaded ramdisk
... booting
error: you need to load the kernel first.
... booted

GNU GRUB  version 2.06

   Minimal BASH-like line editing is supported. For the first word, TAB
   lists possible command completions. Anywhere else TAB lists possible
   device or file completions.

grub>
===============

GRUB configuration file: *grub.cfg-01-00-13-3a-13-9c-e3*
===============
serial --speed=115200
terminal_output serial

echo '    HOST.KEY      = 00133A139CDB'
echo '    HOST.KIND     = VPX552'
echo '    HOST.SERIAL   = 09210156'
echo ' GENERAL.DEVICE   = enp0s20u1'
echo ' GENERAL.TYPE     = ethernet'
echo ' GENERAL.VENDOR   = Standard Microsystems Corp.'
echo ' GENERAL.PRODUCT  = LAN7800'
echo ' GENERAL.HWADDR   = 00:13:3A:13:9C:E3'
echo '    CAST.HOST     = 00133A139CDB'
echo '    CAST.SYSTEM   = LRR'
echo '    CAST.ROLE     = txantenna'
echo '  LINKED.LINK     = 00:13:3A:13:9C:E3'
echo '  LINKED.SUBNET   = cp.inner'
echo '  SYSTEM.SYSTEM   = LRR'
echo '  SYSTEM.KIND     = radar'
echo '  SYSTEM.NET      = 20'

set
debug=cache,chain,devalias,disk,diskfilter,dl,dns,drivemap,efi,efidisk,efiemu,fdt,fdtbus,fs,gpt,hostdisk,http,init,linux,loader,memdisk,mmap,modules,net,net,sections,serial,syslinux,tftp,ubootdisk
echo "==== environment - START"
set
echo "==== environment - END"

echo "##  linux (http)/boot/vmlinuz-4.18.0-305.3.1.el8.x86_64 ip=dhcp
root=nfs:10.32.0.1:/nfsroot rw raid=noautodetect console=ttyS0,115200"
linux (http)/boot/vmlinuz-4.18.0-305.3.1.el8.x86_64 ip=dhcp
root=nfs:10.32.0.1:/nfsroot rw raid=noautodetect console=ttyS0,115200
echo "... loaded Linux"

echo "... loading ramdisk"
initrd  (http)/boot/initrd.img
echo "... loaded ramdisk"

echo "... booting"
boot
echo "... booted"
===============


reply via email to

[Prev in Thread] Current Thread [Next in Thread]