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

Ubuntu 17.10因恢复文件占满硬盘无法启动,求助解决方案

Hey there, let's work through this problem step by step—you're dealing with two urgent issues right now: getting your Ubuntu 17.10 system back up and running, then trying to recover that deleted Windows 7 VM. Let's start with the boot failure first since that's the most immediate block.

Step 1: Fix Ubuntu 17.10 Boot Issues

The sudden restart during the Photorec process likely caused file system corruption or left your disk full, which is preventing Ubuntu from booting. Here's how to fix it:

  • Boot into recovery mode first
    When your machine starts, hold down the Shift key (use Esc if you're on a UEFI system) to bring up the GRUB menu. Select Advanced options for Ubuntu, then pick the kernel version labeled with recovery mode. Once in the recovery menu:

    1. Choose fsck – this tool scans and repairs file system errors, which is probably needed after the forced restart. Confirm the repair when prompted.
    2. If fsck doesn't resolve the boot issue, select root to enter a root shell. Run df -h to check disk usage, then delete the Photorec recovery files (they're usually in a folder you specified, e.g., rm -rf /home/yourusername/photorec_recovered) to free up space. Type exit and select resume normal boot afterward.
  • Use a live USB if recovery mode fails
    Create an Ubuntu 17.10 live USB (use another computer to download the ISO and write it to a USB drive with tools like Etcher). Boot from the USB and select Try Ubuntu without installing:

    1. Open Files, find your Ubuntu system partition, and click to mount it.
    2. Open a terminal, run lsblk to identify your system partition (e.g., /dev/sda1), then run sudo fsck /dev/sda1 to repair file system damage.
    3. Navigate to the mounted partition, locate and delete the Photorec recovery folder to free up space.
    4. Reboot your machine, remove the USB, and check if Ubuntu boots normally.
Step 2: Recover the Deleted Windows 7 VM (Once Ubuntu is Bootable)

Now that you can access your system, let's try to get that VM back:

  • Check VirtualBox's built-in "trash" first
    Open VirtualBox, go to the File menu, and select Virtual Media Manager. Switch to the Removed tab – if your Windows 7 VM disk file (.vdi or .vmdk) is listed here, right-click it and select Add to restore it to your VM list.

  • Retry Testdisk with enough free space
    Make sure you have at least as much free disk space as the size of your original Windows 7 VM. Then:

    1. Install Testdisk if you haven't already: sudo apt install testdisk
    2. Run sudo testdisk, select your target disk, choose the correct partition type (usually Intel), then pick Analyze followed by Quick Search.
    3. Locate the partition where you stored the VM file, look for the missing .vdi/.vmdk file, mark it as P (Primary), then press Write to save the partition table. Reboot and try accessing the recovered file.
  • Optimize Photorec for VM files
    If you use Photorec again, narrow down the file types to only VM-related ones to save space and speed up recovery:

    1. Run sudo photorec, select your disk and partition.
    2. When you reach the File Opt screen, uncheck all file types except .vdi, .vmdk, and .vhd.
    3. Choose a target directory with enough free space and start the recovery.

内容的提问来源于stack exchange,提问作者user777865

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 10:11:05