我正在尝试将ubuntu 14.04升级到16.04,但是由于Ubuntu安装的驱动器空间不足,我无法继续进行此过程,并且我的计算机中还有30 GB的未分配空间。我使用了Live USB中的Gparted软件,并使用它来移动和收缩/ dev / sda6,以便在/ dev / sda5的一侧获得约30 GB的未分配空间。移动和收缩完成后,我尝试使用move / resize选项扩展ubuntu驱动器/ dev / sda5,但是在过程中出现了一些错误,并且不允许该过程继续进行。
然后,在重新启动后,再次从我的Live USB打开了Gparted,但现在在我的ubuntu分区(/ dev / sda5)中显示了一些错误,该错误与初始大小相同,并且可以扩展我的分区。
我也尝试使用此方法修复根分区
sudo touch /forcefsck
sudo reboot
但它没有报告任何错误。我现在应该怎么办?我可以在图像中看到未分配空间但在sda5里面却看不到它是怎么回事?
编辑:
结果 sudo fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x2253336f
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 136970189 68381671 7 HPFS/NTFS/exFAT
/dev/sda3 136986248 220984415 41999084 7 HPFS/NTFS/exFAT
/dev/sda4 220985343 625139711 202077184+ f W95 Ext'd (LBA)
/dev/sda5 220985344 318570495 48792576 83 Linux
/dev/sda6 318572544 432474111 56950784 7 HPFS/NTFS/exFAT
/dev/sda7 432633856 625139711 96252928 7 HPFS/NTFS/exFAT
现在,当我启动gparted时,出现此错误(发现libparted错误)
通知内核有关修改分区/ dev / sda4的错误-设备或资源繁忙。这意味着Linux在重启之前不会知道您对/ dev / sda4所做的任何更改-因此,在重启之前,您不应该挂载它或以任何方式使用它。
Looks like the partition /dev/sda5
got enlarged, but not the ext4 file system inside it which is still at the original size.
First of all, if you haven't done it yet, make a backup! Modifying partitions and file systems always has the risk of data loss!
Then make sure you are booting from a live system so that we can operate on the file system while it's unmounted.
First we must force a file system check using this command:
sudo e2fsck -f /dev/sda5
It should hopefully report no errors or be able to fix them.
After that we can resize the file system to match the size of the partition it's located in. We do that with the command below:
sudo resize2fs -p /dev/sda5
After that you might want to repeat the first command (e2fsck
) to check everything is okay.
Then your partition and file system should have the same size again and cause no more trouble regarding this issue.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句