Home Wiki > SDB:Partitioning for SuSE Linux
Sign up | Login

SDB:Partitioning for SuSE Linux

tagline: openSUSE sitesinden


Version: 7.0

Situation

You want to install SuSE Linux and manually make room on your hard disk, for example, because your system's YaST2 partitioning table does not enable suitable partitioning.

Procedure

Apart from describing the basics, this article also offers instructions for preparing your hard disk for SuSE Linux. You can then use YaST2 to install SuSE Linux.

When partitioning your hard disk, note the following:

  • a hard disk can contain a maximum of 4 primary partitions
  • a hard disk can contain only 1 extended partition
  • an extended partition is treated as a primary partition
  • an extended partition must be filled with logical partitions
  • an extended partition can contain many logical partitions
  • when installed together with another operating system, SuSE Linux should be appended at the end of the hard disk

Accordingly, it is often advisable to create a logical partition for SuSE Linux at the end of the hard disk. Thus, YaST2 will be able to organize the space into three suitable partitions for SuSE Linux.

Check the above factors to make sure that your partition table allows the set up of a logical drive for SuSE Linux.

During the installation with YaST2, you can view the information of the partition table. For this purpose, start the installation and wait until the first graphical YaST2 menu appears (language selection). Press the key combination ALT+CTRL+F2 (you can use ALT+F7 to return to the YaST2 installation program). A black screen with an input prompt will appear. Now enter the command:

fdisk -l

The output will look as follows:

Disk /dev/hda: 255 heads, 63 sectors, 7476 cylinders
Units: cylinders of 16065 * 512 bytes
    Device  Boot  Start       End    Blocks   Id  System
/dev/hda1   *         1       638   5124703+   b  Win95 FAT32
/dev/hda2           639      7476  54926235    f  Win95 Ext. (LBA)
/dev/hda5           639      1403   6144831    b  Win95 FAT32
/dev/hda6          1404      2168   6144831    b  Win95 FAT32
/dev/hda7          2169      2933   6144831    b  Win95 FAT32
/dev/hda8          2934      3698   6144831    b  Win95 FAT32
/dev/hda9          3699      4463   6144831    b  Win95 FAT32
/dev/hda10         4464      5228   6144831    b  Win95 FAT32
/dev/hda11         5229      5993   6144831    b  Win95 FAT32
/dev/hda12         5994      6758   6144831    b  Win95 FAT32
/dev/hda13         6759      7476   5767303+   b  Win95 FAT32

Since the range from hda1 to hda4 is reserved for primary partitions and logical partitions start from hda5, this example shows that the first two partitions are primary partitions and the other partitions are logical partitions. Furthermore, the column System shows that the second partition is an extended partition.

Now analyze your own partition table. The following are possible results:

  • You have already created 4 primary partitions and no extended partitions. You will have to repartition your hard disk, because there is no other way of creating any additional partitions. For example, delete one primary partition, replacing it with one extended partition containing logical partitions.
  • You have already installed four primary partitions including one extended partition that, however, does not have any free space left. You need to delete one or several of the last partitions, replacing them with a logical partition for Linux.

On the command line (to which you have switched with the key combination ALT+CTRL+F2), start fdisk in interactive mode:

fdisk /dev/hda

If your hard disk is not connected to /dev/hda, replace this part of the command with the respective data.

The program fdisk will display an output similar to the following and an input prompt:

The number of cylinders for this disk is set to 1245.
There is nothing wrong with that, but this is larger than 1024
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):
  • You can use the key "p" to view the table once more.
  • Use the key "d" to delete partitions. When using this function, you will be asked for the partition number to delete. If, for example, you want to delete /dev/hda13, enter the number "13".
  • The key "n" creates new partitions. In the first step, you will be asked whether you want to create a primary (p), extended (e), or logical (l) partition. For primary and extended partitions, the program will ask for the partition number to use (1-4). In the next step, the size of the new partition is determined. You can adopt the proposed value of the start cylinder with Enter. Determine the end cylinder, for example, by entering "+500M" for a size of 500 MB. If you want to use the entire remaining space, simply confirm with Enter.
  • The key "w" causes the modified partition table to be written to the hard disk, after which the fdisk program is terminated.
  • The key "q" terminates the fdisk program without writing the modified partition table.

After you have modified the partition table in this manner, reboot your system with the key combination CTRL+ALT+DEL, thus making sure the modified partition table is read and used by YaST2.

Now start the installation of SuSE Linux. Reject the partitioning proposal of YaST2 and select your hard disk. A list of all partitions on your hard disk will be displayed. Select the partition prepared for SuSE Linux.

Note: If your extended partition also contains logical partitions for Windows operating systems, make sure the extended partition bears the Id "f". You can view the partition table with the key "p" to check if this is the case. If necessary, change the setting with the key "t". <keyword>installation,partitioning,extended,harddisk,logical</keyword>