Link to home
Start Free TrialLog in
Avatar of Adrian Dobrota
Adrian DobrotaFlag for Romania

asked on

reload partition table information

Short :

How do I reload the partition table information w/o rebooting the system (VFAT) ?

Long:

I have deleted two (all) partitions from a second drive and then created one merged VFAT part. using FDISK, then used mkfs.vfat to format.
Now, how do I make linux (FC2 , kernel 2.6.x) to reload the partition information without rebooting the computer? Right now, when mounting /dev/hdb1 I find the old contents of the first partition I deleted, and that seems normal as that's the info it "remembers" .

thanks for any pointer

Kronos
Avatar of Adrian Dobrota
Adrian Dobrota
Flag of Romania image

ASKER

I think the following is normal behavior though annoying:

(parted) check 1
Warning: Partition 1 is 76316.563Mb, but the file system is 20002.776Mb.
Ignore/Cancel? c
(parted)
SOLUTION
Avatar of Gns
Gns

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sunjith
Sunjith

Linux fdisk usually calls the ioctl to reread the partition table when a new partition table is written to disk.
Are you sure that you wrote the new partition to disk after you modified the partition table in fdisk??

Thanks guys.



Gns .... don't think so .... I've used even bigger than 80GB FAT's  in linux
Actually I have a movie storage drive (160GB) and I wanted to test what does Windows 2000 says about a 160GB FAT partition. Well, it reads with no prob. but doesn't write more than 128GB. However ... comin' back to our FAT ... I don't think it's too big to be read.

Mysidia .... that's very interesting. I will try it today and let you know the result.

Sunjith .... yes, I am sure. Look at this:

Command (m for help): p
                                                                               
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
                                                                               
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        9729    78148161    c  W95 FAT32 (LBA)
As expected .... my fault :((  .... forgot to issue a param for FAT32:
 mkfs.vfat /dev/hdb1 -F 32
.... notice the -F 32 .... w/o it  I had a Fat16 part ... now it's clear what happened.
Gns asked me if we're running into any limitations of how big a FAT can get .... well ... I'm sure neither him nor me were thinking about FAT16 ... but it was an idea though.
Mysidia came with  a good functioning C program.
Now everything is working fine. (BTW ... the partition table IS reread by system immediately after creating the file system so my question is somehow useless ... it was my fault as I forgot to create a FAT32 and got instead a default FAT16 partition.
Best way to make fat filesystems on partitions is to do it from windows rather than from *nix.