On Thu, Jan 22, 2009 at 11:54:59AM -0500, Matt Watson wrote:
> For distros that do require a root password when booting single user mode,
> your only real options have already been mentioned here...
>
> 1) boot from a CD, mount your partitions then:
Your other option is:
Add the boot option 'init=/bin/bash' (or /bin/sh, hwatever) .
Then the kernel and initrd load and you have a system with only a single
process. BEWARE: THINGS ARE SLIGHTLY DIFFERENT. e.g. your terminal is
not properly set, and a non-careful ping will hang you for good.
# In some cases ytou'll need:
#mount /proc
# first make the system writable:
mount -o remount,rw /
passwd root
# set it
now fix other stuff that needs fixing.
If you need to do lots of stuff, use open or openvt to create a second
terminal on a different console.
At this point DO NOT REBOOT. A plain 'reboot' will do nothing, as
your shell is the init process. A poweroff will cause your changes to
get unwritten, as they were not yet synced to the disk.
# not really needed, but also syncs to the disk, and leave things
# exactly as you find them
mount -o remount,ro /
#umount /proc
To save time and effort: don't reboot. Just continue standard init
process:
exec /sbin/init
This works because your shell is process no. 1. And /sbin/init behaves
as a special process if and only if it is process no. 1.
--
Tzafrir Cohen
icq#16849755 jabber:[email protected]
+972-50-7952406 mailto:[email protected]
http://www.xorcom.com iax:[email protected]/tzafrir
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users