--- In Triffid Hunter <> wrote:
>
>
>
> On Thu, 12 Jul 2007, dba2020com wrote:
>
> > I am working with a ts7250-nand2k-128 with a 4GB SanDisk
> > Model:SDDR-113. I have scoured the board looking for information on
> > the BusyBox switch_root command.
> >
> > Will someone please give a nube version of how it works and how it
> > should be implemented?
> >
> > I would also like to "cp" it into my working directories. How would
> > one go about doing this?
> >
> >
> > Thanks
> > Daniel W Conduff
> > hcicontrols.com
>
> switch_root /mount/point/of/new/root /path/of/program (same as chroot)
>
> an example from my lvm2 initramfs for my host machine:
>
> /usr/src/initramfs/image $ cat init
> #!/bin/sh
>
> echo Custom LVM2 Initramfs by Triffid_Hunter
> echo for Lucienne
>
> echo -n Mounting proc...
> mount -t proc proc /proc && echo OK
>
> echo -n Activating LVM2...
> vgchange -ay lucienne_hd && echo OK
>
> echo -n Making device nodes...
> vgmknodes && echo OK
>
> echo -n Mounting rootfs...
> mount -t ext3 -o ro /dev/lucienne_hd/root /newroot && echo OK
>
> echo -n Unmounting proc...
> umount /proc && echo OK
>
> echo Hold on, switching root...
> exec switch_root /newroot /sbin/init
>
> echo hrm, have a shell instead
> exec /bin/ash
> --end--
>
> cp -a is your friend ;)
>
Thanks, I sort through this.
Daniel
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|