pxe を使用して、qemu を介して古いバージョンの grub を起動します。

pxe を使用して、qemu を介して古いバージョンの grub を起動します。

私はpxeを使ってqemuを介して古いバージョンのgrubを起動しようとしました。何らかの理由で、grubはメニューを表示せずに次のエラーを表示し、コマンドモードに入ります。

Error15: File not found.
grub rescue>

これは私のディレクトリ構造です。

/var/lib/tftpboot
| - pxelinux.0
| - pxegrub.0
| - pxelinux.cfg
    | default
| - boot
    | grub
          |default        
          |fat_stage1_5
          |menu.lst
          |stage1
          |device.map
          |installed-version  
          |minix_stage1_5     
          |stage2
          |e2fs_stage1_5 
          |jfs_stage1_5
          |reiserfs_stage1_5  
          |xfs_stage1_5
 |x86_64

pxelinux.cfg/defaultの内容:

 default vesamenu.c32
prompt 0

menu title Available Installations (scroll down for more options)
menu autoboot Starting grub2 in # Seconds
timeout 30

label local
  menu label Boot From Local Disk
  localboot 0

label grub
  menu label grub
  menu default
        kernel pxegrub.0

menu end

menu.lstの内容:

timeout 0

# spawnd is used to control which cpus are booted
#
# "spawnd boot" will use the skb and pci to figure out and
#  boot all cores in the machine
#
# "spawnd boot bootapic-x86_64=1-5" will not use the skb and
# boot the list of cores passed as argument.
# The APIC id of the cores to boot should be specified.
# This list may not include the bsp core id.

title   Barrelfish
root    (nd)
kernel  /x86_64/sbin/elver loglevel=4
module  /x86_64/sbin/cpu loglevel=4
module  /x86_64/sbin/init

# Domains spawned by init
module  /x86_64/sbin/mem_serv
module  /x86_64/sbin/monitor

# Special boot time domains spawned by monitor
module  /x86_64/sbin/ramfsd boot
module  /x86_64/sbin/skb boot
modulenounzip /skb_ramfs.cpio.gz nospawn
module  /x86_64/sbin/kaluga boot
module  /x86_64/sbin/acpi boot
module  /x86_64/sbin/spawnd boot

#bootapic-x86_64=1-15
module  /x86_64/sbin/startd boot
module /x86_64/sbin/routing_setup boot

# Drivers
module /x86_64/sbin/pci auto
module /x86_64/sbin/ahcid auto
module /x86_64/sbin/rtl8029 auto
module /x86_64/sbin/e1000n auto
module /x86_64/sbin/NGD_mng auto
module /x86_64/sbin/netd auto

# General user domains
module  /x86_64/sbin/serial
module  /x86_64/sbin/fish
module  /x86_64/sbin/hellotest
module  /x86_64/sbin/ahcialloctest
module  /x86_64/sbin/idctest client
module  /x86_64/sbin/idctest server

次のコマンドを使用して grub イメージを生成します。

grub-mkimage --format=i386-pc-pxe --output=grub.pxe --prefix='(pxe)/boot/grub' pxe pxecmd

ベストアンサー1

grub-mkimageGRUB 従来のイメージではなく GRUB 2 イメージを作成します。grub rescue>これはGRUB 2を起動しているという信号でもあります。

stage2ここではなくロードする必要がありますpxegrub.0

GRUBレガシー一部バージョンはいnetbootをサポートしていますが、どこで使用するかを推奨するには、オペレーティングシステムまたは少なくともエミュレートするQEmuネットワークカードモデルを知る必要があります(MirBSDには、netbootをサポートするプリコンパイルされたGRUBレガシーイメージがたくさんあります)。

おすすめ記事