Académique Documents
Professionnel Documents
Culture Documents
This document can help you troubleshoot boot processes that fail with:
The file just loaded does not appear to be executable
Bootblk: can't find the boot program.
The boot block might also need replacing when you have restored the root filesystem
from backup or disk to disk copy.
Resolution
Since failing to boot can have quite a few reasons, it is necessary to do a few sanity
checks:
Take me to the command syntax.
Are you booting from disk, cdrom, net or tape?
Check the following:
First Checks
Ensure the cdrom or tape is bootable and in the drive.
Is the intended boot device accessible? Issue a probe-scsi-all or watch-net-all from
the "ok prompt" (the command depends on your boot-device) to verify your
intended boot-device is ok.
Ensure the correct hardware architecture is supported for your bootfile:
check the minimum OS requirement for your platform in the Sun System
Handbook page for your system.
This is the minimum requirement for the Solaris[TM] cd you are using to
boot.
If you are trying to boot via the network, ensure the boot server provides
this image.
Ensure that you are booting with the correct device alias. If your system used to boot
fine from the media you are trying to boot from, it is possible that either your
bootblock or ufsboot is corrupted/missing.
In order to check this, take a close look at the error message you see when trying to boot.
Hit control-D to exit. Based on the above output, we'll assume c1t0d0 is our boot-device.
Perform a sanity check on slice 0 and verfiy the ufs type:
# fstyp /dev/rdsk/c1t0d0s0
ufs
Mount the filesystem read-only:
# mount -o ro /dev/dsk/c1t0d0s0 /a
Verify it is indeed the boot disk by looking at the contents of /a
# ls -l /a
total 12228
lrwxrwxrwx
1 root
drwxr-xr-x
3 root
drwxr-xr-x 14 root
drwxr-xr-x
6 root
drwxr-xr-x 59 root
drwxr-xr-x
2 root
dr-xr-xr-x
1 root
drwxr-xr-x 10 root
lrwxrwxrwx
1 root
drwx-----2 root
drwxr-xr-x
2 root
...
...
[output truncated]
root
nobody
sys
sys
sys
sys
root
sys
root
root
sys
9
512
4096
512
4096
512
1
512
9
8192
512
Oct
Mar
Mar
Nov
Apr
Oct
Apr
Oct
Oct
Oct
Oct
19
23
23
2
21
19
6
19
19
19
19
2004
14:35
15:05
19:30
20:02
2004
17:38
2004
2004
2004
2004
If your output looks like this, you can assume it is your boot-device.
Next: Inspect your vfstab
# cat /a/etc/vfstab
Look for the line that has a single '/' in the third column.
If it looks like the following then your boot disk is mirrored with DiskSuite or Solaris
Logical Volume Manager, and you should keep the filesystem mounted read-only for
now:
/dev/md/dsk/d0
-
/dev/md/rdsk/d0
ufs
no
/dev/rdsk/c1t0d0s0
ufs
Then you can go ahead and unmount the filesystem again, and run fsck to ensure the
filesystem is in a clean state:
# cd /
# umount /a
# fsck -F ufs -y /dev/rdsk/c1t0d0s0
Now it's safe to mount the filesystem in read-write mode:
# mount -o rw /dev/dsk/c1t0d0s0 /a
If it looks like the following then your boot disk is mirrored with DiskSuite or Solaris
Logical Volume Manager, and you should keep the filesystem mounted read-only for
now:
/dev/md/dsk/d0
-
/dev/md/rdsk/d0
ufs
no
Ideally, you should match the version of the bootblock that you are going to copy with
the Solaris[TM] Version that is installed.
To verify this, Solaris[TM] provides the /etc/release file:
# cat /a/etc/release
This will tell you which version is installed and also the release. For instance "Solaris 9
9/04". This should match the version of the cd you are using.
Now copy the bootblock back to the disk:
# /usr/sbin/installboot /a/usr/platform/`uname -i`/lib/fs/ufs/bootblk
/dev/rdsk/c1t0d0s0
If you found that your boot device is mirrored, you should locate the mirrored disk and
restore that bootblock as well. The above steps will help you identify it.
Once this is done, reboot:
# reboot
Restoring ufsboot
To resolve this, boot from cdrom and mount the boot-disk on /a as described above.
It makes sense to check that /a/platform still exists and is similar to the contents of
/platform.
If your boot-device is mirrored it's recommended that you break the mirror before
altering the boot-filesystem while booted from cdrom or jumpstart-server.
The easiest way of doing this is to physically disconnect the mirror-disk from the disk
backplane by using the latch on the bracket and just undo the latch and pull the disk out
slightly, then follow the above procedure for non-mirrored disks regarding fsck and readwrite mounting.
In order to address the corrupt ufsboot file, copy it from cdrom to disk:
# cp /platform/`uname -m`/ufsboot /a/platform/`uname -m`/
When the system is booted up normally from the boot-disk and the mirror-disk was
pulled out, you can now re-insert the mirror-disk, and perform standard recovery
procedures for the broken mirrors using metadb and metareplace commands to restore
boot-device redundancy.