这是我的第一篇帖子,因此,如果我有任何错误,请多多包涵,并且抱歉,格式可能不太好看。
我意外删除了所有内核,现在 Ubuntu 14.04 无法启动(除了内存测试)。我尝试了其他解决方案,包括挂载目录和重新安装内核,但没有奏效 - 所以我决定从主卷中恢复我需要的少量数据,然后重新安装 Ubuntu。
我现在的问题是,当我从 live-USB 启动 Ubuntu(“尝试 Ubuntu”)时,我没有权限查看或复制主卷上的数据。我收到错误消息
无法显示此位置。您没有查看“目录”内容所需的权限。
我如何更改主卷的权限以便恢复数据?
奇怪的是,它可以与我上传的几个 .c 文件一起使用(这些文件实际上不是程序,而是讲座笔记),但它不能与实际的 C 项目一起使用,它甚至不会显示目录的内容。
sudo fdisk -l
返回以下结果:
Disk /dev/sda: 192.0 GB, 192048095232 bytes
255 heads, 63 sectors/track, 23348 cylinders, total 375093936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cbad4
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 375093247 187295745 5 Extended
/dev/sda5 501760 375093247 187295744 83 Linux
Disk /dev/sdb: 1993 MB, 1993342976 bytes
62 heads, 62 sectors/track, 1012 cylinders, total 3893248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20ac7dda
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/sdb1 ? 3224498923 3657370039 216435558+ 7 HPFS/NTFS/exFAT
/dev/sdb2 ? 3272020941 5225480974 976730017 16 Hidden FAT16
/dev/sdb3 ? 0 0 0 6f Unknown
/dev/sdb4 50200576 974536369 462167897 0 Empty
Partition table entries are not in disk order
Disk /dev/mapper/luks-e407b6dc-cbb3-4d1d-b5cb-96f98e4b42da: 191.8 GB, 191788744704 bytes
255 heads, 63 sectors/track, 23316 cylinders, total 374587392 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/luks-e407b6dc-cbb3-4d1d-b5cb-96f98e4b42da doesn't contain a valid partition table
Disk /dev/mapper/ubuntu--vg-root: 183.7 GB, 183744069632 bytes
255 heads, 63 sectors/track, 22338 cylinders, total 358875136 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table
Disk /dev/mapper/ubuntu--vg-swap_1: 8040 MB, 8040480768 bytes
255 heads, 63 sectors/track, 977 cylinders, total 15704064 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table
答案1
所以我自己找到了一个解决方案:我在文件浏览器中更改了整个目录的权限(通过右键单击 -> 权限),所以我设法恢复了数据。谢谢。