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

物理Ubuntu机器转VirtualBox镜像后启动报错:No bootable Medium found!

物理Ubuntu机器转VirtualBox镜像后启动报错:No bootable Medium found!

Hey there, sorry you're stuck on this boot error—let's break down the problem and fix it step by step!

问题根源

The key issue here is that you used dd to back up only a single partition (/dev/sda1) instead of the entire physical disk (/dev/sda). Bootable systems rely on the master boot record (MBR) or GRUB bootloader, which lives in the very first sector of the whole disk (not inside a single partition like /dev/sda1). Your converted VMDK only has the data from /dev/sda1—it's missing the critical boot metadata VirtualBox needs to start the system.

解决方法

方法1:重新制作完整镜像(最稳妥)

This is the recommended approach because it captures all the necessary boot and partition data:

  • Go back to your physical Ubuntu machine, and run this command to back up the entire disk (not just /dev/sda1):
    dd if=/dev/sda of=/mnt/f/disk.raw bs=1024
    
    Note: This will include all partitions (like swap, data partitions) and the boot sector, so your VirtualBox VM will have an exact copy of the physical system.
  • Convert the full raw image to VMDK again:
    VBoxManage convertfromraw /mnt/f/disk.raw /mnt/f/disk.vmdk --format VMDK
    
  • Create a new VirtualBox VM (or replace the existing disk in your current VM) with this new VMDK, then try booting again.

方法2:修复现有镜像的引导(如果不想重新备份)

If re-backing up the disk isn't feasible right now, you can repair the bootloader on your existing VMDK:

  1. In VirtualBox, edit your VM's settings: add an Ubuntu installation ISO as a CD/DVD drive, and set the VM to boot from the CD first.
  2. Start the VM and select "Try Ubuntu" (don't install it).
  3. Open a terminal and identify your VMDK's partition:
    lsblk
    
    Look for a partition that matches the size of your original /dev/sda1 (it'll probably be /dev/sda1 in the live environment).
  4. Mount the partition and fix GRUB:
    sudo mount /dev/sda1 /mnt
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    sudo chroot /mnt
    grub-install /dev/sda
    update-grub
    exit
    
  5. Unmount the mounted directories:
    sudo umount /mnt/sys
    sudo umount /mnt/proc
    sudo umount /mnt/dev
    sudo umount /mnt
    
  6. Shut down the VM, remove the Ubuntu ISO from the CD drive, set the VM to boot from the hard disk first, then try starting it again.

额外检查

  • Double-check your VM's System > Boot Order settings to ensure the hard disk is at the top of the list.
  • Confirm that your VM's architecture (64-bit) matches your physical Ubuntu system—if your physical machine is 32-bit, selecting "Ubuntu 64-bit" would cause issues (but it sounds like you got this right!).

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.21 12:29:34