On Tue, 30 Jun 2009, Greg Freemyer wrote:-
> On Monday June 29 2009, Greg Freemyer wrote:
>> The typical PC partition table is in the very
first sector of the
>> drive, so:
>> dd if=/dev/zero of=/dev/sdx count=1
>> should do it, but you may need to reboot to get the kernel to reread
>> it. ...
You can also use fdisk /dev/sdx
Then use option 'o' to create the empty partition table, and write it
out using 'w'. This way, as long as there are no mounted partitions on
/dev/sdx, the kernel will reread the partition table as fdisk exits.
You have to tell the kernel to update its tables from
disk after you
update the disk. I just don't remember how to do that offhand, so I
said a reboot will definitely do it.
Either of these will do it:
hdparm -z /dev/sdx
blockdev --rereadpt /dev/sdx
provided that there are no partitions mounted on /dev/sdx. If there are,
you need to umount them before trying to reread the partition table or
you'll get a "BLKRRPART: Device or resource busy" error.
Team Acorn: http://www.distributed.net/
OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 10.3 32b | openSUSE 11.0 32b | |
openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b |
RISC OS 3.6 | RISC OS 3.11 | openSUSE 11.1 PPC | TOS 4.02
To unsubscribe, e-mail: opensuse+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse+help(a)opensuse.org