View Single Post
Old 04-06-2012, 11:57 AM   #135
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by drogon View Post
when I do:
dd if=/dev/zero of=/dev/mmcblk0p3 bs=4K
it shows:
dd:writing '/dev/mmcblk0p3':No space left on device
How should I deal with it?
And how to use fastboot to flash kernel-5.0.4.img?
It should have wiped the entire partition before the error message. If you do not want the error message, the quick and dirty way is to add 2>/dev/null to the end of the command.

The "right" way is more complicated (which I try to avoid whenever possible), and requires that you find out how many blocks your destination has. There are a number of ways to do that. Using "fdisk -l" is one of them (but those are 512-byte blocks, so you have to divide by 8 to get 4K blocks), or you can use "df" (but that gives 1K blocks so you need to divide by 4). Then you need to add the computed block count to the "count=" parameter of "dd".

As you can see, it is a lot more complicated than my one-line answer, which just ignores the "normal" error when the device gets full.

Another way would be just to write enough to "kill" the partition format, such as "count=1000" or something...

The point is to make the partition no longer mountable, so that the startup scripts will reformat that partition during the next reboot.


Last edited by geekmaster; 04-06-2012 at 11:59 AM.
geekmaster is offline   Reply With Quote