Hello,

> And where is the source code?

Sorry, the source code can be downloaded here: 
http://isoredirect.centos.org/centos/4/os/SRPMS/mkinitrd-4.2.1.8-1.src.rpm

I attached only nash.tgz that make a part from mkinitrd.

> > My initrd is like this:
> > mount -n -t aufs -o
> > br=/etfw/.etfw_changes=rw:/cdrom/confs=ro:/cdrom/tmpdir/14=ro:/cdrom/tmpd
> >ir/13=ro:/cdrom/tmpdir/12=ro:/cdrom/tmpdir/11=ro:/cdrom/tmpdir/10=ro:/cdro
> >m/tmpdir/9=ro:/cdrom/tmpdir/8=ro:/cdrom/tmpdir/7=ro:/cdrom/tmpdir/6=ro:/cd
> >rom/tmpdir/5=ro:/cdrom/tmpdir/4=ro:/cdrom/tmpdir/3=ro:/cdrom/tmpdir/2=ro:/
> >cdrom/tmpdir/1=ro:/etfw=ro none /filesystem
>
> At this point, your /etfw, and of cource /etfw/.etfw_changes, are
> in the single mounted tmpfs, aren't they?
> ie. you just executed 'mount -t tmpfs /etfw', didn't you?

No, I execute:

mount -t tmpfs none /etfw/.etfw_changes 
/etfw still readonly.

> > mount --move /etfw/.etfw_changes /filesystem/.etfw_changes
>
> At this point, your /etfw is still /etfw.

/etfw is only a branch, /filesystem is my aufs with all branches 
(included /etfw, etc).

> > /bin/chroot "/filesystem" /bin/bash -c 'echo radius:x:81:425:system user
> > for freeradius:/var/log/radius/radacct:/bin/false' >> /etc/passwd
>
> Is this redirection what you want?

This is only to make some changes before real system comes up.

> I am afraid /etc/passwd is on initrd (or initramfs), not
> /filesystem/etc/passwd.

/filesystem/etc/passwd is the real /etc/passwd from real system.

> > exec nash /sbin/switch_root > /dev/null
>
> The nash manual you told me describes you need newrootpath as its
> parameter.

Yes, I told you that /sbin/switch_root  is:

switchroot /filesystem

Regards,
Fernando Gomes

Attachment: nash.tgz
Description: application/tgz

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Reply via email to