Ok. Reading the pivot_root man page (<a href="http://linux.die.net/man/8/pivot_root">http://linux.die.net/man/8/pivot_root</a>)<br><br>to change the root fs <br><br>mount /dev/hda1 /new-root<br>cd /new-root<br>pivot_root . old-root<br>
exec chroot . sh <dev/console >dev/console 2>&1<br><br>So I changed<br>
exec chroot . sh -c 'exec /sbin/init' <dev/console >dev/console 2>&1<br>to<br>exec chroot . sh <dev/console >dev/console 2>&1<br><br>I do not see any complains, but the /proc dir is empty now.<br>
<br>If I try to change run level though I get<br><br>telinit 5<br>telinit: Unable to send message: Connection refused<br><br>Thank you,<br> Luca<br><br>On Thu, Dec 17, 2009 at 9:06 AM, Konstantin Svist<span dir="ltr"><<a href="mailto:fry.kun@gmail.com">fry.kun@gmail.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On 12/17/2009 08:41 AM, Luca wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
#!/bin/bash<br>
cd /tmp<br>
mkdir newrootfs<br>
mount rootfs.img newrootfs<br>
cd newrootfs<br>
mkdir oldrootfs<br>
pivot_root . oldrootfs<br>
exec chroot . sh -c 'exec /sbin/init' <dev/console >dev/console 2>&1<br>
<br>
I can see the new root is rootfs, but still there is something not working. When I run the script I get the message<br>
<br>
init: illegal runlevel (null)<br>
<br>
</blockquote>
<br></div>
It looks like you think /sbin/init does something other than what it really does.<br>
<a href="http://www.fedorafaq.org/basics/#runlevel" target="_blank">http://www.fedorafaq.org/basics/#runlevel</a><br><font color="#888888">
<br>
-- <br>
fedora-list mailing list<br>
<a href="mailto:fedora-list@redhat.com" target="_blank">fedora-list@redhat.com</a><br>
To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-list</a><br>
Guidelines: <a href="http://fedoraproject.org/wiki/Communicate/MailingListGuidelines" target="_blank">http://fedoraproject.org/wiki/Communicate/MailingListGuidelines</a><br>
</font></blockquote></div><br>