Booting From "Rescue" Floppy

Booting From "Rescue" Floppy

Post by Russell Bostoc » Sun, 17 Sep 1995 04:00:00



Some time ago, I posted an article asking for help with getting an emergency
boot/root floppy working. I could boot the kernel from the boot disk, but it
would not prompt me to enter a root filesystem disk and would try to mount
the root fs from the floppy containing the kernel itself (this was after setting
the root device to /dev/fd0 using the "rdev" command).

Well, I figured that one out - I am using the Linux Universe distribution
(kernel 1.2.0) and the source for the function mount_root in /usr/src/linux/fs/init.c
had the code for the prompting for the diskette change conditionally compiled
(in my case, it was NOT being included). Not sure why that is, because in
later kernel sources, this code is NOT conditionally included. Is this
something peculiar to the Linux Universe distribution?

Anyway, my current problem is that I can get the kernel to boot, I can
successfully mount the root fs from the root floppy, but then I run into
problems. The program main.c in /usr/src/linux/init tries, at the very end,
to run /bin/init, or /bin/sh, or some other stuff using execve. ALL of these
calls fail, even though I have all the programs on my root floppy, so I can't
see why they shouldn't be found. In fact, I changed main.c so that it would
try to execve the world's simplest program (ie. "hello world"), but even
that wouldn't work :-) ! (execve returns with -1 in all cases).

Since the Linux Universe distribution is an ELF distribution, I thought perhaps
I didn't have the right shared libraries on my root floppy, but I've tried
including all kinds of libraries I can think of and I still can't get it to
work (I'm not that familiar with ELF or kernel hacking for that matter, so
I don't feel too confident that I know what I'm doing here!)

Are there any kernel experts out there who can tell fill in the gaps in
my understanding and fill me in with what's missing?

Cheers!

Russell