[lug] rdev

Chris Riddoch socket at peakpeak.com
Sun Jul 15 13:34:14 MDT 2001


"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

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.

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.

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

--
Chris Riddoch         |  epistemological  | Send spam to: uce at ftc.gov
socket at peakpeak.com   |  humility         | 



More information about the LUG mailing list