Re: FC4 CF-based Router

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

 



On Mon, 2005-12-19 at 07:31 -0800, Steven Ringwald wrote:
> Bob Chiodini wrote:

> Sorry for the confusion. I have been trying with two different drives. 
> One is a USB key-fob thing, which comes up as a SCSI drive (sda), and 
> the other is a CF card plugged into an IDE convertor (this comes up as 
> hda). When I couldn't get the USB fob to work, I tried the CF card, 
> since the IDE modules should already be in the kernel, and therefore 
> should be slightly simpler.
> 
> >Using the linuxrc script above, what happens if you cd /sysroot, then
> >run pivot_root . initrd?  /sysroot/initrd must exist.
> >  
> >
> 
> Yes. It does. What happens is that it returns EINVAL, because it is a 
> CPIO-style image, not a ramfs.

Have you tried building it into a compressed ramfs?  Does the 2.6 kernel
support ramfs?  Might be an option.  

> 
> >When linuxrc exits the kernel should run init.  Is busybox compiled for
> >x86_64 and statically linked?
> >  
> >
> Yes. I went so far as to go to the source and get the svn copy/build it. 
> Ldd reports "not a dynamic executable" and file says ELF 64-bit LSB 
> executable.
>  That seemed to work a little better, though pivot_root/switch_root 
> threw up on my shoes. I was able to get it to chroot into the target 
> filesystem, though I cannot seem to run init.

Okay that explains the switchroot.  

If you use nash what error does switchroot produce?

I also noticed that switch_root, from busybox has an open bug:

http://bugs.busybox.net/view.php?id=543

Further searching led to this:

http://lkml.org/lkml/2005/11/15/384

Which might be relevant.  From the email in this thread it sounds like
chroot .  is what you need.  What happens if you do something like this:

--- at the end of linuxrc

echo 0x0100 > /proc/sys/kernel/real-root-dev

echo Starting system
cd $SYSROOT
chroot .
cd /

Letting linuxrc just exit.

Bob...


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

  Powered by Linux