QubesはFedora / Qubesデュアルブートコンピュータから起動できません。

QubesはFedora / Qubesデュアルブートコンピュータから起動できません。

私の目標は、Qubes OS 3.1とFedora 23 Workstation(respin)のデュアルブートを達成することです。この男Ubuntuで動作しますが、彼はUbuntuを最初にインストールし、Qubesを最初にインストールしました。最後の手段は彼に従い、最初から再インストールすることでしたが、私は何かを学びたいと思いました。

私が試したこと:

  • Qubes OS 3.1のインストール(確認)
  • Qubes OS 3.1 dom0およびFedora23テンプレートの更新(確認)
  • 最新のFedora 23 Workstation respinがインストールされました(大丈夫ですが、一部のGRUB2ブートローダ障害が報告されていますが、Fedoraは正常に起動します)。
  • 最新のFedora 23 Workstationにアップデートされました(更新なし)。
  • Qubesを起動してみてください(失敗しました。まだGRUB2ブートメニューにメニュー項目がありません)。
  • Qubesのメニュー項目を作成しました(確認、以下を参照)。
  • Qubesを起動しようとしました(失敗しました。を参照)。スクリーンショット)
  • Google検索このソリューションそしてパッケージをインストールしました
  • 今はエラーが発生しますが、数秒後にシステムが自動的に再起動し、これは無限に実行されます。

メニュー項目をどのように追加しますか?

Fedoraから起動し、フォルダ/etc/grub.d/に移動してファイルを編集します40_custom。 qubes ブートパーティションの /boot/grub2/grub.cfg ファイルの xen セクションの間にあるすべての内容を40_customFedora のファイルの末尾に貼り付けました。その後、ルートで次のコマンドを実行しました。

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

そして qubes メニュー項目が作成され、grub.cfgブートメニューに表示されます。後で grub.cfg の内容を提供できます。これまで何が間違っているのか、どう解決するのか知りたいです。

注目すべき情報:

  • Qubesは、レガシーBIOS(2MBのBIOSブートパーティションを含む)のGPTから起動します。
  • FedoraはUEFI(EFIパーティションを含む)のGPTから起動します。
  • /boot各オペレーティングシステムには別々のパーティションがあり、他のパーティションもあります。
  • /boot追加パーティションなし

コミットされた grub.cfg は次のようになります。

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora (4.4.8-300.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.4.8-300.fc23.x86_64-advanced-d43f46bc-7649-44ca-b02d-7599d115a8e8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt6'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  440e2ced-56a2-432f-95e0-c5f1c33941a9
    else
      search --no-floppy --fs-uuid --set=root 440e2ced-56a2-432f-95e0-c5f1c33941a9
    fi
    linuxefi /vmlinuz-4.4.8-300.fc23.x86_64 root=UUID=d43f46bc-7649-44ca-b02d-7599d115a8e8 ro rootflags=subvol=root00 rhgb quiet 
    initrdefi /initramfs-4.4.8-300.fc23.x86_64.img
}
menuentry 'Fedora (0-rescue-1dccfd914c254de687a4ba1c13e159a9) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-1dccfd914c254de687a4ba1c13e159a9-advanced-d43f46bc-7649-44ca-b02d-7599d115a8e8' {
    load_video
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt6'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  440e2ced-56a2-432f-95e0-c5f1c33941a9
    else
      search --no-floppy --fs-uuid --set=root 440e2ced-56a2-432f-95e0-c5f1c33941a9
    fi
    linuxefi /vmlinuz-0-rescue-1dccfd914c254de687a4ba1c13e159a9 root=UUID=d43f46bc-7649-44ca-b02d-7599d115a8e8 ro rootflags=subvol=root00 rhgb quiet 
    initrdefi /initramfs-0-rescue-1dccfd914c254de687a4ba1c13e159a9.img
}
if [ "x$default" = 'Fedora (4.4.8-300.fc23.x86_64) 23 (Workstation Edition)' ]; then default='Advanced options for Fedora>Fedora (4.4.8-300.fc23.x86_64) 23 (Workstation Edition)'; fi;
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Qubes, with Xen hypervisor' --class qubes --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-simple-6e934da1-b43d-434b-83b2-878d454fb6bd' {
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 --hint='hd0,gpt2'  9c6e43e7-856f-4840-a04f-6936735f5835
    else
      search --no-floppy --fs-uuid --set=root 9c6e43e7-856f-4840-a04f-6936735f5835
    fi
    echo    'Loading Xen 4.6.0 ...'
        if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then
            xen_rm_opts=
        else
            xen_rm_opts="no-real-mode edd=off"
        fi
    multiboot   /xen-4.6.0.gz placeholder  console=none dom0_mem=min:1024M dom0_mem=max:4096M ${xen_rm_opts}
    echo    'Loading Linux 4.1.13-9.pvops.qubes.x86_64 ...'
    module  /vmlinuz-4.1.13-9.pvops.qubes.x86_64 placeholder root=UUID=6e934da1-b43d-434b-83b2-878d454fb6bd ro rootflags=subvol=root i915.preliminary_hw_support=1 vconsole.font=latarcyrheb-sun16 rhgb quiet 
    echo    'Loading initial ramdisk ...'
    module  /initramfs-4.1.13-9.pvops.qubes.x86_64.img
}
submenu 'Advanced options for Qubes (with Xen hypervisor)' $menuentry_id_option 'gnulinux-advanced-6e934da1-b43d-434b-83b2-878d454fb6bd' {
    submenu 'Xen hypervisor, version 4.6.0' $menuentry_id_option 'xen-hypervisor-4.6.0-6e934da1-b43d-434b-83b2-878d454fb6bd' {
        menuentry 'Qubes, with Xen 4.6.0 and Linux 4.1.13-9.pvops.qubes.x86_64' --class qubes --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-4.1.13-9.pvops.qubes.x86_64-advanced-6e934da1-b43d-434b-83b2-878d454fb6bd' {
            insmod part_gpt
            insmod ext2
            set root='hd0,gpt2'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 --hint='hd0,gpt2'  9c6e43e7-856f-4840-a04f-6936735f5835
            else
              search --no-floppy --fs-uuid --set=root 9c6e43e7-856f-4840-a04f-6936735f5835
            fi
            echo    'Loading Xen 4.6.0 ...'
                if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then
                    xen_rm_opts=
                else
                    xen_rm_opts="no-real-mode edd=off"
                fi
            multiboot   /xen-4.6.0.gz placeholder  console=none dom0_mem=min:1024M dom0_mem=max:4096M ${xen_rm_opts}
            echo    'Loading Linux 4.1.13-9.pvops.qubes.x86_64 ...'
            module  /vmlinuz-4.1.13-9.pvops.qubes.x86_64 placeholder root=UUID=6e934da1-b43d-434b-83b2-878d454fb6bd ro rootflags=subvol=root i915.preliminary_hw_support=1 vconsole.font=latarcyrheb-sun16 rhgb quiet 
            echo    'Loading initial ramdisk ...'
            module  /initramfs-4.1.13-9.pvops.qubes.x86_64.img
        }
    }
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/40_custom.backup ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom.backup ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

コピーも可能パステルビンについて。

ベストアンサー1

以下は、Qubes OSのコア開発者の一人であるMarek Marczykowski-Górecki(Invisible Things Lab)の権威ある答えです。ソースはqubes ユーザーフォーラム、私が元々この質問をしたところです。

これが主な問題です。 UEFI grub(Fedora)から古いシステム(ここではQubes)を起動しようとしています。レガシーモードで起動するか、UEFIモードで起動するか(または起動するたびにBIOS設定の変更...)のいずれかを選択する必要があります。したがって、1つのオプションはFedoraをレガシーモードに設定することです。その後、Qubesレガシーブートエントリを(ユーザーが行ったように)40_customに入れるだけで十分です。

UEFIからQubesを起動することも可能ですが、他の設定が必要です。ほとんどの場合、Grubを使用すると簡単にできません。とにかく試してみてください。

  1. xen-4.6.0.efiを探してください。 /boot/efi/EFI/qubes/ にインストールする必要があります。 EFIシステムパーティションに配置します(/boot/efiがまだ存在しない場合)。

  2. 次の内容で同じディレクトリにxen.cfgを作成します。

    [グローバル] デフォルト=4.1.13-8.pvops.qubes.x86_64

    [4.1.13-8.pvops.qubes.x86_64] options=loglvl=all kernel=vmlinuz-4.1.13-8.pvops.qubes.x86_64 root=/dev/dm-2 vconsole.font=latarcyrheb-sun16 rd. lvm.lv=qubes_dom0/root ramdisk=initramfs-4.1.13-8.pvops.qubes.x86_64.img

    カーネルバージョン、root =、およびrd.lvm.lv =パラメーターを調整します。

  3. カーネルファイルとinitramfsファイルがxen.cfgと同じディレクトリにあることを確認してください(ほとんど/ bootからコピーする必要があります)。 Grubが別の場所からロードできる場合でも、EFIシステムパーティションに配置することが重要です。

  4. グラップ項目を追加します。

    メニュー項目 'Qubes UEFI' { chainloader /EFI/qubes/xen-4.6.0.efi }

ここで関連するトラブルシューティングを確認してください。 https://www.qubes-os.org/doc/uefi-troubleshooting/ https://github.com/QubesOS/qubes-issues/issues/794

おすすめ記事