View Single Post
pichlo's Avatar
Posts: 6,453 | Thanked: 20,983 times | Joined on Sep 2012 @ UK
#2962
Originally Posted by fw190 View Post
Hmmm I do not know much about commands but correct me if I' wrong:
mkdir /tmp/debian-temp - this makes the folder in tmp just for purpouse of copying
Correct. Except I would not do it in /tmp as you almost certainly will not have enough space (see http://en.wikipedia.org/wiki/Tmpfs). Replace it with /home/debian-temp, /home/user/debian-temp, or even skip it altogether and use /mnt. In next lines, I will assume /mnt as the destination.

mount /home/user/MyDocs/your-easy-debian-image-file.ext3 - this mounts the image
That would work if the OS knew anything about your-easy-debian-image-file.ext3. Assuming it does not, you need to specify the full parameters as per my reply above.

mount -t ext3 /home/user/MyDocs/your-easy-debian-image-file.ext3 /mnt

/tmp/debian-temp - this moves me form / to debian-temp
You need a cd there. Plus we have agreed to leave /tmp alone. And you don't need to change your working directory. Just skip this command altogether. If you want, you can (optionally) check you have some contents to copy:

ls /mnt

mount /dev/mmcblk1p1 /.debian - this mounts the sd card
Correct. It will most likely work as written but if not, you may add the file system type specification, like this:

mount -t ext3 /dev/mmcblk1p1 /.debian

cp -a /tmp/debian-temp/* /.debian/ - this is copying files from temp to sd but what files as no command has copied any files to debian-temp?
Correct, only use /mnt instaed of /tmp/debian-temp:

cp -a /mnt/* /.debian

You may also want to unmount things once finished:

umount /.debian
umount /mnt


Finally, edit your /home/user/.chroot file to point to your new ED location as per my post #2943.

Edit: Err, silly me, since mount does not actually copy anything, feel free to use /tmp/debian-temp as you originally intended if you wish. No tmpfs space will be used.

Last edited by pichlo; 2013-07-01 at 14:54. Reason: Correction about tmpfs
 

The Following 6 Users Say Thank You to pichlo For This Useful Post: