[lug] rdev

D. Stimits stimits at idcomm.com
Sun Jul 15 02:14:34 MDT 2001


"D. Stimits" wrote:
> 
> I'm playing around (still) with CD standalone creation, and now I think
> I need to run rdev. Basically I have my original kernel which was
> mounted on a scsi root device, and need to point it instead at /dev/ram0
> as the root. I'm a bit nervous about doing this, and wondering if anyone
> can tell me a sample of rdev to run if the kernel is /mnt/tmp/vmlinuz,
> and I want it to point to /dev/ram0 as the root partition? Apparently it
> isn't enough to change fstab, since the kernel must know where to read
> fstab from in the first place. I don't want to accidently change the
> wrong thing.
> 
> D. Stimits, stimits at idcomm.com

To answer my own question, I ended up using hexedit (though rdev could
do it) on my vmlinuz, altering bytes at 508 and 509; byte 508 needed the
minor device number, byte 509 needed the major device number.

But after this worked, and the kernel unpacked, and it appears the ram0
device worked also, it failed to find init:
Kernel panic: No init found. Try passing init= option to kernel.


Based on a combination of "yard" custom floppy setup, and "isolinux"
(which is in turn a minor variation on syslinux), I created what would
be a proper root filesystem, including the init program and
/etc/inittab, but it did not find it. I suspect I have separated my CD
contents from the ram0 (which is probably empty), so it naturally could
not find init. I do not want to name the cdrom directly, such as naming
init on it, because on one machine it is /dev/hdc, on another /dev/sdc0,
and on yet another /dev/hdb. I couldn't figure out how Redhat did it
either. There is no "init" or inittab anywhere on the RH bootable CD.
And if I mount the boot.img on loopback (from RH 7.1 disk 1), the
contents also fail to have init anywhere, or inittab. So something
interesting (frustrating?) is going on. Can anyone give me any
suggestions on init for a custom boot CD? Either "init=" arguments to
the kernel, or insight into the way init is started under RH 7.1 CD 1
while in rescue mode? Maybe there is a pre-step where the CD has init
related items copied to /dev/ram0? It is so very close to working, but I
need a better understanding of init.

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list