문제

I want to create an image from the contents of a directory(say "/home/sid/folder/"). I then want to use /dev/loop0, format it to ext3 format. Finally associate the image i just created with loop0 and mount it. How do I do this?

도움이 되었습니까?

해결책

Create your image file of the size you want:

dd if=/dev/zero of=./your.img bz=1M count=<number of megabytes you want>

Format it

mkfs.ext3 ./your.img

(Recheck that command before running it, do read what is printed out.)

Mount it:

mount -o loop ./your.img /some/mount/point

And you're done. Don't forget to unmount before you copy/send that image file anywhere.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top