Why reboot after fdisk of external drive?
pyevet at aapt.net.au
Tue Mar 11 02:48:14 UTC 2008
On Mon, 2008-03-10 at 22:32 -0400, Robert Locke wrote:
> On Tue, 2008-03-11 at 13:04 +1100, Simon Slater wrote:
> > G'day again, It must be my day for questions. This more for filling in
> > the blanks than problem solving.
> > I'm thinking of getting a Maxtor OneTouch IV 250GB external drive, so I
> > googled other peoples experiences. On 2 sites (below) I found similar
> > explanations of the steps to get one working under Linux. Both say to
> > reboot between fdisk and mkfs. Why?
> > 1/ http://www-personal.umich.edu/~hnarayan/maxtor-harddrive-linux.html
> > 2/ http://www.totalpenguin.com/content/view/25/40/
> Well, the first link seems a little confused how partitioning works, but
> the second one seemed a little better.
> Anyway, I have not tried to use one of these "OneTouch" drives myself,
> but the external USB drives I have purchased and used have been
> substantially easier to work with.
> First, most of these drives will probably come already partitioned and
> formatted with either FAT32 or NTFS as filesystems. If your intent (as
> mine was) is to use the drive exclusively with Linux, I would prefer to
> format it "ext3".
> Anyway, if you do not need to "modify" the partition table, then don't.
> But, when you modify a partition table on a drive that is already read
> into the kernel's memory, when you "write" from fdisk, it will generate
> a warning message suggesting that you reboot to get the kernel to
> recognize your new partition table. You can see what the partition
> table on the physical drive is by running: "fdisk -l /dev/sdb" where you
> would substitute the appropriate dev name based on what was recognized
> when you attached the drive to your system (perhaps by reading dmesg
> or /var/log/messages or the console output). You can see what
> partitions the kernel has recognized by running "cat /proc/partitions".
> Now, as an alternative to "rebooting" after changing the table, you can
> run the command "partprobe", which can force the kernel to "re-read the
> partition table" from disk. But you cannot run mkfs on a partition that
> is not yet recognized by the kernel (meaning seen in /proc/partitions).
> So if fdisk generates the warning (meaning the table has been previously
> cached), then you need to either reboot or run "partprobe" before
> running mkfs.
> Hope that helps a little,
Thanks everyone, I understand a bit better now.
More information about the users