LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partitioning for dual-system (https://www.linuxquestions.org/questions/linux-newbie-8/partitioning-for-dual-system-379697/)

Linunix 11-03-2005 03:44 PM

Partitioning for dual-system
 
My aim is to run a system on a single disk with both Windows-XP and Linux, each occupying about one half of the disk.

The actual partitional state of the disk is :

1 primary boot partition (FAT16)
1 primary extended partition (takes the entire rest of disk)
5 logical partitions (FAT32)
considerable free space in extended partition

Current use is Windows 98 and a basic Slackware Linux in a FAT32 part.

I'ld like to modify the partition table so to ensure that
a) there are separated spaces for Windows (W-space) and Linux (L-space)
b) any new installation of operating systems in W-space or L-space shall not interfer with integrity of the other part
c) any new partition formatting in W-space or L-space shall not interfer with integrity of the other part

What is the best strategy of migration? I am quite confused about the practical difference of logical vs. primary partitions in respect to the demands of above aims. Please, could somebody with more experience shed some light onto this? Thanks!

Xena 11-03-2005 04:59 PM

Without knowing exactly how big your hard drive is or the sizes of the partitions it's hard to give a definitive answer. A partition is simply an area in a hard drive that has been set aside, if you think of the hard drive as a filing cabinet then the partitions are the drawers.

Before resizing partitions be SURE to have ALL YOUR IMPORTANT DATA BACKED UP!!! ie., burnt to CDR.

What I have here is a pair of 80Gb hard drives, and I use Windoze and linux. It's set up this way:

1st drive: 30Gb FAT for windows, 5Gb partition for "/", 1Gb partition for swap, the rest for "/home"
2nd drive: 30Gb FAT for windows, rest for linux in one big partition.

Note that if you have a FAT partition bigger than 32Gb it will be FAT32 and will be "read only" to linux, which reduces its' usefulness. That's why I have two 30Gb partitions, so both windows and linux can use them.

Hope this helps you...

Moloko 11-03-2005 04:59 PM

Windows needs a primary partition to install to. Linux however can boot off both kinds.

Personally I would use a Linux Live cd to partition the drive with one primary partition for Windows and the rest as logical partitions for data and for Linux.

Install Windows to the first primary partition and let it format the partition. After this install Linux to one of the logical drives and use Linux to format the remaining partitions with mkfs as either FAT32 or a Linux file system. This will also make the Linux bootloader install, which can perfectly boot Windows.

DeusExLinux 11-03-2005 05:58 PM

Keep in mind you can only have 4 primary partitions.. but you can set a lot of locial paritions UNDER a primary..

so, if you have 2 primarys, one can be a windows and the other can have 3 or for logical paritions in it for linux... check out Gentoo's install guide, it has a lot of great info on paritioning... www.gentoo.org

Linunix 11-04-2005 12:35 AM

Many thanks so far!

In fact I have a little knowledge about partitions but it is insufficient about the relation of Extended Partitions / Primary Partitions and Logical Drives. (In fact people never speak about it! ;) )

a) What are the conditions for creating Logical Drives? Can a Logical Drive be set for any partition type? I rather guess you need Extended Part. to set up Logical Drives.

b) Are there different types of Extended Partitions? How many Extended Partitions can you have on one drive? Can you delimit their size or do they take the rest of the disk?

c) Would the following setting be possible: Disk with 3 Primary Part. :
1 Windows NTFS
1 Extended with Log. Drives (name them A - D)
1 Extended with Log. Drives (name them E - H)

saikee 11-04-2005 02:50 AM

Best way to think about it is

Primary partitions are individual cars or lorries of different size and an extended partition as a train with carriages as logical partitions.

A disk can only have 4 items maximum of the above but never more than 1 extended partition. One gives up a primary partition in exchange for an extended partition.

In Windows the total number of partitions is limited by the 26 alpabets. Linux permits 63 partitions in an IDE disk but only 15 in an SCSI or Sata disk. In practice I found the IDE limit is 60 in my case.

Windows can"ONLY" be booted from a parimary partition.

Linux can be booted from either a primary or a logical partitions.

An extended partition is in name only as it hasn't got any storage space inside. In Linux it appears the moment the first logical partition is created and disappears the moment the last logical partition is deleted. You can see it happening with cfdisk & fdisk commands in Linux.

There is only one type of extended partition because no partitioning program can do more than that. You can find out the reason by reading up the subject.

Your can have your scheme as long as there is only one extended partition. The logical partitions may be called C, D,F... if they are FAT or NTFS type in Windows but always call hda5, hda6... in Linux.

Linux reserves hda1, hda2, hda3 and hda4 for the 4 primary partitions and the first logical partition always starts with hda5. I have not been able to have higher than hda60 in an IDE disk myself from the 120 partitions (2 IDE & 2 Sata disks) in my box.

Linunix 11-04-2005 04:56 AM

Good description! :) I have taken the freedom and integrated some of your lines into the Linux Wiki (/PARTITION).

I think I will get along now! Thanks a lot!

Here is another hint for partition newbies using cfdisk: if your partition table is completely allocated by an Extended partition (which e.g. is not completely filled with Logical drives) you can regain freespace for another Primary partition by creating a dummy logocal drive and deleteing it again. cfdisk seems to resize the Extended partition and makes space for Primary ones.

saikee 11-04-2005 07:53 AM

Linunix,

Not always true.

The free space can be dead space "unusable" by any system.

There is only two possibilities, I believe, that space from a primary space can be integrated into an extended partition. It is either by the front end or the read end.

A logical partition differs from a primary partition by at least in the following

(1) The logical partition tables are not all read by the BIOS in the first round. The BIOS alreadys reads the first 512 bytes of the first bootable disk and "expects" the 4 primary partition tables in the designated 447th to 510th byes (16 bytes per primary). The first 446 bytes are the famous MBR and loaded into the memory for execution.

(2) Each logical partition table carries the pointer for locating the position of the next logical partition.

Due to the above characteristic a train of logical partitions cannot be broken in the middle. If you delete any intermediate logical partition Linux will shift the following logical partitions up by one position automatically. That space is only good for the future recreation of the origibal logical partition. If this is executed the following logical partitions will be shifted downward by one. This phenomenon is also visible in cfdisk.

Thus only spaces left behind by deleted logical partitions are integratable with the primaries at the two ends of an extended partition. I haven't done it with the front end but the rear end integration is painless.

Inadvertent or forced incorrect combination of the logical and primary partition spaces is the main culprit for unreadable partition table of a hard disk because it is illogical to the operating system.


All times are GMT -5. The time now is 10:43 PM.