tag:blogger.com,1999:blog-1402984000559601283.post1212741198837772332..comments2024-03-05T10:47:39.661-06:00Comments on Thoughts on Technology: HOWTO: Create and use .IMG files from the CLIAnonymoushttp://www.blogger.com/profile/17954467314386661328noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-1402984000559601283.post-81102015713174084942012-10-27T01:01:49.830-05:002012-10-27T01:01:49.830-05:00To my knowledge you need to define the image size ...To my knowledge you need to define the image size at creation - not afterwards.Anonymoushttps://www.blogger.com/profile/17954467314386661328noreply@blogger.comtag:blogger.com,1999:blog-1402984000559601283.post-21059969733493289172012-10-26T13:52:29.868-05:002012-10-26T13:52:29.868-05:00can someone explain me how to resize to a minimal ...can someone explain me how to resize to a minimal size the image I've created with dd from a modified personalize bohdi sd card ?? thanks in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1402984000559601283.post-4186896974747491572012-08-01T21:49:15.371-05:002012-08-01T21:49:15.371-05:00You both are correct - that second command was a t...You both are correct - that second command was a typo on my part that is fixed now.Anonymoushttps://www.blogger.com/profile/17954467314386661328noreply@blogger.comtag:blogger.com,1999:blog-1402984000559601283.post-70952221517028612002012-08-01T21:37:13.750-05:002012-08-01T21:37:13.750-05:00Jeff, gruemaster is right:
bs = block size
count ...Jeff, gruemaster is right:<br /><br />bs = block size<br />count = how many blocks<br /><br />Your second command told dd to copy 1000000 blocks of default size (512 bytes), so you'll copy 512 MB at most.<br /><br />If your device happens to be bigger than 512 MB, you'll get a broken .IMG :)<br /><br />Oh, and to get feedback from dd, you can open a second terminal and 'kill -SIGUSR1' dd's PID, which can be obtained with 'pgrep dd' or 'pidof dd' for example.<br /><br />When dd receives SIGUSR1, it prints to stdout how many blocks it has read and written, time elapsed and average speed, very useful info.<br /><br />Cheers.Ricardohttps://www.blogger.com/profile/06919773762731323591noreply@blogger.comtag:blogger.com,1999:blog-1402984000559601283.post-63281886114390645712012-08-01T15:27:32.408-05:002012-08-01T15:27:32.408-05:00There really doesn't seem to be a need for tha...There really doesn't seem to be a need for that "count" at all, actually. If you leave it out, it'll just get the whole drive. I use DD all the time to backup USB drives.<br /><br />Count is best used in this lovely command to backup your MBR.<br /><br />sudo dd if=/dev/sda of=mbr.img bs=512 count=1Unknownhttps://www.blogger.com/profile/14947545653489553542noreply@blogger.comtag:blogger.com,1999:blog-1402984000559601283.post-8465673667883109592012-08-01T10:49:46.785-05:002012-08-01T10:49:46.785-05:00Err I just used the command as I have written and ...Err I just used the command as I have written and it gave me the results I described...Anonymoushttps://www.blogger.com/profile/17954467314386661328noreply@blogger.comtag:blogger.com,1999:blog-1402984000559601283.post-13195252058172976052012-08-01T10:46:59.101-05:002012-08-01T10:46:59.101-05:00You have the last two backwards. count=1M will on...You have the last two backwards. count=1M will only copy 1M of data. bs=2048 will read in blocks of 2048 bytes, which will speed up the transfer, but not limit the amount of total data.<br /><br />The correct lines should be:<br /> <b>sudo dd if=/path/to/drive of=image.img bs=1M</b><br />and<br /> <b>sudo dd if=/path/to/drive of=image.img bs=1M count=2048</b><br /><br />This will copy the entire contents or ~2G (2048 * 1M) respectively.Anonymousnoreply@blogger.com