[OpenIndiana-discuss] Recreate /dev/null

Martin Bochnig martin at martux.org
Thu Apr 25 12:23:14 UTC 2013


On Thu, Apr 25, 2013 at 2:03 PM, Richard Jones <
openindiana-discuss at jonze.com> wrote:

> On Thu, Apr 25, 2013 at 01:30:35PM +0200, Jim Klimov wrote:
> > How about removing both /devices/pseudo/mm at null* and /dev/null and
> > then trying devfsadm?
>
> # rm /dev/null
> rm: cannot remove `/dev/null': No such file or directory
> # rm /devices/pseudo/mm at 0:null
> rm: cannot remove `/devices/pseudo/mm at 0:null': Operation not applicable
> # devfsadm
> devfsadm: cannot create link: /dev/null -> ../devices/pseudo/mm at 0:null.
> max attempts exceeded
>
> > Maybe also try to rsync (or tar/cpio/...) the device nodes from some
> > other device tree, such as live media or an alternate BE, or via LAN
> > with manually enabled networking?
>
> I tried a few things, they didn't work either with no such file or
> directory errors :(
>
>

Which exactly? Seemingly unimportant details can be essential here.
I have been in similar situations (during OpenSXCE debugging), I know how
ugly and hopeless it feels in such a scenario.

Fact is, that if running scripts directly from /lib/svc/method does not
even help (if you tried), then Jim's approach is the best (and maybe
actually the only one), that can still rescue you. And if not, then you are
required to boot from LiveCD (or other alternate media), import the root
pool, temporarilyset the mountpoint for "/" to some other value, zfs mount
the root dataset, tar the missing bits over, also sync the boot_archive,
set the mountpoint back to "/", export the root pool and reboot.



%martin


More information about the OpenIndiana-discuss mailing list