Init.c, making it chroot
- From: Erik Udo <erik.udo@xxxxxxxxx>
- Date: Wed, 27 Dec 2006 21:27:24 +0200
How can i make init chroot after executing /etc/rc, and executing /etc/rc again in the chrooted enviroment?
For this to work, i'd like to know at what point do i call chroot(), becouse init.c uses fork() at the point where it runs the rc script.
The thing is, i want to run a whole system in a chrooted enviroment in this livecd i'm making. But the command "chroot /mnt/root /etc/rc" returns after the /etc/rc has been run, dropping me back from the chrooted enviroment. And if it doesn't, init never starts the multiuser mode.
So how can i go to the multiuser mode in a chrooted enviroment? I guess the only way to do that is to modify init.c
Any help/feedback is appreciated.
Cheers, Erik
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: Init.c, making it chroot
- From: Oliver Fromme
- Re: Init.c, making it chroot
- From: Ruslan Ermilov
- Re: Init.c, making it chroot
- Prev by Date: Re: 6.1-RELEASE / 6.2 Kernel Crash...
- Next by Date: Re: 6.1-RELEASE / 6.2 Kernel Crash...
- Previous by thread: 6.1-RELEASE / 6.2 Kernel Crash...
- Next by thread: Re: Init.c, making it chroot
- Index(es):