安装Lubuntu 17.10并删除Win7后,原硬盘分区(D:\、E:\)消失如何解决?
Hey there, let's work through this missing partitions problem—this is a pretty common hiccup when setting up Lubuntu, whether you're dual-booting or have removed Windows entirely. Let's break down the steps to get those partitions back visible.
First: Verify the Partitions Actually Exist
Before panicking, let's confirm if your old D:, E:\ partitions are still on the drive (not accidentally deleted during installation). We'll use two simple command-line tools:
- Run
lsblkin the terminal. This will list all your storage devices and their partitions. Look for entries with sizes matching your old Windows partitions—they might just be unmounted (no/mnt/...path next to them). - For more detail, run
sudo fdisk -l. This will show you the file system type (look forNTFS—that's the Windows format) and the exact device name (like/dev/sda3or/dev/sdb2).
If Partitions Exist but Are Unmounted: Manually Mount Them
If you see your partitions in the above commands but they aren't showing up in the file manager, you just need to mount them:
- Create a mount point (a folder where the partition will be accessible):
sudo mkdir /mnt/windows-d # Repeat for E:\: sudo mkdir /mnt/windows-e - Mount the NTFS partition (replace
/dev/sda3with your actual partition device name fromfdisk -l):sudo mount -t ntfs-3g /dev/sda3 /mnt/windows-d - Check if it works: Open your file manager and navigate to
/mnt/windows-d, or runcd /mnt/windows-d && lsin the terminal.
Make Mounts Permanent (Auto-Mount on Boot)
To avoid mounting manually every time you start Lubuntu, add the partition to your fstab file:
- Open the fstab editor:
sudo nano /etc/fstab - Add a line at the bottom (replace the device name and mount point with your own):
/dev/sda3 /mnt/windows-d ntfs-3g defaults,uid=1000,gid=1000 0 0uid=1000andgid=1000ensure you (the regular user) have read/write access without usingsudo.
- Save and exit: Press
Ctrl+O, hit Enter, thenCtrl+X. - Test the setup to make sure there are no errors:
sudo mount -a
If Partitions Seem to Be Gone (After Deleting Windows)
If you removed Windows 7 and now the partitions are missing (but they showed up when you tried Lubuntu live), chances are the partition table might have been corrupted during installation, or you accidentally overwrote it. We can use testdisk to recover lost partitions:
- Install testdisk:
sudo apt update && sudo apt install testdisk - Run the tool:
sudo testdisk - Follow the wizard:
- Select
Createto make a new log file. - Choose your hard drive from the list (double-check the size to pick the right one).
- Select the partition table type (most modern systems use
Intel/PC). - Choose
Analyze>Quick Search. - When testdisk finds your lost partitions, use the arrow keys to select them and press
Pto mark them asPrimary(orLfor Logical if they were part of an extended partition). - Once all lost partitions are marked, press
Writeto save the new partition table. Confirm withY.
- Select
- Reboot your system, then check if the partitions appear using
lsblkor the file manager.
Important Notes
- Backup first: Before messing with partition tables or mounts, if you have critical data left on the drive, make a backup using a live USB if possible—mistakes can lead to data loss.
- NTFS issues: If you get errors mounting NTFS, ensure Windows wasn't left in hibernation mode (if you were dual-booting). Since you removed Windows, this might not apply, but it's worth mentioning.
内容的提问来源于stack exchange,提问作者Mohsen Nirouzad

