文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Stripping home directory from root partition

Stripping home directory from root partition

时间:2006-04-24  来源:rdd

I created two partitions for my Ubuntu 5.1 system.One was swap partition,another was root partition.Later,win4lin pro put it's  windows 2000 image and some other files in /home.Disk space is to be running out .The best solution would be stripping /home off root partition and mount it to a new one.It's so lucky that i've got some free space in my hard disk.Ok,let's do it.

First,create a new partition /hda4 with fdisk and reboot the system .Then build ext3 file system on it by excuting following commands:

sudo fdisk -l
mkfs -j /dev/hda4

Now,mount /hda4 to a temp folder:

sudo mkdir /mnt/tempfolder
sudo mount /dev/hda4 /mnt/tempfolder

Next,enter the init 1 by issuing command:

sudo init 1

Copy all files and directories of /home to the temp folder /mnt/tempfolder:

cd /home
cp -ax * /mnt/tempfolder

Rename the original /home to /home.old ,so i can restore all data in case of fatal error:

mv /home /home.old

Create new mount point for /home and mount it:

mkdir /home
mount /dev/hda4 /home

Ok.Press Ctrl+D,it's time to leave init 1 now.

Finally, edit /etc/fstab to make sure /home would be mounted automatically.

vi /etc/fstab

Add a row to it:

/dev/hda4 /home ext3 defaults 1 2

Save it and quit.
                                                                         ---by rdd
相关阅读 更多 +
排行榜 更多 +
浴血混战官方下载

浴血混战官方下载

飞行射击 下载
检票员模拟器免广告下载

检票员模拟器免广告下载

模拟经营 下载
最终前哨最终版手机版下载

最终前哨最终版手机版下载

休闲益智 下载