boot from a zip drive & floppy


Forum: Other Help Topics
Topic: boot from a zip drive & floppy
started by: clacker

Posted by clacker on Nov. 05 2004,00:16
I finally was able to get dsl to boot from a liveZip.  I'm posting this from a parallel port liveZip damn small linux!

The first thing I did was get the zip drive working from the liveCD so I could set it up.  I used the following commands:

sudo su
mkdir /mnt/zip
modprobe ppa    ### the drive needs both power & a disk here
mount /dev/sda4 /mnt/zippy   ###you might have a different sda#

look at the drive and make sure it's nothing you want and make sure that you're looking at the real zip drive.  When your sure it's nothing you want, unmount that drive and use cfdisk to repartition it.  I made a 55 Meg primary partition type linux and made the rest a linux swap partition.

I rebooted at this point because cfdisk said to, I don't know if I needed to but I did.

Then I ran through the steps to get the zip drive working again and mounted sda1 (your number might be different).  I copied the KNOPPIX folder to the zip drive with

cp -Rp /cdrom/KNOPPIX /mnt/zip/KNOPPIX

You need to be careful with zip drives for a few reasons.  One is the speed.  It isn't all copied until the disks stops spinning, and that takes about 2 minutes.  You'll hear it.  There is a lag between when you tell it to write and it actually does write.  When it's done, umount zip and then remount it.  Now run an md5sum on the /mnt/zip/knoppix/knoppix file.  Yes, the filename is lower case now.  Check that against the md5sum of the /cdrom/KNOPPIX/KNOPPIX file.  If they don't match or you get an error, don't continue.  Believe me, do it again until they match and remember to unmount and remount before you run the md5 or you'll get the right answer, but it won't be real.  The disk is going to spin a while during the md5 sum, but not as long as the write time.

Now you need to make a boot disk.  You need a good floppy.  I ran

dd if=boot0.8.0.img of=/dev/fd0

We're almost there.  Now copy three drivers from the live cd to the floppy:

mount /dev/fd0 mnt/floppy
cp /KNOPPIX/lib/modules/2.4.26/kernel/drivers/parport/parport.o /mnt/floppy
cp /KNOPPIX/lib/modules/2.4.26/kernel/drivers/parport/parport_pc.o /mnt/floppy
cp /KNOPPIX/lib/modules/2.4.26/kernel/drivers/scsi/ppa.o /mnt/floppy
umount /mnt/floppy

now boot to the floppy with the zip disk in the drive and turned on.  At the boot prompt type expert.

say no to loading more scsi modules (unless you're an expert and really do that anyway)

say yes to loading additional modules from a disk (we put ours on the disk we have already so there's no need to swap disks)

when prompted for the names of the modules type parport.o parport_pc.o ppa.o in that order.  You should see the machine find the zip drive.  I didn't change any of the configurations after that (i said no to everything).

Then the screen loaded and here I am.  I don't see my swap space, which I thought would have been great for low memory machines.  I don't know why it didn't find that swap space at boot and use it.

EDIT: it didn't see the swap space because I never ran mkswap /dev/sda2 on it.  I did that and it did see the swap on bootup.

Posted by henk1955 on Nov. 05 2004,08:20
Good job!

now try to edit the linuxrc in the minirt24.gz so it includes the loading of the extra modules.
copy the modules to minirt24 /modules.
then you may be able to boot withouht going expert mode?
.

Posted by clacker on Nov. 05 2004,15:31
I did that last night, but it was a lot of effort for something so easy.  I feared the minirt.  In the end though, I got it to from the boot command line as an option.  Here's what I did with a working boot disk in the floppy drive:

Code Sample
mount /dev/fd0 /mnt/floppy
cp /mnt/floppy/minirt24.gz .
gunzip minirt24.gz
mkdir test
mount -o loop minirt24 test
mkdir test/modules/parport
chmod 755  test/modules/parport
cp /KNOPPIX/lib/modules/2.4.26/kernel/drivers/parport/parport.o test/modules/parport/
cp /KNOPPIX/lib/modules/2.4.26/kernel/drivers/parport/parport_pc.o test/modules/parport/
cp /KNOPPIX/lib/modules/2.4.26/kernel/drivers/scsi/ppa.o test/modules/scsi/
chmod 755 test/modules/scsi/ppa.o
chmod 755 test/modules/parport/*


next I edited the linux rc file.  I added the following three sections (I left some of the origional above and below each section so you can see where they go:

The first section looks for zipboot on the boot: command line (you need to actually type dsl zipboot to get it seen)
Code Sample
case "$CMDLINE" in *idecd*|*atapicd*) IDECD="yes";;; esac
case "$CMDLINE" in *noideraid*) NOIDERAID="yes";;; esac

###############################################################
# Check for the boot from zipdrive option
case "$CMDLINE" in *zipboot*) ZIPBOOT="yes";;; esac
###############################################################

KNOPPIX_DIR="KNOPPIX"
KNOPPIX_NAME="KNOPPIX"


The second section I added to linuxrc is a function that actually loads the modules:
Code Sample
test -n "$INTERACTIVE" && echo "0" > /proc/sys/kernel/printk
echo -n "${CRE}"
}

###############################################################
loadzip(){
echo -n "${CRE}${BLUE}Loading Zip Drive for booting...${NORMAL}"
$INSMOD -f /modules/parport/parport.o
$INSMOD -f /modules/parport/parport_pc.o
$INSMOD -f /modules/scsi/ppa.o
sleep 5
}
###############################################################


# Check for SCSI, use modules on bootfloppy first
if test -n "$INTERACTIVE"; then


The third section added to linuxrc check to see if you entered dsl zipboot on the command line, and if so runs the function that loads the modules that run the zip drive:
Code Sample
fi
# All interactively requested modules should be loaded now.

###############################################################
# Check for Zip Drive load
if test -n "$ZIPBOOT"; then
loadzip
fi
###############################################################

# Check for ide-scsi supported CD-Roms et al.
test -f /proc/scsi/scsi && FOUND_SCSI="yes"


then I ran:

Code Sample
umount test
gzip minirt24
cp minirt24.gz /mnt/floppy


and I had my zip drive bootable disk.

Posted by henk1955 on Nov. 05 2004,15:47
Well done!
good explanation.
clear scripting.
*****

Posted by roberts on Nov. 05 2004,17:40
Nice work, clacker.  If you would email me your floppy image. And if these are additions, then I will post an updated boot floppy so others with zip drives can benefit.
Posted by roberts on Nov. 06 2004,22:38
I have updated the boot floppy, boot-0.8.0.img, with clacker's mods for booting from a zip drive.
< http://ibiblio.org/pub....8.0.img >

I have also updated the site faq with his howto:
< http://www.damnsmalllinux.org/faq.html >

Posted by gimlith on Nov. 08 2004,23:20
i know it can be really stupid but i can't boot from zipdrive (ide zipdrive).
it's impossible for dsl to found the root ...
i have got a zip with fat filesystem and i boot the system with loadlin.
my system start directly from the zipdrive (with floppy emulation).
this is a Dell optiplex GX1 pIII @ 450Mhz & 192 Mo of ram
each time i start i have got this message :
...
hdd: IOMEGA ZIP 100 ATAPI Floppy, ATAPI FLOPPY drive
...
Can't find KNOPPIX filesystem, sorry.
Dropping you to a (very limited) shell.
Press reset button to quit.

then zipdrive appear to be found bythe system

Someone can help me ?

Posted by cbagger01 on Nov. 08 2004,23:44
Is the zip drive storage partition called "hdd"  or  "hdd1" inside your mount.app window, or in the /mnt directory?
Posted by clacker on Nov. 08 2004,23:56
When I made the boot disk it was for a 100 Meg parallel port drive.

on your ide zip drive did you have a knoppix directory with a knoppix file in it?  How did you make the zip disk?  what files were on it?

Posted by gimlith on Nov. 09 2004,19:03
So i had all files from cd and more because i have tried with the files of the usb-boot-image.
in the first step i have got a zip floppy freshly formated as fat with win98 and the microsoft boot system (sorry but i'm a newbie and i don't know how can i format a zip floppy with dsl and the capabilitie to booting on)
after that i have installed loadlin and was able to boot dsl from a command line (a batch file in reality) but the system was unable to found the KNOPPIX file ($zipdrive/KNOPPIX/KNOPPIX)
So if someone got a solution from fat zip or from ext2 zip ...

Posted by clacker on Nov. 09 2004,20:46
gimlith, did you check the md5sum of the KNOPPIX/KNOPPIX file on the zip drive vs the md5sum of the file you copied?  I had a lot of problems with that.  If those md5sums don't match, it won't work.  I think sometimes all of the data isn't put on the zip drive correctly.

I've read < here > that you need version 1.6C of loadlin to boot the 2.4.x linux kernels (dsl 0.8.3 uses 2.4.2).  What version of loadlin are you using?

Could you also tell us what was in you batch file?  Perhaps it's something in the settings.  If you do get it to work, I'd love to see the settings you used.  I have no more drivers for windows to use my zip drive, or I'd give it a go.  I read that loadlin only works from a real dos boot, not an XP or 2000 window.  Can you make a win98 boot floppy and try from that?

I also see from other posts on the forums(< booting dsl from DOS > and < booting with loadlin > especially) that booting with loadlin isn't always easy or straightforward.  See what you can get from those posts and search the forums for loadlin using the search button (choose all forums and from the beginning to see all of them).

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.