TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Howto install w/o floppies



Hi all,

We managed to get a laptop with a broken floppy drive and no cdrom
to boot and start the RedHat's Install program without using the boot floppy. 
The laptop was a Toshiba T4300CT running Win95.

But we hit a snag when the setup program asked for the supplemental floppy
Somehow linux seemed to be able to read the floppy drive which was
inaccessible from dos or windows95. But just in case we had not been able 
to do it here is how it works !

I reached home determined to figure out a way to absolutely not use the floppy
during the installation and I think I found it.

The following steps seem to work for me: 
1. combine the contents of the supp.img and the initrd.img together into 
   one big .img file.
2. Use the loadlin program to load the above. If the supp.img files exist in
the
    root image then it doesnot bother to request you to insert the next
floppy.
    
Details:
1.  You need a linux machine to do this. Log in as root. 
2.  Mount the RedHat cdrom (assume  it is on /mnt/cdrom)
3.  Create a blank image (.img file of about 3Meg)
       dd if=/dev/zero of=/tmp/myinitrd.img block=1024 count=3000
4.  Create a filesystem on this image. (The .img files are "linux"
     extended filesystems)
      /sbin/mke2fs /tmp/myinitrd.img 3000
     This will "format" the /tmp/initrd.img as an extended filesystem.
5. Mount this file as a filesystem so that we can copy our files to it.
     mkdir /tmp/tmp_mount
     mount -o loop -t ext2 /tmp/myinitrd.img /tmp/tmp_mount
6.  Copy all the files from initrd.img and supp.img to this filesystem.
     These are available in the RedHat cdrom on /mnt/cdrom/misc/src/trees/
   
      cd /mnt/cdrom/misc/src/trees
      cd supp
      find . | cpio -vp /tmp/tmp_mount
      cd ../initrd
      find . | cpio -vp /tmp/tmp_mount

      you cannot use the "cp" command since the "initrd" file contains special
files
      which cause problems for "cp", you could do a "cp -r" on the supp
directory
      though. Anyway Just stick to the above commands.

7. Now we have all the files we need. Unmount the filesystem.
     umount /tmp/tmp_mount
     rmdir /tmp/tmp_mount

8. The file myinitrd.img is the image we will use for booting up.

9. Copy the myinitrd.img file to the dos partition of the machine you are
     going to install linux on. (We were able to transfer files from the
network, but
     if you have a bad floppy and no network it will be tough !)

10. Copy the loadlin.exe and the linux kernel "vmlinuz" from the cdrom to the
same
      dos partition( or directory )
      The loadlin.exe is available from "dosutils" directory on the cdrom.
       the "vmlinuz" is available from under "dosutils/autoboot".

11. Make sure you are in the dos mode in the machine you are going to install
      linux. 

12. Change directory to the place where you stored the above files.

13. Load linux using the loadlin program.
      loadlin vmlinuz initrd=myinitrd.img

14. You can copy the entire distribution on to the hardrive before you carry
      out the above step if you would like a hard disk install or if you have
a network
      adapter you can try an NFS/FTP install.

The initrd.img is the image the redhat uses for installing from the cdrom 
when you boot from it. 

So you could substitute the initrd.img with the boot.img and also include 
the skel.img for rescue mode in the above big image and store all
of it on your hardrive on a different partition. Use loadlin and your actual
linux kernel with the above image to recover just in case you cannot locate
those boot floppies that I always seem to loose.

I think the same should work for the other flavors of linux but I am not sure 
I have the patience to try :)

The laptop was Richards and everybody was pretty helpful with ideas 
especially Clay and we must have bothered David and Nick quite a bit
to allow us to log on to the network server and get files off it !

Thanks all,
sandipan