Re: Accidentally removed /dev/dsk/c* and /dev/dsk/r*



Dave Uhring <daveuhring@xxxxxxxxx> wrote:
On Sun, 26 Feb 2006 10:28:22 -0800, Arizona wrote:

I tried that but it didn't work.

You need to run devfsadm(1M) to rebuild /dev. After booting single user
from CDROM mount your / partition on /a. Then

You can also repair while booting from the corrupted disk as long as
/devices is intact.

(1) boot in "less then single-user" mode:
Solaris 10
boot -a -m milestone:none
Solaris 9 and earlier
boot -ab
The -a is just a reminder for you which root device you are using. Just
accept all the default values - but note the path for the question
"physical path for root filesystem"

(2) when you get to the shell prompt (after sulogin) you have to do everything
manually. Just the root filesystem is mounted read-only by the kernel
(a) remount your root-fs read-write:
/sbin/mount -o remount,rw /devices/<root-path from above> /
(b) remount other filesystems as needed (at least /usr and /var (if
separated from /)). Normally /usr and /var reside on the same disk
as the root filesystem. So you just have to change the slice from
the root path noted in step 1:
:a = s0, :b = s1, :c = s2, :d = s3, ...
Example:
. physical path for root filesystem:
/pci@0,0/pci-ide@7/ide@0/cmdk@0,0:a
. /var on slice 3
. /usr on slice 7
/sbin/mount /devices/pci@0,0/pci-ide@7/ide@0/cmdk@0,0:d /var
/sbin/mount /devices/pci@0,0/pci-ide@7/ide@0/cmdk@0,0:h /usr

(3) rebuild your /dev tree:
Solaris 8ff
devfsadm
all Solaris versions
drvconfig
devlinks
disks <-- should be sufficent in your case

(4) reboot again
/sbin/uadmin 2 1
Normally you should reboot with "init 6" but in above scenario I prefer
booting the quick way - no start scripts have been run, so no stop
scripts should also run.


--
Daniel
.



Relevant Pages

  • Re: Linux on more than one PC104 wont boot
    ... PC104 board that maps the compact flash to a different ide interface. ... Otherwise you could try to boot from both devices - if booting from ... get a /dev/root device as my root filesystem. ...
    (comp.os.linux.embedded)
  • Re: failure to boot
    ... > INIT: version 2.85 booting ... was to remount the root filesystem as read-write. ... able to edit files through a text terminal. ...
    (Fedora)
  • Problems with root filesystem writes
    ... I've got a problem with a new Sun Blade 1000 machine I setup. ... Solaris 10 update 1. ... root filesystem. ... I was under that belief that UFS logging was enabled by default ...
    (SunManagers)
  • possible bug in pxeboot with TFTP support
    ... This caused the boot to stall for 30 seconds or so until the loader spit out "NFS MOUNT RPC error: 60" and then continued booting via tftp. ... What I've stumbled across doesn't break PXE booting with a TFTP root filesystem, it just makes it much slower. ...
    (freebsd-stable)
  • Re: trouble installing 5.3 on soekris net4801
    ... Booting into safe mode works fine. ... > load the root filesystem. ... To unsubscribe, ...
    (freebsd-stable)