You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

不丢失数据前提下从单分区Ubuntu环境恢复Windows 7及无损调整硬盘分区的方法咨询

不丢失数据前提下从单分区Ubuntu环境恢复Windows 7及无损调整硬盘分区的方法咨询

Hey there, let's walk through this step by step to get you back to Windows 7 without losing your data—don't worry, we'll take it slow and safe!

1. 先做最关键的一步:全量备份你的数据

Even if we're aiming for a "non-destructive" process, accidents can happen (like a power outage mid-partition resize). So first, grab an external USB drive or another storage device with enough space:

  • Use Ubuntu's default file manager to manually drag-and-drop all your important files: documents, photos, videos, downloads, and anything in your /home/your-username folder.
  • If you prefer using the terminal for a more robust backup, run this command (replace your-username with your actual Ubuntu username, and /media/external-drive/backup with the path to your external storage):
    rsync -av /home/your-username/ /media/external-drive/backup/
    

Double-check that all your files are on the external drive before moving on!

2. 缩小现有Ubuntu分区,腾出Windows 7安装空间

Ubuntu's built-in Disk Utility makes this straightforward:

  • Open the "Disks" app (you can search for it in the Ubuntu menu).
  • Locate your single hard drive partition (it'll be the one with the Ubuntu logo and most of the disk space used).
  • Click the gear icon and select "Resize Partition".
  • Drag the right-hand slider to the left to free up space—Windows 7 needs at least 20GB, but I'd recommend 30GB+ for updates and apps.
  • Click "Resize" and wait for the process to finish (don't turn off your computer during this!).

3. 从Windows 7启动盘引导并安装

Now it's time to install Windows 7:

  • Plug in your bootable Windows 7 USB stick, then restart your computer.
  • When it boots up, press the key to enter the boot menu (usually F12, Del, or Esc—check your computer's splash screen for the right key).
  • Select your USB stick from the boot menu to launch the Windows 7 installer.
  • When you get to the "Where do you want to install Windows?" screen, find the Unallocated Space we just created.
  • Select that unallocated space, click "New" to create a partition, format it, then proceed with installing Windows 7 to this new partition.
  • Important: Do NOT touch the existing Ubuntu partition here—if you delete or format it, you'll lose all your data!

4. 恢复数据并整理分区(可选)

Once Windows 7 is installed:

  • You should be able to see your old Ubuntu partition in Windows Explorer (it might show up as a "RAW" drive if you don't have EXT4 support—you can install a free tool like Ext2Fsd to read/write to it).
  • Copy your backed-up data back to your new Windows 7 partition, or directly access files from the Ubuntu partition if you installed the EXT4 tool.
  • If you don't want to keep Ubuntu anymore, you can open Windows' Disk Management (right-click Start > Disk Management), delete the old Ubuntu partition, then extend your Windows 7 partition to fill the entire drive. Only do this if you've confirmed all your data is safely moved!

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

火山引擎 最新活动