From: adam@address.invalid   
      
   David W. Hodgins wrote:   
   > On Mon, 04 Jun 2012 21:41:05 -0400, Adam wrote:   
   >   
   >> In that case, I can have up to three   
   >> primary partitions, anywhere before or after the group of extended   
   >> partitions, which will be numbered in the order I create them. I did a   
   >> lot of playing around with cfdisk to get a clearer idea of how this   
   >> works (but didn't write any changes to disk!).   
   >   
   > Correct except for the renumbering. Primary partitions are numbered based   
   > on where they are located in the partition table in the mbr. The physical   
   > order of the partitions in the disk, does not affect the partition number.   
      
   Yep, you're right.   
      
   > Some partitioning tools will always use the next available entry, when   
   > you specify you want to create a primary partition. Other tools allow   
   > you to specify which entry to use.   
      
   cfdisk (what I've been using) always uses the next available entry in   
   the MBR. I've been assuming that was the only possible way. OTOH I   
   think I'll stick with cfdisk for creating partitions, as it does basic   
   sanity checks. I gather sfdisk will let root do anything, even stupid   
   things.   
      
   > Extended partitions (or rather logical partitions within one extended   
   > partition)   
      
   I'll have to make sure I'm using the right term in the future!   
      
   > are always numbered based on their order within the extended   
   > partition chain. The last one created will always have the highest   
   > number, regardless of where it is within the extended partition.   
      
   Not cfdisk, which is what I was drawing my conclusions from. It   
   renumbers logical partitions consecutively, regardless of the order they   
   were created in. The one closest to the start of the disk is always   
   sd?5, and existing logical partitions are sd?6, sd?7, etc. in their   
   physical order. If I created a new logical partition before sd?5,   
   everything would get renumbered and I'd have to alter any /etc/fstab   
   references to /dev/sd?5 and higher.   
      
   > Take a look at the output of "sfdisk -l -x /dev/sda", to see the actual   
   > partition tables within the extended partition chain.   
      
   Thanks, good example! Yes, that makes things a lot clearer to me. I   
   see the singly-linked list structure it's using. I'm assuming the time   
   to follow that list to the highest-numbered partition is negligible.   
      
   I did notice one thing strange regarding sda3:   
      
   [adam@eris ~]$ sudo sfdisk -l -x /dev/sda | grep sda3   
   /dev/sda3 12823 14592 1770 14217525 7 HPFS/NTFS   
   [adam@eris ~]$ df -Th | grep sda3   
   /dev/sda3 ext3 14G 755M 12G 6% /accounts   
   [adam@eris ~]$   
      
   As shipped, sda1 was most of the internal HD (Windows Vista, NTFS) and   
   sda3 was the last ~14 GB, the NTFS Windows recovery partition. IIRC   
   sda2 wasn't used. A few weeks ago, I used "mke2fs -ccvj -t ext3   
   /dev/sda3" to reformat sda3 as ext3 (for user data common across all   
   distros). I have no problem using it as an ext3 partition, and df   
   identifies it as ext3. However, the Mandriva 2010.0 versions of fdisk,   
   cfdisk, and sfdisk all report it as HPFS/NTFS. Would you have any idea   
   what's going on here? Is it worth doing anything about, since   
   everything's working correctly so far?   
      
   Adam   
   --   
   Registered Linux User #536473   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|