Boot + root or boot/root floppies: how??

Boot + root or boot/root floppies: how??

Post by No one specia » Sat, 30 Mar 1996 04:00:00



My root ext2 partition has had a long run, and it finally needs a defrag, so I
want to make boot/root floppies that are capable of running defrag.  (Defrag
fyi doesn't run on a mounted fs).

The Bootdisk.HOWTO is hopelessly outdated (it proudly proclaims support for
kernel 1.2.0!) and was pretty much unhelpful.  I want to hopefully get about 2
megs of stuff on 1 disk, and this seems feasible with compression and the use
of a ramdisk.  I've tried to use yard, Bootkit, CatRescue, etc. to no avail,
although yard seems to be the closest to being able to give me what I want: a
basic filesystem, with my 1.3.79 kernel on it, and e2defrag.  Yard works fine
in building the filesystem in the ramdisk and compressing it, and even succeeds
in dd'ing the compressed kernel and filesystem to disk.  Then it says:
Doing some rdev's...
and after a brief delay a slew of floppy errors beginning with
"floppy0: not current!"
splatter across my screen.  Then yard happily reports "Done." and exits.
When I boot with that floppy the kernel loads, VFS says to put in the root disk
so I just hit return since it's a boot/root disk, and the kernel panics with
something about MSDOS filesystem. (??)  My limited knowledge of boot/root disks
tells me that the problem is one of the rdevs that failed was telling the
kernel where to find the root filesystem on the floppy.  (I could be wrong...)
But I haven't had success in making those rdev's work right, I even tried going
through the perl scripts and doing them roughly by hand.

So, two things: first, does anyone recognize the above floppy error?  (If so
how do I fix it?)  And, am I right and it's the failed rdev's that are the
problem or is something else going on?

One diagnostic: my floppy drive (or possibly the floppy controller) is
sometimes problematic because it can't write to the last two tracks on a disk.
However the first 78 are reliable and I don't think this is related to the
problem because a) I have a set of Slackware boot and root disks which I made
on this floppy drive following the Slackware instructions, that work fine--I
can't use them because they don't have e2defrag or even the libraries necessary
to run e2defrag; b) the compressed filesystem+kernel takes up far less than the
first 78 tracks on the disk, maybe two-thirds of the disk tops.

I think I can do it on 2 disks (although I haven't succeeded yet) but this
compression thing is driving me crazy and I'm determined to do it that way now.

Thx in advance
Cory Dodt

 
 
 

Boot + root or boot/root floppies: how??

Post by No one specia » Sat, 30 Mar 1996 04:00:00


Quote:> and after a brief delay a slew of floppy errors beginning with
> "floppy0: not current!"

got that slightly wrong.... here's the actual dump of errors

floppy0: current not active!

floppy driver state
-------------------
now=436878 last interrupt=434649 last called handler=00170b10
timeout_message=do wakeup
last output bytes:
13 90 434584
 1 90 434584
 f 90 434584
 2 90 434584
12 90 434584
1b 90 434584
ff 90 434584
 f 80 434608
 0 90 434608
14 90 434608
 8 81 434608
c5 80 434611
 0 90 434611
14 90 434611
 0 90 434611
 1 90 434611
 2 90 434611
12 90 434611
1b 90 434611
ff 90 434611
last result at 434878
last redo_fd_request at 434879

status=80
fdc_busy=1
cont=001ae950
CURRENT=001c3ab8
command_status=-1

floppy0: floppy timeout
end_request: I/O error, dev 02:00, sector 0

 
 
 

Boot + root or boot/root floppies: how??

Post by Tom Fawce » Sun, 31 Mar 1996 04:00:00


    Nos> My root ext2 partition has had a long run, and it finally needs a
    Nos> defrag, so I want to make boot/root floppies that are capable of
    Nos> running defrag.  (Defrag fyi doesn't run on a mounted fs).

    Nos> The Bootdisk.HOWTO is hopelessly outdated (it proudly proclaims
    Nos> support for kernel 1.2.0!) and was pretty much unhelpful.  I want
    Nos> to hopefully get about 2 megs of stuff on 1 disk, and this seems
    Nos> feasible with compression and the use of a ramdisk.  I've tried to
    Nos> use yard, Bootkit, CatRescue, etc. to no avail, although yard
    Nos> seems to be the closest to being able to give me what I want: a
    Nos> basic filesystem, with my 1.3.79 kernel on it, and e2defrag.  Yard
    Nos> works fine in building the filesystem in the ramdisk and
    Nos> compressing it, and even succeeds in dd'ing the compressed kernel
    Nos> and filesystem to disk.  Then it says: Doing some rdev's...  and
    Nos> after a brief delay a slew of floppy errors beginning with
    Nos> "floppy0: not current!"  splatter across my screen.  Then yard
    Nos> happily reports "Done." and exits.  When I boot with that floppy
    Nos> the kernel loads, VFS says to put in the root disk so I just hit
    Nos> return since it's a boot/root disk, and the kernel panics with
    Nos> something about MSDOS filesystem. (??)  My limited knowledge of
    Nos> boot/root disks tells me that the problem is one of the rdevs that
    Nos> failed was telling the kernel where to find the root filesystem on
    Nos> the floppy.  (I could be wrong...)  But I haven't had success in
    Nos> making those rdev's work right, I even tried going through the
    Nos> perl scripts and doing them roughly by hand.

    Nos> So, two things: first, does anyone recognize the above floppy
    Nos> error?  (If so how do I fix it?)  And, am I right and it's the
    Nos> failed rdev's that are the problem or is something else going on?

Well, I wrote Yard but I have almost no idea what's going on here.  I've
never seen "current not active" before.  It sure looks like the failing
rdev is causing a problem but that doesn't explain much.  Between the fact
that you're using a problematic floppy drive and a new, late-model
bleeding-edge kernel, it's hard to diagnose.  The best I can do is send you
a beta copy of the next yard version and see if that fixes things.  Much
has been cleaned up, and Yard now uses LILO for most of the low-level boot
stuff, which might help.  Or not.

Regards,
-Tom

PS.  BTW, if you're looking for documentation,
/usr/src/linux/Documentation/ramdisk.txt does a pretty good job of
explaining the bootdisk creation w/ramdisk.  Yard-1.0 follows the same
basic procedure.

 
 
 

Boot + root or boot/root floppies: how??

Post by Cory Dod » Mon, 01 Apr 1996 04:00:00




> > problem because a) I have a set of Slackware boot and root disks which I made
> > on this floppy drive following the Slackware instructions, that work fine--I
> > can't use them because they don't have e2defrag or even the libraries necessary
> > to run e2defrag; b) the compressed filesystem+kernel takes up far less than the
> > Cory Dodt

>    Why not boot with the two disks you have, which leaves the floppy
>    free, to mount a disk with e2defrag and the libraries you need.

Unfortunately, already thought of that.  The kernel on the floppies doesn't
have support for ELF binaries, so making the library available would be
futile.

Besides, I want to learn how to do this right :)

 
 
 

Boot + root or boot/root floppies: how??

Post by Graham Swall » Tue, 02 Apr 1996 04:00:00



Quote:> problem because a) I have a set of Slackware boot and root disks which I made
> on this floppy drive following the Slackware instructions, that work fine--I
> can't use them because they don't have e2defrag or even the libraries necessary
> to run e2defrag; b) the compressed filesystem+kernel takes up far less than the
> Cory Dodt

        Why not boot with the two disks you have, which leaves the floppy
        free, to mount a disk with e2defrag and the libraries you need.

        Graham
        -----------------------------------
        http://www.users.dircon.co.uk/~trix <-- Linux Info Pages
        http://trix.dircon.co.uk/ (dial-up)
        -----------------------------------

 
 
 

Boot + root or boot/root floppies: how??

Post by Larry Doolitt » Wed, 03 Apr 1996 04:00:00


: >  Why not boot with the two disks you have, which leaves the floppy
: >  free, to mount a disk with e2defrag and the libraries you need.

: Unfortunately, already thought of that.  The kernel on the floppies doesn't
: have support for ELF binaries, so making the library available would be
: futile.

: Besides, I want to learn how to do this right :)

I'm still learning, too, but I have successfully made a boot/root
combo disk from scratch.  I have a crude start of a makefile to
help out - it's complicated.  Requires a 1.3.59 or later kernel,
I used an ELF (RedHat 2.1) system to grab all my executables.
I want to try this out again with kiss instead of ash, that should
get me some better functionality.  I get to put modules and configuration
files on the floppy very easily, because it is a simple ext2fs
(well, the first half is, anyway).  Thanks to Paul Gortmaker for
steering me in this direction.  I won't claim this is "done"
or even "production quality", but it might stimulate other people
in what looks like a useful direction.  


----Cut here for Makefile---

FL_MAGIC      = /dev/fd0
FL_ZFILES     = /dev/fd0   # could also be a spare hard disk partition
MOUNT_POINT   = /mnt
LINUX_ZIMAGE  = zImage-1.3.59-ramdisk
LILO_CONFIG   = ./lilo_config
P_SIZE        = 720
ZFILE_SYSTEM  = 1440image.gz
HOME         := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

basefiles.tar.gz:
        (cd /; tar -cvzf ${HOME}/basefiles.tar.gz \
         lib/ld-linux.so* lib/libc.so* lib/libm.so* lib/libtermcap* \
         bin/ash bin/ls \
         bin/mkdir bin/cat bin/vi bin/vim \
         bin/mount bin/umount \
         sbin/insmod sbin/rmmod \
         sbin/ifconfig sbin/route bin/ping \
        )

dev.tar.gz:
        (cd /; tar -cvzf ${HOME}/dev.tar.gz dev)

# stuff to work on:
#
#       hard link in /lib/ld-linux.so.*
#       how to ldconfig?
#       /etc/ld.so.cache
#       dynamically linked /sbin/e2fsck?
#       /etc/mtab?
#       /etc/passwd?
#       /etc/fstab
#       /etc/hosts
#       /etc/resolv.conf

zfiles:
        echo "Insert floppy in device ${FL_ZFILES} and press return"
        read stuff
        # we run out of inodes for device files unless we give the "-i 2048"
        mke2fs -m 0 -i 2048 ${FL_ZFILES}
        mount ${FL_ZFILES} ${MOUNT_POINT}
        (cd ${MOUNT_POINT}; \
         mkdir bin dev etc lib mnt proc sbin tmp usr var; \
         tar -xvzf ${HOME}/basefiles.tar.gz; \
         tar -xvzf ${HOME}/dev.tar.gz; \
         (cd bin; ln -s ash sh;) \
         cp ${HOME}/termcap etc/termcap; \
         cp ${HOME}/ld.so.cache etc/ld.so.cache; \
         ls -lR >${HOME}/zfiles.log; \
        )
        umount ${MOUNT_POINT}
        dd if=${FL_ZFILES} bs=1024 | gzip -c9 > ${ZFILE_SYSTEM}

magic:
        echo "Insert floppy in device ${FL_MAGIC} and press return"
        read stuff
        mke2fs -m 0 ${FL_MAGIC} ${P_SIZE}
        mount ${FL_MAGIC} ${MOUNT_POINT}
        cp ${LINUX_ZIMAGE} ${MOUNT_POINT}/zImage
        (cd ${MOUNT_POINT}; mkdir boot; cp /boot/boot.b boot/)
        /sbin/lilo -v -C ${LILO_CONFIG}
        umount ${MOUNT_POINT}
        dd if=${ZFILE_SYSTEM} seek=${P_SIZE} bs=1024 of=${FL_MAGIC}

----Cut here for Makefile---
----Cut here for lilo_config---
boot = /dev/fd0
compact
prompt
verbose = 3
timeout = 50
map = /mnt/boot/map
install = /mnt/boot/boot.b
backup = /dev/null

image = /mnt/zImage
    label = linux
    root = /dev/fd0
    append = "rw ramdisk_start=720 load_ramdisk=1 prompt_ramdisk=0"
----Cut here for lilo_config---

 
 
 

1. root disk file system and nfs server from boot/root floppies.

I have a root disk that was created with rawrite.  It is the color.gz
image.  I would like to mount the root disk and make some modifications
to the disk (adding nfs server capability).

I have tried mounting with various file system types and have had no
luck.

So, how can I mount it to make these modifications, or the bigger
question, how can I easily add nfs server capability to the basic
boot/root disk combination.

Thanks in advance.

Ron

2. Q's on SMP design?

3. How to build boot disk for boot/root floppy

4. Installing Mandrake over Red Hat

5. Boot floppy/root floppy to ramdisk, add more later?

6. Trouble recognizing PCMCIA and going past it..

7. root disk file system and nfs server from boot/root disks.

8. How do I check what services are installed and running

9. wierd problem with non-root BASH (0.96 root and boot)

10. Can't login as root on SLS 1.02 root/boot disk!

11. root disk file system type and nfs server from boot/root disks.

12. 1.2 MB Floppy for Linux Boot / Root Diskā€²s ???

13. Booting Linux from floppy w/o HD and NFS mounting root?