You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

多系统引导故障:安装Kali Linux与Ubuntu后Grub无法识别Arch Linux

多系统引导故障:安装Kali Linux与Ubuntu后Grub无法识别Arch Linux

Hey there, let's get your Arch Linux back in the Grub boot menu! I’ve dealt with this exact multi-boot headache before, so let’s walk through the fix step by step, tailored to your Btrfs setup on /dev/sda2.

Step 1: Mount your Arch Linux partition

First, boot into either Ubuntu or Kali (whichever you can access right now) and open a terminal. We need to mount your Arch partition to access its boot files:

  • Create a temporary mount point:
    sudo mkdir /mnt/arch
  • Mount the Btrfs partition. If you didn’t use subvolumes when setting up Arch, run:
    sudo mount /dev/sda2 /mnt/arch
  • If you did use subvolumes (super common for Arch Btrfs setups, usually named @ or @root), first check what subvolumes exist after mounting the raw partition:
    sudo btrfs subvolume list /mnt/arch
    Then mount the correct subvolume, for example:
    sudo mount -o subvol=@ /dev/sda2 /mnt/arch

Step 2: Locate Arch’s kernel and initramfs files

Next, confirm the exact names of your Arch kernel and initramfs—they live in the /boot directory of your Arch install:
ls /mnt/arch/boot
You’ll see files like vmlinuz-linux and initramfs-linux.img (there might be a fallback version too, but we’ll use the default ones). Jot these names down if you need to.

Step 3: Add a custom Grub entry for Arch

We’ll edit Grub’s custom configuration file (this won’t get overwritten by future update-grub runs):

  • Open the custom file with nano:
    sudo nano /etc/grub.d/40_custom
  • Scroll to the end of the file and paste the following entry, adjusting it to match your setup:
menuentry "Arch Linux" {
    # Load the right partition module (use part_gpt if your disk uses GPT, part_msdos for MBR)
    insmod part_msdos
    insmod btrfs
    # Set the root to your Arch partition: hd0 is your first disk, msdos2 is the 2nd partition on MBR; use gpt2 for GPT
    set root='hd0,msdos2'
    # Point to your kernel, set root partition, and add subvolume flag if needed
    linux /vmlinuz-linux root=/dev/sda2 rw rootflags=subvol=@
    # Point to your initramfs file
    initrd /initramfs-linux.img
}

Quick notes on adjustments:

  • If your disk uses GPT instead of MBR, replace part_msdos with part_gpt and msdos2 with gpt2 in the set root line.
  • If you don’t use subvolumes, remove the rootflags=subvol=@ part from the linux line.
  • Double-check the kernel/initramfs filenames match what you saw in /mnt/arch/boot.

Save the file by pressing Ctrl+O, then exit nano with Ctrl+X.

Step 4: Update Grub and test

Finally, update the Grub configuration to include your new custom entry:
sudo update-grub
You should see a line saying it detected your custom Arch entry. Now reboot your system—Arch Linux should show up in the Grub menu!

If something doesn’t work, double-check that you mounted the correct partition/subvolume and that the paths in the menu entry match your actual files.

备注:内容来源于stack exchange,提问作者Aditya Singh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 10:54:28