Re: FC4 CF-based Router

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-12-19 at 09:56 -0800, Steven Ringwald wrote:

> >
> >echo 0x0100 > /proc/sys/kernel/real-root-dev
> >
> >echo Starting system
> >cd $SYSROOT
> >chroot .
> >cd /
> >
> >Letting linuxrc just exit.
> >
> 
> 
>  From what I saw, I need to use 1792 rather than 0x100, since my sysroot 
> is not in ram0, but in loop0.... I can do the chroot, but I can't seem 
> to chroot and start init. I am thinking that for some reason, the script 
> is not running as process 0, and I cannot for the life of me figure out 
> what is, so that I can start the next step in booting.
> 
> Thanks for your continuing help, though!
> Steve
> 
> 

Steve,

A thought about process ID's.  What is the PID of bash?

I had similar thoughts concerning the real-root-dev trying to setup a
bootable partition on a Disk-On-Chip a while back.  After building a
kernel specific for the hardware, it seems that I had to run rdev to set
up the correct root device so that I did not need a ramdisk.  It also
seems that real-root-dev needs to be the device prior to pivot_root if
you are using a ramdisk.  Honestly, I don't know why I think that.
Hopefully someone will enlighten em.

After thinking for a while and not trying to repeat my past mistakes,
why not build the CF as Fedora or other distro's build a "real" disk?

Build your root partition into an ext2 formated partition on your CF
(say /dev/hda2), set up Grub in hda1 (/boot) and the MBR in /dev/hda,
make a vfat partition in hda3 for your other OS's.  I think at this
point you can either set the root device of your embedded kernel with
rdev, or pass in the device with root=/dev/hda2 (e.g.).  All of the
required device files would have to exist on your CF based root.  You
would also need a busybox compatible /etc/inittab that runs the
appropriate startup scripts.  Those scripts can then set up any
additional devices, do your mounting and start whatever services you
need.

Then in theory your linuxrc can just be a link to busybox.  This should
work whether your device is a CF or a USB stick.  Use sda instead of
hda.

Keep in mind that you should/must run rdev against a COPY of the kernel,
not the one running on your desktop.

You could alternately use syslinux as the boot loader instead of grub.
hda1 would need to to be DOS-like (I used FAT12) in this case.

Bob...




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux