Because they are both part of the parameters to the "-o" option. If you had a space between them the "loop," would be taken as the parameter and the "offset=$((12880*512))" would be taken as the next option which should be the device/file name.solar3000 wrote:* mount -o loop,offset=$((122880*512)) raspbian.img /mnt/src
why is there no space between the comma and offset?
Possibly better to use a cp or rsync command here. "mv" will move the contents from the source location to the destination - effectively deleting everything from your original image file. Which would make the file useless if you wanted to do the same for another Pi or disk.solar3000 wrote:mv /mnt/src/* /mnt/dest
I made a copy of the downloaded .img file, so I would delete the now empty .img file anyway.rpdom wrote:
Possibly better to use a cp or rsync command here. "mv" will move the contents from the source location to the destination - effectively deleting everything from your original image file. Which would make the file useless if you wanted to do the same for another Pi or disk.
Well, the / partition is mounted by the kernel using the command line parameters. It can't access the fstab file before then, so it doesn't use it. You can change the entry if you want, or comment it out - everything will still work.SteveSpencer wrote:Something that puzzles me. I understand the whole process of mounting, copying, and then altering the cmdline options on the boot partition.
However, I can't help wondering if you would need to change the contents of /etc/fstab on the HDD copy afterwards so it doesn't read:
but instead reads
- /dev/mmcblk0p2 / ext4 defaults,noatime 0 1
or am I missing something?
- /dev/sda1 / ext4 defaults,noatime 0 1
It also occurred to me that rebooting with the HDD attached is fine, but if you put in another USB storage device, how could you guarantee that the right one ended up as /dev/sda1?
(Never had this issue with UN*X when I was a lad - we used to install from 9 track magtape or those fancy new QIC tapes, and if we wanted driver support for new-fangled things, we had to write it)
Don't quite remember, I'll have to dig them up.solar3000 wrote:and what were the dd parameters you used to do so?