[PLUG] hey, you really _should_ reboot after repartitioning!

Daniel Hedlund daniel at digitree.org
Wed Dec 31 00:34:02 UTC 2003


On Wed, 2003-12-31 at 09:05, Russell Senior wrote:
> ... and remember to reboot after repartitioning! ;-)

Okay, I must first comment that it CAN be safe to reformat a hard disk
under Linux after repartitioning, without rebooting the computer.  I'll
try to explain the different scenarios and which are allowed under
Linux, and why:

1. I want to partition and format a hard disk that is in my computer,
and NO PARTITIONS of this hard disk are CURRENTLY MOUNTED.  It IS SAFE
to partition and format this hard disk without rebooting.

2. I want to partition and format a hard disk that is in my computer,
and ONE OR MORE PARTITIONS of this hard disk are CURRENTLY MOUNTED.  It
IS NOT SAFE to partition and format this hard disk without rebooting. 
You should reboot the computer, or unmount all partitions on the the
hard disk and repartition.

...Basically if you have any mounted partitions on the hard disk you
repartitioned, you should reboot the system before formatting. If no
mounted partitions then it should be safe.

Reason:  When partitioning, the partition table gets written back to the
hard disk.  Linux then tries to re-read the new partition table back
from the hard disk but fails because the hard disk is currently being
used.  Linux then keeps using the old partition scheme before you
repartitioned.  This includes all partition boundaries (where each
partition starts and stops).  That is why you overwrote you your home
directory.

Cheers,

Daniel

-- 
Daniel Hedlund
Chief Consultant
daniel at digitree.org
DigiTree Studios Pty Ltd.





More information about the PLUG mailing list