w****g 发帖数: 597 | 1 请问如何修改ubuntu的/home分区大小?
在最初安装Ubuntu 8.10/XP双启动系统的时候,我设置Ubuntu的/home为独立的10GB分
区,而/分区为46GB。我的Ubuntu一直使用的很好。但是现在,我发现/home分配的
10GB分区太小了(已经占用了89%),而/分区46GB却还剩有很大的37GB unused
space.
所以,我就想把/home分区大小从10GB增加到30GB,而/分区大小从46GB减少到26GB,
请问有什么办法或软件工具可以实现这种Ubuntu分区大小的修改?
我已经试过GParted(GNOME Partition Editor, v0.3.8), 在我点击需要修改的/分区
或者/home分区时,GParted的resize/move 功能菜单是disabled(变成灰色的选项)
,使我无法修改分区大小。我不太愿重装Ubuntu, 请求解决方法,愿包子感谢。 |
f**k 发帖数: 44 | 2 easiest way is just put /home back to the / partition. Then mount the 10GB partition back into a subdirectory under /home. |
w****g 发帖数: 597 | 3 请问用什么命令可以实现你所建议的分区修改?谢谢。
我用df命令显示的硬盘文件系统信息如下:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 46G 8.2G 35G 19% /
/dev/sda6 9.2G 7.7G 1.1G 89% /home
10GB partition back into a subdirectory under /home.
【在 f**k 的大作中提到】![](/moin_static193/solenoid/img/up.png) : easiest way is just put /home back to the / partition. Then mount the 10GB partition back into a subdirectory under /home.
|
w********e 发帖数: 557 | 4 mkdir /home1
cp -pr /home/* /home1
(diff -r /home /home1) to make sure everything got copied correctly
umount /home (remove it from /etc/fstab)
mv /home1 /home |
f**k 发帖数: 44 | 5
after editing /etc/fstab, I think you probably got to reboot. warning: if
you make a mistake here, your whole os could become unbootable! I'd check a
book before doing it to be absolutely sure.
【在 w********e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : mkdir /home1 : cp -pr /home/* /home1 : (diff -r /home /home1) to make sure everything got copied correctly : umount /home (remove it from /etc/fstab) : mv /home1 /home
|
y*******g 发帖数: 6599 | 6 可以用live cd启动改写fstab吧.
a
【在 f**k 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : after editing /etc/fstab, I think you probably got to reboot. warning: if : you make a mistake here, your whole os could become unbootable! I'd check a : book before doing it to be absolutely sure.
|
w****g 发帖数: 597 | 7 I do not want to risk my data in HDD. I hope I have a better and safer way
to change the /home partition size. I'd better to check Linux book to make
sure that it is safe operation, or I will back up data and reinstall Ubuntu.
a
【在 f**k 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : after editing /etc/fstab, I think you probably got to reboot. warning: if : you make a mistake here, your whole os could become unbootable! I'd check a : book before doing it to be absolutely sure.
|
w********e 发帖数: 557 | 8 To be honest, I don't think /home matters that much. Just comment it out
from /etc/fstab should be okay.
You don't learn until you try. |