3.5. Uw harde schijf vooraf indelen voor een multi-boot systeem

Met 'het indelen van uw harde schijf' wordt bedoeld het verdelen van de totale capaciteit van uw schijf in parten. Elk part is vervolgens onafhankelijk van de andere. Het is enigszins vergelijkbaar met het bouwen van muren in een huis; als u daarna meubelen in één kamer plaatst, heeft dit geen invloed op de andere kamers.

Als er al een besturingssysteem op uw systeem aanwezig is (Windows 9x, Windows NT/2000/XP, OS/2, MacOS, Solaris, FreeBSD, …) en u wilt Linux op dezelfde harde schijf installeren, dan zult u de schijf moeten herindelen. Debian vereist eigen partities op de harde schijf. Het kan niet worden geïnstalleerd op Windows- of MacOS-partities. Sommige partities zouden kunnen worden gedeeld met andere Linux systemen, maar dit valt buiten de scope van deze handleiding. U zult tenminste een afzonderlijke partitie nodig hebben voor het root-bestandssysteem van Debian.

U kunt informatie over uw huidige partitie-indeling vinden door gebruik te maken van een schijfindelingsprogramma voor uw huidige besturingssysteem , zoals fdisk of PartitionMagic . Schijfindelingsprogramma's beschikken altijd over een functie om bestaande partities te tonen zonder wijzigingen aan te brengen.

Algemeen geldt dat het wijzigen van een partititie waarop reeds een bestandssysteem aanwezig is, de daarop aanwezige informatie zal vernietigen. Het is daarom raadzaam om altijd reservekopieën te maken voordat u een schijf gaat herindelen. Als we nogmaals de analogie van het huis gebruiken: waarschijnlijk zou u eerst alle meubelen opzij zetten voordat u een muur uitbreekt om het risico dat meubelen worden beschadigd uit te sluiten. Gelukkig bestaat er voor sommige gebruikers een alternatief; zie Paragraaf 3.5.1.1, “Lossless Repartitioning When Starting From DOS, Win-32 or OS/2 ”.

Als uw computer over meer dan één harde schijf beschikt, zou u één daarvan volledig kunnen reserveren voor Debian. Als dat het geval is, hoeft u deze harde schijf niet in te delen voordat u het installatiesysteem opstart; het schijfindelingsprogramma van het installatiesysteem kan dit zonder problemen verzorgen.

Als uw machine over slechts één harde schijf beschikt en u het bestaande besturingssysteem volledig wilt vervangen door Debian GNU/Linux, kunt u eveneens het indelen van de schijf uitstellen tot tijdens de installatieprocedure (Paragraaf 6.3.6, “Partitioning Your Disks”), dus nadat u de computer heeft opgestart met het installatiesysteem. Dit kan echter alleen als u van plan bent om het installatiesysteem op te starten vanaf magneetband, CD of vanaf een andere met uw computer verbonden machine. Bedenk het volgende: als u de computer opstart met behulp van bestanden op de harde schijf en vervolgens deze harde schijf opnieuw indeelt vanuit het installatiesysteem en daarmee de opstartbestanden verwijdert, dan moet u maar hopen dat de installatie in één keer goed gaat. U zou in deze situatie tenminste moeten beschikken over een alternatieve methode om uw machine weer tot leven te wekken, zoals de originele installatietapes of -CDs van het systeem.

Als op uw machine reeds meerdere partities aanwezig zijn en er kan voldoende ruimte worden vrijgemaakt door één of meerdere daarvan te verwijderen en vervangen, dan kunt u eveneens gebruik maken van het schijfindelingsprogramma van het Debian installatiesysteem. U wordt echter aangeraden om toch de informatie hieronder door te lezen omdat er bijzondere omstandigheden kunnen zijn — zoals de volgorde van bestaande partities in de partitie-index — waardoor u alsnog wordt gedwongen om te herindelen vóór de installatie.

In alle andere gevallen zult u, om ruimte te creëren voor Debian-partities, uw harde schijf moeten herindelen voordat u met de installatie begint. Als sommige van de partities bestemd zijn voor andere besturingssystemen, zou u deze moeten creëren met behulp van de eigen schijfindelingsprogrammatuur van die besturingssystemen. Wij adviseren u niet te proberen om partities voor Debian Linux te maken met de programma's van een ander besturingssysteem. Beperkt u zich tot het maken van de partities die u wilt behouden voor het oorspronkelijke besturingssysteem.

Als u meerdere besturingssystemen op dezelfde machine wilt installeren, wordt aangeraden om eerst alle andere systemen te installeren voordat u verder gaat met de installatie van Linux. Windows en andere besturingssystemen kunnen de mogelijkheid om Linux op te starten verstoren, of kunnen u aanmoedigen om 'vreemde' partities opnieuw te fomateren.

Het is mogelijk om dergelijke problemen te herstellen of te voorkomen, maar u bespaart uzelf moeite door het oorspronkelijke besturingssysteem eerst te installeren.

Als u op dit moment beschikt over een harde schijf met één partitie (een gebruikelijke situatie voor desktop systemen) en u wilt kunnen opstarten met zowel het huidige besturingssysteem als met Debian, dan zult u de volgende stappen moeten doorlopen.

  1. Maak een reservekopie van alles op de computer.

  2. Start de computer op met behulp van het installatiemedium (zoals een CD of magneetband) van het oorspronkelijke besturingssysteem.

  3. Gebruik de schijfindelingsprogramma's behorend bij het oorspronkelijke besturingssysteem om partities daarvoor te maken. Maak ten behoeve van Debian GNU/Linux een dummy-partitie of laat ongebruikte ruimte vrij.

  4. Installeer het oorspronkelijke besturingssysteem op haar nieuwe partitie.

  5. Start het oorspronkelijke besturingssysteem opnieuw om te controleren dat alles in orde is en om de opstartbestanden van Debian te downloaden.

  6. Start het Debian installatiesysteem op om te vervolgen met de installatie van Debian.

3.5.1. Partitioning From DOS or Windows

If you are manipulating existing FAT or NTFS partitions, it is recommended that you either use the scheme below or native Windows or DOS tools. Otherwise, it is not really necessary to partition from DOS or Windows; the Linux partitioning tools will generally do a better job.

But if you have a large IDE disk, and are using neither LBA addressing, overlay drivers (sometimes provided by hard disk manufacturers), nor a new (post 1998) BIOS that supports large disk access extensions, then you must locate your Debian boot partition carefully. In this case, you will have to put the boot partition into the first 1024 cylinders of your hard drive (usually around 524 megabytes, without BIOS translation). This may require that you move an existing FAT or NTFS partition.

3.5.1.1. Lossless Repartitioning When Starting From DOS, Win-32 or OS/2

One of the most common installations is onto a system that already contains DOS (including Windows 3.1), Win32 (such as Windows 95, 98, Me, NT, 2000, XP), or OS/2, and it is desired to put Debian onto the same disk without destroying the previous system. As explained in the Paragraaf A.1, “Deciding on Debian Partitions and Sizes”, decreasing the size of an existing partition will almost certainly damage the data on that partition unless certain precautions are taken. The method described here, while not guaranteed to protect your data, works extremely well in practice. As a precaution, you should make a backup.

Before going any further, you should have decided how you will be dividing up the disk. The method in this section will only split a partition into two pieces. One will contain the original OS and the other will be used for Debian. During the installation of Debian, you will be given the opportunity to use the Debian portion of the disk as you see fit, i.e., as swap or as a file system.

The idea is to move all the data on the partition to the beginning, before changing the partition information, so that nothing will be lost. It is important that you do as little as possible between the data movement and repartitioning to minimize the chance of a file being written near the end of the partition as this will decrease the amount of space you can take from the partition.

The first thing needed is a copy of fips which is available in the tools/ directory on your nearest Debian mirror. Unzip the archive and copy the files RESTORRB.EXE, FIPS.EXE and ERRORS.TXT to a bootable floppy. A bootable floppy can be created using the command sys a: under DOS. fips comes with very good documentation which you may want to read. You will definitely need to read the documentation if you use a disk compression driver or a disk manager. Create the disk and read the documentation before you defragment the disk.

The next thing needed is to move all the data to the beginning of the partition. defrag, which comes standard with DOS 6.0 and later can easily do the job. See the fips documentation for a list of other software that may do the trick. Note that if you have Windows 9x, you must run defrag from there, since DOS doesn't understand VFAT, which is used to support for long filenames, used in Windows 95 and higher.

After running the defragmenter (which can take a while on a large disk), reboot with the fips disk you created in the floppy drive. Simply type a:\fips and follow the directions.

Note that there are many other other partition managers out there, in case fips doesn't do the trick for you.

3.5.1.2. Partitioning for DOS

If you are partitioning for DOS drives, or changing the size of DOS partitions, using Linux tools, many people experience problems working with the resulting FAT partitions. For instance, some have reported slow performance, consistent problems with scandisk, or other weird errors in DOS or Windows.

Apparently, whenever you create or resize a partition for DOS use, it's a good idea to fill the first few sectors with zeros. Do this prior to running DOS's format command, from Linux:


dd if=/dev/zero of=/dev/hdXX bs=512 count=4