The Solaris group is a forum where peers share technical expertise, solve problems, and discuss issues related to the Solaris operating system, including OS-related malfunctions, security issues, and network performance.

/usr/sbin/fsck not found

I have a Solaris hard disk in a good working condition. I tried to move the hard disk to other Solaris server and it did not boot up. Getting error /usr/sbin/fsck not found. Please help me to resolve it.

Richard: couple questions, just for clarity.
Was this disk a boot disk in the old system, or was it just a disk on that system?
Does this new system already have a boot disk, or is this the disk that will be the boot disk?

I am assuming that yes it was the boot disk in the old/other system and that system was running fine. You then moved it to this new system and now it won't boot... correct?

I am also assuming that it is telling you to fsck the partition, and it cannot find the fsck executable.

There are other things that probably should be checked first.
Is this the boot device set in the eprom?
What slices and partitions does this disk contain, and
is there a valid operating system copy on this disk? Is it compatible with the system you put it in? .... to name a few.

To answer your short question:
at the OK prompt you issue a 'boot -s' to boot into single user mode.
It will come up to that run mode and ask for password (most likely) this will be root's password.
(check via 'format' to see what disks are available.... you can also use format to verify the partition table to see if usr is on a separate slice or not)
From here you may have to manually mount the usr filesystem, depending on the disk structure/configuration. If it is set up as a standard solaris boot disk, usr is normally on slice 6. You would have to mount that slice to a mount point:
mount /dev/dsk/cXtYdZsN /<mountpoint> << change this to the address of your disk and add a mountpoint name
or possibly mount /dev/dsk/c1t0d0s6 /mnt for instance.

fsck should be in two places, one is /usr/sbin the other is /etc
The error will tell you what needs to have the filesystem check run on it, normally
we run the check on the raw device: fsck /dev/rdsk/c?t?d?s?
Caution when answering any questions to issues it finds. If there are a lot of things the filesystem may not be salvageable... all you can do really is try it and run through answering yes to everything.

Thanks for your response. This hard disk was a boot disk in the old system I tried to boot it up to the other system and now it wont boot. I have another error message:
mount: /dev/dsk/c0t3d0s6 no such device /sbin/swapadd: expr: not found /usr/sbin/swap: not found. I tried to boot it using boot -s command and going to the root password however I just return to the ok promp. How can I get out of the ok prompt and How can I know if this boot device was set in eprom? Hope for your help.

Well sounds to me as if the system has no idea what disk you actually have and where it is trying to go to boot.

Richard: at OK prompt type in the following:
printenv <return>

in the listing here will be an entry for boot or bootdisk....
check the device alias name, it may simply say 'disk'

Next at ok prompt type in
devalias <return>

here it will list 'disk' or whatever the boot is pointed to as a device.... check the information it shows.

This may get involved here because it sounds like the system you put this disk in is set to boot from an address '3' disk, and yours may not be at that address. If this is a scsi disk, check the device address jumper, and make it match this system's OR we would need to change the boot device this system points to...
(at the prom level)

Richard:
There is a 'help' command at the ok (open Boot Prom) prompt, just fyi

Take a look at what it is trying to boot, and maybe try to address your device to match?

some commands that will help you,
probe-scsi or probe-scsi-all
you can also probe-<device>
(note there is no copy/paste function in the OBP) you would have to write it down somewhere and type it in that way. The device strings can get fairly long too so be careful.

The probe-scsi will show you all the devices it sees
the probe-<device> will probe a particular device.

The device alias for the boot device can also be reset via a "devalias" command...

And the 'boot cdrom" will not work unless you have an Operating System cd in the drive to boot from, an install cd that is. ;)

I can see that the boot device is pointing to disk0. I have a disk here which can be boot and I can see that is booting from address '0' so what I did is to change the jumper settings to hit the target '0' address but still pointing to the target '3' address. How can I change bot device? Please help

Good point Soro. The system architecture should be similar to use the boot disk. If they are too diverse it won't work.

Richard, run a banner command at the OK prompt, please on both of the systems: the one you tool this disk from and this new system, make sure they match.... if they don't there is not much point in continuing. (Sorry I assumed they were the same type of systems.)

To modify the boot-device in the OBP, you need to change that via a setenv command: setenv boot-device <deviceN>

in your case make sure the OBP probe (probe-scsi or probe-ide) command can see the disk

make sure the device path is set to an alias (devalias command) so that 'disk0' points to the correct device.

then run the setenv boot-device command
verify it with a printenv command

then issue 'reset' to write the new values to the prom

Two things to point out for you. First, you can get a System Administration Guide copy online - please do so
Second, in the OBP there is a help available, just type in help <return> and then you can run 'help <whatever section you choose from the listing of the help command>' It will show you the syntax and step you through processes like this.