Re: zeroing out part of an SDcard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/21/2014 09:07 AM, Robert P. J. Day wrote:
On Thu, 21 Aug 2014, Robert Moskowitz wrote:

More on my compressing images from SDcards.

I only need the boot info and 1st partition, so I remove the other partitions,
but of course there is still 1s out there so it will not compress efficiently.
I want to zero out the end of the card so first I use fdisk:

# fdisk -l /dev/sdb

Disk /dev/sdb: 7.4 GiB, 7969177600 bytes, 15564800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0009e2ad

Device Boot Start End Blocks Id System
/dev/sdb1 8192 1007615 499712 83 Linux

Then dd:

# dd if=/dev/zero of=/dev/sdb bs=1M seek=1007620
dd: ‘/dev/sdb’: cannot seek: Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000652852 s, 0.0 kB/s

======================

seems you cannot seek on an SDcard. How do I do this? Since the change in
partition 1 is trivial, if I have to start again from an SDcard with all 3
paritions, I can do that...
   it seems like you're trying to seek more than a terabyte into that
card.

Well, man says about seek:

       seek=N skip N obs-sized blocks at start of output

and obs defaults to 512 bytes, and I *THOUGHT* fdisk was reporting # 512 blocks, not bytes.

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux