这是我的第一篇文章,如果我有任何错误,请多多包涵,并对可能不太漂亮的格式感到抱歉。
我不小心删除了所有内核,现在 Ubuntu 14.04 无法启动(除了 memtest)。我尝试了其他涉及挂载目录和重新安装内核的解决方案,但没有成功 - 所以我决定我应该从主卷中恢复我需要的小数据并完全重新安装 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
所以我自己找到了一个解决方案:我在文件浏览器中更改了整个目录的权限(通过右键单击 -> 权限),所以我设法恢复了数据。谢谢你。