Booting Problems

Embed Size (px)

DESCRIPTION

sun

Citation preview

SymptomsThis 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.

ResolutionSince 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 ChecksEnsure 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. Diagnosis: Corrupt or missing bootblockIf you see only the following error:the file just loaded does not seem to be executable The above error indicates that it is very likely that your bootblock is corrupted or missing.In order to correct this, follow the below procedure:Restoring the bootblockFor Solaris[TM] 8 and 9, use the "Software 1 of 2" CD to boot.For Solaris[TM] 10 use the DVD or the "Software 1 of 2" CD to boot.Boot the system from cdrom in single user mode:ok> boot cdrom -s # cd / If you are not sure what your boot-device is, run format to list the disks in the system.# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 /pci@1f,700000/scsi@2/sd@0,01. c1t1d0 /pci@1f,700000/scsi@2/sd@1,0 Specify disk (enter its number):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 ufsMount 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 12228lrwxrwxrwx 1 root root 9 Oct 19 2004 bin -> ./usr/bindrwxr-xr-x 3 root nobody 512 Mar 23 14:35 cdromdrwxr-xr-x 14 root sys 4096 Mar 23 15:05 devdrwxr-xr-x 6 root sys 512 Nov 2 19:30 devicesdrwxr-xr-x 59 root sys 4096 Apr 21 20:02 etcdrwxr-xr-x 2 root sys 512 Oct 19 2004 exportdr-xr-xr-x 1 root root 1 Apr 6 17:38 homedrwxr-xr-x 10 root sys 512 Oct 19 2004 kernellrwxrwxrwx 1 root root 9 Oct 19 2004 lib -> ./usr/libdrwx------ 2 root root 8192 Oct 19 2004 lost+founddrwxr-xr-x 2 root sys 512 Oct 19 2004 mnt......[output truncated]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 1 no -If it looks like the following then your disk is not mirrored:/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -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 1 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 Diagnosis: Corrupt or missing ufsbootIf the error message looks like this:Boot load failed. The file just loaded does not appear to be executable. Alternatively, if you have just restored the bootblock but are still not able to boot, it is likely that the file ufsboot is corrupt or missing.Restoring ufsbootTo 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 read-write 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.