[lug] rdev

D. Stimits stimits at idcomm.com
Sun Jul 15 15:39:57 MDT 2001


Chris Riddoch wrote:
> 
> "D. Stimits" <stimits at idcomm.com> writes:
> 
> > "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.
> 
> An easier way... have a look at the kernel's Makefile.  There's a few lines:
> 
> # ROOT_DEV specifies the default root-device when making the image.
> # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
> # the default of FLOPPY is used by 'build'.
> # This is i386 specific.
> #
> 
> export ROOT_DEV = CURRENT

This is certainly easier in many ways. But my need now is to be able to
determine what device the cdrom is, dynamically, at boot time, not to
hard code it. I would have to have one rescue system marked for my scsi
cd; another system for where the cd is /dev/hda, and yet one more rescue
cd for the machine that has /dev/hdc as the cdrom. The cd floats around.
Yet my RH install disk will boot on any of these machines in rescue
mode, and does not have a problem. This means it is probably setting
/dev/ram0 as the root partition, or something similar. I can now do that
too, but I have no way of getting the cd contents to /dev/ram0, so all
the items on the cd are useless (init needs to be on /dev/ram0 to do
this). Instead of making my root device /dev/ram0, I'd like to find a
way to make it /dev/{dynamically-detect-cdrom}.

> 
> Besides that, I've never tried to do this sort of thing. But you might
> want to check out www.linuxfromscratch.org or Linuxcare's bootable
> business card - http://open-projects.linuxcare.com/BBC/, to get some
> ideas on how it's done.

I'll take a look at this, it at least sounds promising. I kind of need a
linux-from-scratch rescue system. And with the kernels all beyond 2.3
MB, it must be a cd in non-emulation mode.

> 
> The bootable business card was *very* popular at the first CLIQ. Since
> then, I've managed to use it in a CD drive which claimed to be able to
> handle the small disks... instead it threw the tiny CD around its
> insides, scratching it irreparably, but thankfully not damaging the
> drive.

I have seen these, but never used it. I always fear my cd drive will get
messed up with these smaller, non-round disks.

> 
> It looks like we could get some for the BLUG, if there's
> interest. They're really quite cool.

That would be interesting.

D. Stimits, stimits at idcomm.com

> 
> --
> Chris Riddoch         |  epistemological  | Send spam to: uce at ftc.gov
> socket at peakpeak.com   |  humility         |
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list