I found this on a web page about 3 months ago and have been using
this
method of installing ever since. I hope someone finds it useful. from David **************************************************** Gentoo Floppy Install Author: Matthias Kerstner - [EMAIL PROTECTED] Last changed: 16.06.2003 NOTE: This tutorial provided on this page is free to be used and distributed. If you have anything to add please write a mail to [EMAIL PROTECTED]. Introduction For people who have an old BIOS and due to this have no CDROM support at startup or even no CDROM at all might wonder how to install Gentoo Linux on their computer. Don't panic since there still is the option left to install Gentoo Linux (http://www.gentoo.org/) from a floppy disk. This might seem odd for the first moment but you can learn a lot by setting up your computer with the old good floppy! Please note that much of the information provided in this tutorial originated from a Gentoo Forum FAQ which can be found here: http://forums.gentoo.org/viewtopic.php?t=8690. Although I found it quite helpful there still were some open questions that were not covered by this FAQ and so I decided to write this tutorial. Bootdisk & Rootdisk To start off the installation grap a Slackware boot disk installation image found on their homepage http://slackware.com/install/bootdisk.php. Follow the instructions on the website on how to create the floppy. There shouldn't be any problems arising during the install, although good M$ Windows XP managed to screw up a few of my old floppies during the image creation (with rawriteXP.exe). So if you have the chance to create a floppy on a linux box be sure to make profit of it. For a guide an how to create the floppy image on linux please refer to the slackware website mentioned above. Fire up your machine with the floppy you just created to start the hardware detection. If you want to install Gentoo on a SCSI system you probably also have to download the SCSI boot images (for example adaptec.s) from a slackware mirror nearby you. Of course there are generic ones in case you don't know what controller you have or if there does not exist an image for your specific controller. Nevertheless the appropriate image will obviously work much better since it will use 100% of your controller's possible power. Check your BIOS for any entries of your SCSI Controller, in most cases the controller's brand and version is also displayed during boot time (like with the Adaptec ones). If you are using an IDE interface be sure to try the generic bare.i image first before starting to grab any other image since the bare.i works in almost any case. Now that you have a working bootdisk for your HDD controller the next step is to create a so-called rootdisk which you can also download from any slackware mirror nearby you. Create the image the same way you did with the bootdisk image. When prompted during the hardware detection of the Slackware bootdisk insert the rootdisk image you just created and wait for it to have loaded. You should now have a working shell with some of the most important commands ready to be used. Setting Up Networking To setup your network card(s) you have to do the same thing as with the boot/rootdisk since the provided bootdisk kernel does not have all options enabled and therefore your NIC might not be recognized by it. Get a network setup image from a slackware mirror called network.dsk. Then insert your floppy with the network image on it and type network in the shell to start the NIC detection, which is something like net-setup used during the standard Gentoo installation with the LiveCD. If your card is not recognized by the kernel simply configure it manually by typing the following in your shell: Code #1 # ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0 # /sbin/route add -net default gw 192.168.0.100 netmask 0.0.0.0 metric 1 eth0 The above code assigns your network card eth0 the IP address 192.168.0.1, 192.168.0.255 as broadcast address and 255.255.255.0 netmask. If you don't know your broadcast address there is a little trick how to find out. You take your standard IP address, so in our case 192.168.0.1 and binary invert it so that all bits are set in the last octet. Your IP address consists of 4 octets which can be seen like this (binary view): 00000000.00000000.00000000.00000000 IP: 0.0.0.0 11000000.10101000.00000000.00000001 IP: 192.168.0.1 The binary inverted IP (=broadcast address) would look like this: 11000000.10101000.00000000.00000001 IP: 192.168.0.1 11000000.10101000.00000000.11111111 IP: 192.168.0.255 Compare the last octet (last 8 digits on the right end) with the ones from the above IP (192.168.0.1) and you will realize what is meant by binary inverted. In case you are not using a gateway to connect to the internet you don't need to type the second line of the code, since it only tells your system to route all packages to the gateway 192.168.0.100. Now you should have a working connection! If you are using a DHCP server to connect to the internet you are lucky since everything you need is to type dhcpcd ethx.(Replace ethx by your network card, like eth0) For all other people who use a gateway or anthing else to connect to the internet and are rather new to linux might at this point be confused what to do now since they have to write a file called /etc/resolv.conf. But how do you manage to write something into a file that doesn't even exist without using vi or any other text editor? Here is a little trick how you can get around this problem: Code #2 # echo "nameserver 1.1.1.1" > /etc/resolv.conf # echo "nameserver 2.2.2.2" >> /etc/resolv.conf Note the >> in the second line of the code. This causes the echo command to insert your input in the next line after the first input. Thanks for Johannes P. for this advice how to get around this tricky problem 8) Partitions & Filesystems The next thing you have to do is to create partitions on which you can set up your system. Type following in your shell: Code #3 # fdisk /dev/sdx (SCSI) # fdisk /dev/hdx (IDE) Obviously you have to replace the x after the HDD names with your HDD's name. (like hda or sda). Please refer to the standard Gentoo installation guide found at http://www.gentoo.org/doc/ in case you need more information on how to use fdisk. Set your partitions as you would do with the normal LiveCD installation. If fdisk instructs you to restart your machine please do so, otherwise your system might not recognize the altered boot records. Now that you have working partitions you have to create the appropriate filesystems for them. I like to choose ext3 for my boot partition (sda1) and ReiserFS for my root partition, although I sometimes also choose ext3 for my root partition. Code #4 Code #4 # mke2fs -j /dev/sda1 # mkswap /dev/sda2 # mkreiserfs /dev/sda3 # swapon /dev/sda2 Next you will have to mount your partitions so that you can untar (=unzip) the stage source. To do so type the following in your shell: Code #1 # mkdir /mnt/gentoo # mkdir /mnt/gentoo/boot # (mkdir /mnt/cdrom) # mount /dev/xda3 /mnt/gentoo # mount /dev/xda1 /mnt/gentoo/boot # (mount /dev/sr0 /mnt/cdrom) The above code creates the directories needed for the mounting points. Note that I wrote the cdrom support code in brackets since you don't need them for the tutorial, but if you don't want to waste time downloading the stage source you can copy it from your cdrom. By the way sr0 stands for the first SCSI CDRom. (like sda) Uncompressing Stage1 Source The next problem you have to deal with during the Gentoo installation with the Slackware floppy is to untar the stage source. You will soon find out if you want to use bzip2 to unzip your stage.tar.bz2 that there is no such file on the floppy. People who now think that it works to use tar to unzip a .tar.bz2 will soon realize that it won't work out. You need an instance of bzip2 to untar a .tar.bz2 with tar. Use the following code to unzip your stage file: Code #1 # cd /mnt/gentoo # wget ftp://sources.redhat.com/pub/bzip2/v102/bzip2-102-x86-linux24 # chmod +x bzip2-102-x86-linux24 # ./bzip2-102-x86_linux24 -d stage.tar.bz2 # tar -xvpf stage.tar.bz2 # chown -R root.root /mnt/gentoo If you already have a working copy of bzip2 on your machine you can use the following command for this part: Code #7 # bzip2 -d stage.tar.bz2 You should now have all Gentoo stage1 sources on your harddisk! Chroot & Portage Tree Next step is to point your shell to the new paths and binaries which can be achieved by typing the following in your shell: Code #8 # mkdir /mnt/gentoo/proc # mount -t proc proc /mnt/gentoo/proc # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf # chroot /mnt/gentoo /bin/bash # env-update # source /etc/profile The command chroot tells changes the system environment from your standard mounted one one into the new Gentoo environment (/mnt/gentoo). The remaining actions that have to be taken will be executed in this new environment. You will now have to update your portage tree for the first time to get the most current version. To do so type the following: Code #9 # emerge sync make.conf & Bootstrap At this point I want to mention that I encountered error during the bootstrap when the script tried to emerge ncurse. The exact error was: # configure: error: Shared libraries are not supported in this version # # !!! ERROR! sys-libs/ncurses-5.3-rc1 failed # !!! Function econf, line 304, Exitcode 1 # !!! econf failed Luckily I read a post in the Gentoo Forum saying that you have to type following in the shell to avoid the problem. Code #10 # etc-update && source /etc/profile Guess what - it helped me out! So if you encounter the same error be sure to type the above code in your shell. Before running the bootstrap you have to adapt your make.conf in /etc to your system. Code #11 # nano -w /etc/make.conf With your edited make.conf you can now start the bootstrap optimized for your specific system. Type the following in your shell to start this process: Code #12 # cd /usr/portage # scripts/bootstrap.sh The bootstrap process will take ages on a slow system so prepare to wait for quite some hours. It took me about 7 hours on an old Olivetti Pentium1 100Mhz Server with an Adaptec UW SCSI 7850 controller. After this lengthy process you are ready to follow the rest of the steps in the standard Gentoo Installation Guides starting from chapter 12. Good luck! Little Tricks If you are new to linux and don't know what the commands listed above mean and how the syntax looks like simple type man in the shell and the command you don't know. This opens the manual and searches for this command. So if you want to search the manual for echo simply type man echo. You can do this with every command you don't know so make use of it! ----- Original Message ----- From: HvR Newsgroups: gmane.linux.gentoo.user Sent: Monday, September 15, 2003 5:18 AM Subject: how to install gentoo without a CDROM? does anyone know how to install gentoo without a cdrom? i have a floppy drive or i can put a bunch of files on the hard disk but my cdrom doesnt work... can i do a loop back mount of teh cdrom iso image somehow? i really would like to install gentoo, any help or pointers appreciated...
|