Debian/m68k GNU/Linux Installation Instructions for m68k/VMEbus SBCs (v1.2) Nick Holgate, April 13, 2000 (derived from Amiga install guide by Frank Neumann) _____________________________________________________________________ Ok, so you think you want to try Debian, dive into the wonderful world of free software, world-wide programming collaboration and soon-to-come world domination? Fine. Your first test will be to install the Debian base system on your VMEbus SBC, and I hope this document will help you in getting that step done. So, without any further ado, these are the absolutely vital steps you need to take: 0. Before even thinking of starting to install Debian, you should make a BACKUP of your current system. It's not like Debian will erase all data on your hard disks immediately when it starts up, but you can damage a lot easily if you are new to Linux or Unix in general. If you have a DAT, or spare hard disk, this is the chance to use them for creating a backup. 0b. Check out if your system is suited for Linux/m68k - please read the Linux/m68k FAQ, available e.g. at http://www.linux-m68k.org. 1. First you must decide which media you are going to boot and install the Debian base system from: Booting choices are: * SCSI CD-ROM (BVME4000/6000 only). * TEAC FC-1 SCSI floppy drive. * BOOTP/TFTP Installation media choices are: * SCSI CD-ROM. * TEAC FC-1 SCSI floppy. * NFS mounted filesystem. 2. Obtain the official Debian/m68k 2.2 CD set, or get all required files from one of Debian's FTP sites, like ftp.debian.org, ftp.de.debian.org etc. A list of mirror sites can be found at http://www.debian.org/distrib/ftplist. No matter what mirror site you use, the path should always be: /pub/debian/dists/potato/main/disks-m68k/current Debian currently supports two VME sub-architectures families these are BVM's BVME4000/6000, and Motorola's MVME162/166/167/172/177. Sub-architecture specific files will be located in the bvme6000 and mvme16x sub-directories of disks-m68k/current respectively. Below is listed the names of the files you will need for each boot and installation media type: Boot from CD-ROM (BVME4000/6000 only): The first CD of the official Debian/m68k 2.2 CD set. Boot from floppy disk: /images-1.44/rescue.bin /images-1.44/root.bin Boot from BOOTP/TFTP: bvme6000/linuxbvme6000 bvme6000/rootbvme6000.bin bvme6000/tftplilo.conf bvme6000/tftplilo.bvme or mvme16x/linuxmvme16x mvme16x/rootmvme16x.bin mvme16x/tftplilo.conf mvme16x/tftplilo.mvme Installation from floppy disk: /images-1.44/rescue.bin /images-1.44/root.bin /images-1.44/drivers.bin images-1.44/base-1.bin ... images-1.44/base-11.bin Installation from NFS or locally mounted file system: /images-1.44/rescue.bin /drivers.tgz base2_2.tgz If you chose to boot or install from the floppy disk, you'll also need a program to dump the floppy images (images-1.44/*.bin) to a 1440k (HD) floppy. This can be done on an MSDOS PC using a program named 'rawrite.exe' or 'rawrite2.exe', or on a Unix box using the 'dd' command. Once you have installed the base system and want to continue installing other packages, you can find these under the directories /pub/debian/dists/potato/main/binary-m68k (core section), /pub/debian/dists/potato/contrib/binary-m68k (contributed packages) and /pub/debian/dists/potato/non-free/binary-m68k (software which does not meet the Debian Free Software Guidelines (DFSG)). Alternatively, get the official Debian/m68k 2.2 CD set. The install files may be found on disc 1 in /install/. 3. Now you have decided on your installation method and obtained all the necessary files it is time to begin installation. 4. Configure your VME hardware enabling it to boot from the selected media. The BVM processor boards use the BVMBug boot ROMs, see the file bvmbug.txt in disks-m68k/current/bvme6000 or the CD disc 1 /install/bvme6000 directory for more information. Also refer to the tftplilo.txt file for more information on using 'tftplilo' to boot using BOOTP/TFTP. If booting from floppy disk your SCSI floppy drive _must_ be configured to have the _lowest_ device id in the SCSI bus chain. CD-ROM/Floppy disk boot: At the boot ROM/debugger prompt enter the appropriate incantation to boot from the CD-ROM or Rescue floppy disk you created. After the boot ROM's have read the Linux loader from disk you will be presented with a message giving instructions for the next step and be presented with the 'LILO Boot:' prompt. Enter 'install' at the 'LILO Boot:' prompt to boot Linux and begin the installation. BOOTP/TFTP net boot: Copy the following files into the directory where your TFTP server expects to find them. On debian systems this is the /boot directory. For BVME4000/6000: bvme6000/linuxbvme6000 bvme6000/rootbvme6000.bin bvme6000/tftplilo.bvme bvme6000/tftplilo.conf For MVME16x/17x: mvme162/linuxmvme16x mvme162/rootmvme16x.bin mvme162/tftplilo.mvme mvme162/tftplilo.conf Note: The tftplilo.conf file is identical for both BVME and MVME installations so it is possible to copy all files necessary for both sub-architectures. At the boot ROM/debugger prompt enter the alternative incantation to boot using TFTP (also refer to the tftplilo.txt file for additional system configuration information). After the boot ROM's have loaded tftplilo and tftplilo has read its configuration file you will be presented with the 'LILO Boot:' prompt. At the 'LILO Boot:' prompt enter one of the following to boot Linux and begin installation proper: install 5. If booting from CD-ROM or from TFTP the boot loader will now load both the Linux kernel and the Ramdisk file system. Otherwise if booting from floppy disk just the Linux kernel is loaded and later you will be asked to change the rescue disk for the disk containing the Ramdisk image (root.bin) after the Linux kernel has started. After the Linux kernel has started all kinds of kernel debugging information will appear. These messages scroll by far too fast for you to read, but that's not important right now. After a few of seconds, you will either be prompted for the second floppy disk or the installation program will start. 6. So, now we're getting somewhere. The Debian installation program will lead you through the steps of preparing the partitions from the Linux side, unpacking and configuring the kernel modules and base system, and finally rebooting. Some of the presented steps are not really necessary (or even possible) on m68k platforms (the installation program is just the same as on the i386 version of Debian, and some of the i386 features are not (yet) available in the m68k version), so I'll tell you what you have to do at each step now. 7. Release notes This is just a screen with a little information about Debian's goals, who built the rescue set etc. Now we come to the main installation screen which lists all possible actions you can take, with the next logical step always being highlighted at the top of the list. I recommend to strictly follow the suggested way. 8. Configure the keyboard This step is bypassed for VME systems as the serial console is not configurable. 9. Partitioning a hard disk If you are installing to an NFS root file system and you are not going to use virtual swap memory this step can be bypassed. Partitioning maps areas of your hard disk in order to provide space for the Linux root file system and space for virtual memory swap storage. A rough guide for determining the size of the swap partition is to use a size about twice as large as your main memory. But rather more than that on systems with little main memory, don't go below 20 MB swap space. Note: Linux assigns device names in order of SCSI ID as follows: /dev/sda first hard or floppy drive lowest ID /dev/sdb second hard or floppy drive | /dev/sdc third hard or floppy drive V etc. highest ID /dev/scd0 first CD-ROM drive lowest ID /dev/scd1 second CD-ROM drive | /dev/scd2 third CD-ROM drive V etc. highest ID /dev/st0 first tape drive lowest ID /dev/st1 second tape drive | /dev/st2 third tape drive V etc. highest ID The partitions on each hard disk are represented by appending a decimal number to the hard disk name: sda1, sda2, sda3 represent the first, second and third partition of the first SCSI hard disk in your system. The Debian installation software creates a symbolic link "/dev/sfd0" to the first (lowest ID) SCSI floppy device and this is the SCSI floppy drive used by the remainder of the installation. When adding SCSI devices to an already installed system make sure the SCSI ID of the new device is higher than those of the same type already in the system, reconfigure existing devices with a lower IDs if necessary. This is because device names are allocated in order of ID and not a fixed named to a fixed ID. Adding a device with a lower id will cause all those with higher IDs to change device name, which may in the case of a hard disk may prevent your system from booting. The disk partitioner is rather unfriendly so here is a brief description of what to do. This example creates two partitions on the hard disk, the first one for the Linux root file system and the second for the swap data (virtual memory). On entering the fdisk utility you may get a 'Warning: invalid flag' message, you can safely ignore this it just indicates that the disk has not been partitioned before. The first thing to do is to delete any old partitions on the disk. Enter 'p ' at the prompt to list the existing partitions. Then enter 'd ' to delete a partition, when asked enter the partition number 1-4 and press return. Repeat this for each partition. Now you must create the new partitions. Use the 'p' command to display the disk geometry. The values you are going to enter are in units of cylinders, see the line showing 'Units = cylinders of ??? * 512 bytes' calculate the number of bytes per cylinder then divide that into the required size of the swap partition to give the number of cylinders for the swap partition. Now subtract the number of cylinders for the swap partition away from the total number of cylinders on the disk. this will give you the last cylinder for the main file system partition. Enter 'n ' to create a new partition, followed by 'p ' for primary then '1 ' for the partition number. Enter first cylinder number as 1, enter the last cylinder number calculated above. Now repeat for the swap partition. Enter 'n ', 'p ', '2 '. Enter the first cylinder as the lowest number offered, and the last cylinder as the highest number offered. To indicate that this is the swap partition you must set the partition type. Enter 't ', '2 ', '82 '. All that remains is to write the new partition table to disk. Enter 'w '. The partition table will be written and you will leave the fdisk utility. (Note: ignore the warning about rebooting to update the partition table, it is not necessary). 10. Initialize and Activate a Swap Partition. When pressing Return, you will see a list of partitions that the installation program has found as being prepared by you for usage as a swap partition. If you have partitioned the hard disk as described above you will probably see only one choice, /dev/sda2. If you have chosen to use several swap partitions, repeat the following steps for all of them: When asked whether you really want to initialize this partition as a swap partition, think twice, then, when being sure, press Return. At this point the swap partition will be "formatted" -- that is, some information is written to it to mark it as swap partition -- which only takes a second (you'll hardly be able to read the text that appears at the top of the screen - ignore that for now). 11. Configure network (for NFS root filesystem) If you are installing _to_ an NFS root file system, now is the time to configure the network. This will not be the presented next step so scroll down the menu and select it yourself. Once the network is configured instead of selecting 'Initialize a Linux Partition' choose 'Mount a Previously-Initialized Partition' and from the presented list select 'NFS'. Now enter the NFS mount point as :/nfshome/. may be replaced with the remote servers DNS name if you configured the network to use a name server. The remote directory /nfshome/ should already be exported by the NFS server. The naming convention chosen is determined by the tftplilo.conf text file and may be changed if desired. The default scheme allows many systems to be installed to a single server each client having its own complete file system. This is far from optimal as certain directories could be shared between systems refer to the NFS-Root.gz mini HOWTO for more information. 12. Initialize a Linux partition. If you are installing _to_ an NFS root file system, this step is not required. Initialising the Linux partition is very similar to initialising the swap partition Just as before, you'll be presented with a list of partitions that the installer found to be valid as Linux filesystem partitions. This time if you have partitioned the hard disk as described above you will probably see only one choice, /dev/sda1. For each of the partitions you have chosen to use, accept it by selecting it from the list and pressing Return, next select yes or no to the 2.0 backwards compatibility option and (when you are sure) select "Yes" to format (initialize) the partition. After that, you will be asked whether you want to mount the currently active partition as root ("/") partition. Say "Yes" here at the first partition you use. Other partitions can be mounted somewhere under this mount point afterwards. 13. Install Operating System Kernel and Modules. If you are installing from floppy disks choose the SCSI floppy option, you will then be prompted to insert both the Rescue floppy and the Drivers floppy at appropriate times and the kernel and modules will be unpacked to the hard disk or NFS root file system. If you are installing from CD-ROM select CD-ROM and choose the SCSI CD-ROM from the presented list. You will then be asked the path to the directory containing the installation files - change "/debian" to "/install/bvme6000" or "/install/mvme16x" as appropriate then press . Next you are asked whether you want to select the files from a list or enter the path name manually; just press here twice as the installation program will find the correct and only installation files itself. The hard disk LED will blink for a while as the kernel and modules are unpacked onto the root partition, and after that you get back to the main screen. If you are installing from an NFS mounted file system you will be prompted to configure your network, if you have not already done so. Next enter the NFS server address and mount path. You will then be prompted to enter the path inside the mounted NFS filsystem where the Debian Archive resides. You should enter a path prefixed with /instmnt, which is the NFS mount point within the local filesystem. You are then prompted to select from a list or manually enter a further path within the archive to the directory holding . You can generally just hit twice at this point. 14. Configure Device Driver Modules This step is only necessary if certain device drivers need to be loaded very early when Linux starts up later; like, an Ethernet driver has to be pre-loaded so that the networking can already be initialized at boot-time. The VME kernels supplied with Debian have the Ethernet, SCSI and serial drivers compiled in so you probably won't have to configure anything here, though you should still select this item so that the installer can build a list of available kernel modules. When you see the next screen, you can immediately go to "Exit: Finished with modules. Return to previous menu". If you do need to configure a device driver for your system, please follow the on-screen explanations for selecting modules to be pre-loaded. When done, select the "Exit" item. Once your Linux system is installed, you can get back to the configuration of modules at any time by starting the "modconf" program. 15. Install the Base System. Just as with the "Install Operating System Kernel and Modules" step, you need to specify where the base system archive is located. The file is named "base2_2.tgz". If the SCSI floppy is selected you will be prompted to insert each of the 11 floppy disks in turn. Each of the floppy disks should have been written with the images-1.44/base-*.bin files, which are actually the "base2_2.tgz" file split into 11 pieces. If you are installing from CD, select "cdrom: CD-ROM drive" and enter "/install" as path. Again, as everything should be in the place the installer expects to find it, press twice after this to accept the default options. After selecting the SCSI CD-ROM drive as everything should be in the place the installer expects to find it, press Return twice to accept the default options. At this point you've got a few minutes time (depending on the speed of your processor/hard disk) while the base archive is unpacked onto the Linux root partition. 16. Configure the Base System. In this step you just set the time zone that you're in - this should be pretty intuitive. For instance, for Germany the selection "CET - Europe" (first screen) and "Berlin" (second screen) should be fine. When asked whether your system clock is set to "GMT" (Greenwich Mean Time), select "Yes", and make sure your hardware clock actually is, this can be done from within the boot ROM debug monitor when you reboot the system at the end of the first stage of the installation. 17. Configure the Network If you are installing to or from an NFS server you may have already performed this step. If so you don't need to do it again. We're almost done! This last step to do is to set up your networking if you are so lucky to be connected to a net. If you have no network, all you need to enter is your hostname (under Linux, every computer has a name!). Pick something you like - your girlfriend's name *sigh*, a famous artist/writer/composer/character/actor/whatever. Just one word, please. If you are connected to a network, you need to enter: * Your network's name * The IP address of your computer * The netmask * Your broadcast address * Your gateway's IP address, if one is available * Your nameserver's IP address, if there is one available. * Your type of connection - Ethernet, PPP, Slip or whatever else. --- Comment from Michael Schmitz: The help screen on this step suggests that you don't answer "Yes" to the question whether your computer is connected to a network if this connection is PPP, i.e. a temporary one (makes some sense, as PPP is often assigned dynamic network addresses). I strongly recommend to answer "Yes" nonetheless - to my experience, you will not be prompted for your network configuration otherwise, leaving this step to be done manually. My installation wouldn't connect to the FTP server without knowing what name server to use ... The network configuration step doesn't completely set up PPP or SLIP for you, just stores the configuration data for you. For these configurations, you'll see error messages about 'network device not available' now (and on the later boot from disk), ignore them, and configure PPP or SLIP later. --- 18. Make Linux bootable directly from hard disk. If you have installed to a hard disk, press enter and the 'vmelilo' program will be run to make your hard disk bootable. 19. Make a Boot Floppy Skip this step as this is not currently supported. 20. Now its time to reboot. Select the alternative action "Reboot the System" and after a few seconds, the machine will reboot. 21. Now is the is the time to check that your hardware clock is set to "GMT" (Greenwich Mean Time). 22. If you have just installed to a hard disk use the appropriate boot ROM command to boot from that disk. If you have just installed to an NFS root file system, again enter the command to boot the tftplilo program. This time from the 'LILO Boot:' prompt enter: boot 23. The boot sequence will take quite a bit longer than when you installed the system because a database of filenames has to be built ("Locate" database). After that, you are automatically logged in, and need to take these steps: * Set a password for the root user (the administrator account) * Create another (unprivileged) user account * Activate (or not) the "Shadow passwords" (recommendation: Yes, use it!) * Determine whether you want to continue installing the system via a PPP line or not, and configuration of the PPP connection scripts. * Select additional packages to install. At this point you have a running basic Debian installation on your VME system. If you have just installed to an NFS root file system you may like to make a slight addition to the tftplilo.conf file on the TFTP server to disable the installation options for the installed machine and enable your system to boot without having to enter anything at the 'LILO Boot:' prompt. Add the following to the _beginning_ of the tftplilo.conf file: [crate] ip = boot = Boot delay = 3 prompt = No 24. One more tip: To cleanly shut down a running Linux system, you must not just press the reset button or turn off the power - instead, you should use the shutdown program while logged in as 'root' as follows: shutdown -h now (shutdown and halt the system immediately) or shutdown -r now (shutdown and reboot the system immediately) _____________________________________________________________________ More information: * The Debian GNU/Linux homepage (http://www.debian.org/) * The Linux/m68k domain's homepage (http://www.linux-m68k.org/) * Richard Hirst's VME Linux homepage (http://www.sleepie.demon.co.uk/linuxvme/) * Visit us on IRC, channel #linux68k, server irc.lame.org (or connected servers). ..and maybe hundreds of other Linux- or Debian-related Web sites around the world. Good luck in the wonderful world of Debian/m68k!