Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. Make a 3 Gb image:
  2.  
  3. dd if=/dev/zero of=debian.img bs=1M count=3072
  4.  
  5. Format the image to ext3
  6.  
  7. mkfs.ext3 -F debian.img
  8.  
  9. Make two directorys to mount the images in
  10.  
  11. mkdir rootfs
  12. mkdir debian
  13.  
  14. sudo mount -o loop rootfs.img ./rootfs
  15.  
  16. sudo mount -o loop debian.img ./debian
  17.  
  18. Copy all the contents from one image to another and preserve owners and rights
  19.  
  20. sudo cp -pr ./debian/* ./rootfs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement