Jump to content











Photo
- - - - -

The empty primary partition


  • Please log in to reply
6 replies to this topic

#1 xpt

xpt

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    Canada

Posted 29 June 2010 - 09:40 PM

Hi,

When leaving an empty primary partition (for grub4dos to work on), which partition should I use?

I'm thinking:

/dev/hda1 Primary
/dev/hda2 Primary
/dev/hda3 Empty
/dev/hda4 Extended
/dev/hda5 Logical

but what I found most existing partitions look like this:

/dev/hda1 Primary
/dev/hda2 Primary
/dev/hda3 Extended
/dev/hda4 Empty
/dev/hda5 Logical

Ie, empty partition after the extended partition. This seems weird to me -- "does the empty partition actually belong to the extended partition?" But since (almost) every tool is creating partitions like this, there must be a reason for it.

Can anyone shed some lights?

Thanks

#2 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 29 June 2010 - 09:52 PM

In linux, the first logical partition always will have partition number "5", no matter where it is located on the disk.

/dev/hda4 can't be located between the extended (/dev/hda3) and the logical partition(s). If you have a primary in between them, then the program which partitioned your disk, made a huge mistake.

What is the output of?
sudo fdisk -ul /dev/sda


#3 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 29 June 2010 - 09:58 PM

How could grub4dos work with "empty" partition? B)

#4 xpt

xpt

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    Canada

Posted 29 June 2010 - 10:16 PM

How could grub4dos work with "empty" partition? B)


Ref:
http://www.boot-land...?...st&p=101266

Moreover, ''map --in-situ" needs an empty primary partition as well (can't find the message any more)

EDIT, here it is:

http://www.boot-land...?...st&p=102177

#5 xpt

xpt

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    Canada

Posted 29 June 2010 - 10:23 PM

In linux, the first logical partition always will have partition number "5", no matter where it is located on the disk.


that might explain it. Yes, I created my partition using Linux tools, this time is cfdisk.

/dev/hda4 can't be located between the extended (/dev/hda3) and the logical partition(s). If you have a primary in between them, then the program which partitioned your disk, made a huge mistake.


I can't access it now, but I'm sure it is like that. Ref:
http://www.boot-land...?...st&p=101133

Moreover, here is a sample output from the sfdisk document:

% sfdisk -l -x /dev/hda

   Device Boot Start	 End   #cyls   #blocks   Id  System

/dev/hda1		  0+	  5	   6-	 1223+   a  OS/2 Boot Manager

/dev/hda2		  6	 256	 251	 51204	6  DOS 16-bit FAT >=32M

/dev/hda3		257	1023	 767	156468	5  Extended

/dev/hda4		  0	   -	   0		 0	0  Empty



/dev/hda5		257+	357	 101-	20603+   4  DOS 16-bit FAT <32M

	-			358	1023	 666	135864	5  Extended

	-			257	 256	   0		 0	0  Empty

	-			257	 256	   0		 0	0  Empty



/dev/hda6		358+	438	  81-	16523+  82  Linux swap

	-			439	1023	 585	119340	5  Extended

	-			358	 357	   0		 0	0  Empty

	-			358	 357	   0		 0	0  Empty



/dev/hda7		439+   1023	 585-   119339+  83  Linux native

	-			439	 438	   0		 0	0  Empty

	-			439	 438	   0		 0	0  Empty

	-			439	 438	   0		 0	0  Empty


#6 TheK

TheK

    Frequent Member

  • Advanced user
  • 141 posts
  • Location:Germany (BW)
  •  
    Germany

Posted 29 June 2010 - 11:03 PM

OK, now I see. You are talking about an empty partition table entry in the MBR.

I think in this case it doesn't matter which of the 4 entries is used B)

#7 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1062 posts
  •  
    Belgium

Posted 29 June 2010 - 11:36 PM

/dev/hda3 257 1023 767 156468 5 Extended
/dev/hda5 257+ 357 101- 20603+ 4 DOS 16-bit FAT <32M

The extended and logical partition start in the same cylinder. So there is almost no empty space between them.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users