четверг, 3 декабря 2009 г.

make *.img file

#assume it is on /mnt/hda1,

dd if=/dev/zero of=/mnt/hda1/new_home bs=1M count=50
#this create a new 50M file
# or dd if=/dev/zero of=debian.img seek=3.5G bs=1 count=1

mke2fs -j /mnt/hda1/new_home

#this create a new ext3(or you can choose other fs) on new_home
# or use mkfs.vfat -F 32

mount /mnt/hda1/new_home /mnt/test -o loop
mount it to a mount point at /mnt/test
cp -dRp /home/* /mnt/test/*

#copy everything over

mv /mnt/hda1/knoppix.img old_home; mv /mnt/hda1/new_home knoppix.img

#replace it. when everything is cofirmed work, you can delete the old one.

Комментариев нет:

Отправить комментарий