Debian/m68k GNU/Linux Installation Instructions for m68k/VMEbus SBCs (v1.0) Nick Holgate, February 24, 1999 (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.1 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/slink/main/disks-m68k/current Debian currently supports 3 VME sub-architectures these are the BVME4000/6000, the MVME162 and the MVME166/167. Sub-architecture specific files will be located in the bvme6000, mvme162 and mvme167 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.1 CD set. Boot from floppy disk: <subarch>/resc1440.bin Boot from BOOTP/TFTP: <subarch>/linux <subarch>/root.bin <subarch>/tftplilo.conf <subarch>/tftplilo.bvme or <subarch>/tftplilo.mvme Installation from floppy disk: <subarch>/resc1440.bin <subarch>/drv1440.bin common/base14-1.bin ... common/base14-6.bin Installation from NFS mounted file system: <subarch>/resc1440.bin <subarch>/drv1440.bin common/base2_1.tgz If you chose to boot or install from the floppy disk, you'll also need a program to dump the floppy images (resc1440.bin, drv1440.bin and base14-?.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/slink/main/binary-m68k (core section), /pub/debian/dists/slink/contrib/binary-m68k (contributed packages) and /pub/debian/dists/slink/non-free/binary-m68k (software which does not meet the Debian Free Software Guidelines (DFSG)). Alternatively, get the official Debian/m68k 2.1 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 to enable 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. 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. At the 'LILO Boot:' prompt enter either of the following to boot Linux and begin installation proper of the Debian software: install <Return> (for VT102 terminal emulation) or install TERM=vt100 <Return> (for VT100 terminal emulation) BOOTP/TFTP net boot: Copy an rename as appropriate 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/linux --> /boot/linuxbvme6000 bvme6000/root.bin --> /boot/rootbvme.bin bvme6000/tftplilo.bvme --> /boot/tftplilo.bvme bvme6000/tftplilo.conf --> /boot/tftplilo.conf For MVME162: mvme162/linux --> /boot/linuxmvme162 mvme162/root.bin --> /boot/rootmvme.bin mvme162/tftplilo.mvme --> /boot/tftplilo.mvme mvme162/tftplilo.conf --> /boot/tftplilo.conf For MVME166/167: mvme167/linux --> /boot/linuxmvme167 mvme167/root.bin --> /boot/rootmvme.bin mvme167/tftplilo.mvme --> /boot/tftplilo.mvme mvme167/tftplilo.conf --> /boot/tftplilo.conf 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 of the Debian software using vt102 terminal emulation: i6000 <Return> to install a BVME4000/6000 i162 <Return> to install an MVME162 i167 <Return> to install an MVME166/167 Alternatively append the string 'TERM=vt100' to use vt100 terminal emulation. e.g. i6000 TERM=vt100 <Return> 5. The boot loader will now load the Linux kernel and Ramdisk file system. After that 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 couple of seconds, the installation program should start automatically. 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. Select Color or Monochrome display If you chose VT100 terminal emulation at the 'LILO Boot:' prompt you will not be asked to Select Color or Monochrome display and installation will proceed in monochrome using standard ASCII characters instead of line drawing symbols. Otherwise if your terminal or terminal emulator supports colour you might want to select the Color option. Use the cursor keys to choose what you want, then press Return. 8. 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. 9. Configure the keyboard This step is bypassed for VME systems as the serial console is not configurable. 10. 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 <Return>' at the prompt to list the existing partitions. Then enter 'd <Return>' 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 <Return>' to create a new partition, followed by 'p <Return>' for primary then '1 <Return>' 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 <Return>', 'p <Return>', '2 <Return>'. 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 <Return>', '2 <Return>', '82 <Return>'. All that remains is to write the new partition table to disk. Enter 'w <Return>'. 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). 11. 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: Press Return to accept the selected partition When asked whether you want to do a bad-block scan, you can safely skip this step, so select "No" here using Tab and then Return. 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). 12. 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 configure 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 <server ip>:/nfshome/<client ip>. <server ip> may be replaced with the remote servers DNS name if you configured the network to us a name server. The remote directory /nfshome/<client ip> 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. 13. 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, skip the "Bad-block scan" 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. 14. 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", "/install/mvme162" or "/install/mvme167" as appropriate then press <Return>. Next you are asked whether you want to select the files from a list or enter the path name manually; just press <Return> 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 should first make you have configured the network then you will be able to choose NFS from the presented list. Enter the NFS server address and mount path. Then enter the directory where the appropriate resc1440.bin and drv1440.bin disk images are stored. 15. 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. For a stand-alone system you probably don't have to configure anything here, but 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. 16. 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 should be named "base2_1.tgz". This may either be the floppy disks, the CD-ROM or an NFS file system. If the SCSI floppy is selected you will be prompted to insert each of the 6 floppy disks in turn. Each of the floppy disks should have been written with the base14-?.bin files, which are actually the "base2_1.tgz" file split into 6 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 <Return> 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. 17. 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), 18. 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. 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 sense, as PPP is often assigned dynamic network addresses). I strongly recommend to follow this suggestion and complete the network configuration after booting the disk based system. The 'pppconfig' utility is included in the base system to this purpose. In case you complete the network configuration here, this step doesn't completely set up PPP or SLIP for you, just stores some 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. 19. 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. 18) 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. 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 one of: b6000 <Return> to boot a BVME4000/6000 b162 <Return> to boot an MVME162 b167 <Return> to boot an MVME166/167 22. 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. * Set an "installation profile" of packages you want to install. After these steps, you are automatically thrown into the "dselect" program which is the interface-driven package installation manager. My personal preference is to quit that program as soon as possible and rather install packages manually via the "apt-get" or "dpkg" program, but your mileage may vary. You should at least set the access method and update the packages list here. Selection of packages has already been performed if you didn't skip the "installation profile" above, so there should be no need to select packages by hand using dselect. When you quit this program, you get logged out and can log in as root or as an unprivileged user if you created one before. 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 one of the following to the _beginning_ of the tftplilo.conf file: For BVME4000/6000: [crate] ip = <ip address of installed system> prompt = No boot = b6000 For MVME162: [crate] ip = <ip address of installed system> prompt = No boot = b162 For MVME166/167: [crate] ip = <ip address of installed system> prompt = No boot = b167 23. 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!