Preparing for Linux
The purpose of this section is to describe the preparation required in order to dual boot AmigaOS and Linux from the same
hard disk, and at boot time switch between them as required.
Partition Setup using AmigaOS 4.0
Before you can install Linux, you must setup the various partitions that Linux requires. To do this you must use Media
Toolbox which you will find in the SYS:Tools drawer, as shown below:

Double click on the icon to run it, at which point the following window will open:

Check Program mode near the bottom of the window and if it says "Expert", change it to "Normal".
Then select the device (normally a1ide.device) that contains the bootable disk containing your operating systems by clicking
on it, and click on the Start button which will display the Media Toolbox Unit Selection window:

Initially nothing will be selected, and all buttons will appear ghosted. Because there can be multiple units for that device
(as shown) you must select the appropriate unit. Once the unit is highlighted, the buttons below the unit list will become
un-ghosted as shown below:

The next step is to click on the Edit partitions and filesystems button. Another screen will appear that shows the
partitions already configured on the disk drive, in this case DH0 and DH1 for use by the AmigaOS, with corresponding orange
boxes in the partition map.
Defining the Linux Root Partition

The large grey area denotes the space that has not yet been allocated. To allocate some of this space you must click on this
area to highlight it as shown below:

The "Add partition" button will no longer be ghosted and you must click on this to create the first of the new
partitions that are required for Debian. This will cause the colour of the free space to change to bright green as shown below:

If you look at the details below the partition map you will see that "Name" has been automatically set to the next
AmigaOS partition name (i.e. DH2 is our example above), and that "Automount" has been ticked but "Bootable"
has not been ticked.
Click in "Name" box, change the name to "Linux" and press <Enter>. (If you forget to press <Enter>
the value will not be saved.) Then click on the "Automount" box to un-tick it (this only applies to the AmigaOS and
you don't want it mounted because the AmigaOS doesn't understand the Linux filesystem), and click on the "Bootable"
box to tick it. The next step is to position the cursor over the right-hand arrow of the green box, then click and drag it to
the left until the size shown in the window at the top shows approximately the right size for the partition - each movement
of the arrow may cause the size to jump in large chunks, but you can use the "-" and "+" buttons to the
right of the "Higher cyl." box to fine tune the exact size that you require. The size depends on you, but for the
Linux partition it should not be smaller than 1GB, and if you exclude any data files that you might want to save, the
complete Woody install requires 7GB, and the complete Sarge install is even larger. In our example we have chosen 20GB, as
shown below:

The next step is to click on the "Select filesystem/edit details" button to complete the setup. This will open
another window containing the Filesystem details as shown below:

Check "Blocksize" and if necessary change it to 512. Similarly check "Buffers" and if necessary
change it to 100. The default Filesystem Type is "Standard filesystem". Click on the Type item and change it
to "Custom filesystem". The Standard filesystem types will become shaded, and the previously ghosted Identifier box
will become active. Over-type the "Identifier" value with 4C4E5800 and press <Enter>. The box to the
right of the Identifier value should now show LNX\00, as shown below:

If everything is correct, click on "Ok - accept changes". This will return you to the Partition setup screen where
the new partition should be displayed. Notice that the Linux partition is coloured brown rather than orange, as shown below:
Defining the Linux Swap Partition

We now need to repeat this process for the Debian Linux Swap partition. Click on the unallocated grey area and then on the
"Add partition" button. Click in "Name" box, change the name to "Swap" and press <Enter>.
Then click on the "Automount" box to un-tick it, and leave the "Bootable" box un-ticked. Click and
drag right-hand arrow of the green box to the left until the size shown in the window at the top shows approximately the right
size for the partition. The size required should never more than 1.5x the amount of memory used for Linux, so 1.5GB is more
than enough for the Linux Swap partition. In our example we have chosen 1GB, as shown below:

The next step is to click on the "Select filesystem/edit details" button to complete the setup. Check that
"Blocksize" is 512 and "Buffers" is 100. Change the Filesystem Type to "Custom
filesystem", and over-type the "Identifier" value with 53575000 and press <Enter>.
The box to the right of the Identifier value should now show SWP\00, as shown below:

If everything is correct, click on "Ok - accept changes". This will return you to the Partition setup screen where
the new partition should be displayed. Notice that both Linux partition are coloured brown, as shown below:

That is the minimum that is required for installing Linux.
Defining a Linux User Partition
This step is not necessary, but you may want to setup a separate partition for data rather than using the Linux Root
Partition - this can simplify recovering your system if for some reason the file tree becomes corrupted and fsck finds
errors. The process is basically the same as defining the Linux partition but using a name of your choice. Don't forget to
click on the "Automount" box to un-tick it, and leave the "Bootable" box un-ticked.
Check "Blocksize" and if necessary change it to 512. Similarly check "Buffers" and if necessary
change it to 100. The default Filesystem Type is "Standard filesystem". Click on the Type item and change it
to "Custom filesystem". The Standard filesystem types will become shaded, and the previously ghosted Identifier box
will become active. Over-type the "Identifier" value with 4C4E5800 and press <Enter>. The box to the
right of the Identifier value should now show LNX\00. If everything is correct, click on "Ok - accept changes".
This will return you to the Partition setup screen where the new partition should be displayed in brown as for Linux.
Defining an AmigaOS/Linux Transfer Partition
If you have a requirement to exchange files between AmigaOS and Linux you will need to set up another partition which
both can access. You can call this partition anything you like, but because you want it to appear on the AmigaOS side, it
can be a good idea to give it the next DHx: name. Because you want this partition to be accessible from the AmigaOS you
must leave the "Automount" box ticked, but leave the "Bootable" box un-ticked.
Check "Blocksize" and if necessary change it to 512. Similarly check "Buffers" and if necessary
change it to 100. The default Filesystem Type is "Standard filesystem". Click on the Type item and change it
to "Custom filesystem". The Standard filesystem types will become shaded, and the previously ghosted Identifier box
will become active. Over-type the "Identifier" value with 444F5303 and press <Enter>. The box to the
right of the Identifier value should now show DOS\03. If everything is correct, click on "Ok - accept changes".
This will return you to the Partition setup screen where the new partition should be displayed in bright green.
Saving the Changes
Once you have decided that no more partitions are required, click on "Ok - accept changes".

At this point, the selected unit will now show as having been "Modified(!)" and the "Save to disk" button will
be un-ghosted. Click on the "Save to disk" button to save your changes. Another requester will pop up saying "Do
you really want to save the current setup to disk?" to which you should click on the "Yes,save." button. You can
then quit Media Toolbox by clicking on the close gadget at the top left-hand corner.
The next section describes Installing Linux in a Dual-Boot Environment.