Anda di halaman 1dari 6

123HELPDESK

Solaris boot archive corrupt

fixing a solaris boot archive Solaris 10 x86 Server can't Boot!

Error messages at startup: On booting you get an error message of the form:

panic: cannot mount boot archive Press any key to reboot

or

diskread: reading beyond end of ramdisk start = 0x2000, size = 0x2000 failed to read superblock diskread: reading beyond end of ramdisk start = 0x8000, size = 0x800 failed to read superblock panic: cannot mount boot archive Press any key to reboot or

WARNING - The following files in / differ from the boot archive: cannot find: /etc/devices/mdi_ib_cache: No such file or directory The recommended action is to reboot and select "Solaris failsafe"

Error messages at reboot or shutdown:

When a Solaris 10 x86 machine is shutdown, the system checks whether the boot archive needs updating. If it does, you will see a message of the form: updating /platform/i86pc/boot_archive...this may take a minute cannot find: mountpoint in /etc/fstab or any other error

http://www.123helpdesk.nl

Powered by Joomla!

Gegenereerd op: 28 July, 2011, 22:18

123HELPDESK

Special Case: mdi_ib_cache

If on booting you get an error message of the form: WARNING - The following files in / differ from the boot archive: cannot find: /etc/devices/mdi_ib_cache: No such file or directory The recommended action is to reboot and select "Solaris failsafe" option from the boot menu. Then follow prompts to update the boot archive.

You do not need to use failsafe mode.

Fixing this issue is as simple as clearing the boot archive cache, rebuilding the boot archive and rebooting. Log in at the maintenance prompt, then run: svcadm clear system/boot-archive bootadm update-archive shutdown -i 6

Rebuilding the Boot Archive Boot into Failsafe Mode

Reset the machine and select the 'Solaris failsafe' option from the Grub menu. The system will boot from a standalone image of Solaris (kept at /boot/x86.miniroot-safe), bypassing the broken boot archive. Failsafe will try to mount your boot partition on /a The boot-archive is located in /a/platform/i86pc/boot_archive

Rename or remove existing /a/platform/i86pc/boot_archive before creating a new boot_archive.

Simple Root Partition If your root filesystem is a simple partition (not mirrored by Solaris) Solaris will offer to mount your Solaris install on /a, accept this. You may also be prompted to repair your boot archive, if so follow the instructions and reboot.

If you need or want to manually update the boot archive, run the following command, then reboot:

#bootadm update-archive -R /a

You should now have a working system.

Mirrored Root Partition

http://www.123helpdesk.nl

Powered by Joomla!

Gegenereerd op: 28 July, 2011, 22:18

123HELPDESK

If your system uses a metadevice mirror for the root partition you will receive a message about the partitions being skipped because they are meta devices, for example:

Searching for installed OS instances... /dev/dsk/c3t0d0s0 is under md control, skipping. /dev/dsk/c3t1d0s0 is under md control, skipping. No installed OS instance found.

The process to fix the boot archive in this case is longer, but provided you follow all the steps, still straightforward.

Mount Filesystem

Start by mounting the first half of the mirror onto /a. The name of the first half of the mirror is given in the 'md control' message, in this case '/dev/dsk/c3t0d0s0':

#mount /dev/dsk/c3t0d0s0 /a

Update vfstab

You must now update the /a/etc/vfstab file to use this single partition as the root filesystem. If you don't, the two halves of the mounted root filesystem will be out of sync after you reboot and you'll have serious problems. NB. You only need to change the entry for / in vfstab.

Take a backup of the vfstab: #cp /a/etc/vfstab /a/etc/vfstab_backup

Open the vfstab file in an editor and comment out the existing line for the root filesystem then add a new line for the single partition. For example you might have the following line in your vfstab:

#device #to mount

device to fsck

mount point

FS type /

fsck pass ufs 1

mount mount at boot options no -

/dev/md/dsk/d10 /dev/md/rdsk/d10

http://www.123helpdesk.nl

Powered by Joomla!

Gegenereerd op: 28 July, 2011, 22:18

123HELPDESK

REMEMBER: use TAB instead of spaces!

In our example the partition is called /dev/dsk/c3t0d0s0, so would update the vfstab with (note the rdsk in the second column of the new entry): #device #to mount device to fsck mount point FS type / / fsck pass ufs ufs mount mount at boot options 1 1 no no -

# /dev/md/dsk/d10 /dev/md/rdsk/d10 /dev/dsk/c3t0d0s0 /dev/rdsk/c3t0d0s0

Turn of volume manager in /etc/system comment out: rootdev:/pseudo/md@0:0,0,blk in /etc/system * Begin MDD root info (do not edit) *rootdev:/pseudo/md@0:0,0,blk * End MDD root info (do not edit)

Update Boot Archive

# bootadm update-archive -R /a

Mount the second (mirror) harddisk Just to make sure the mirror harddisk doesn't interfere. unmount /dev/dsk/c3t0d0s0 /a and mount the mirrordisk, e.g. /dev/dsk/c3/t1/do/so /a and follw the steps from " Update vfstab"

Update Boot Archive

We can now safely update the boot archive and reboot: bootadm update-archive -R /a shutdown -i 6

At the Grub menu select the normal Solaris option (not failsafe). If the boot fails because of mount problems, reboot into failsafe mode and check your vfstab file is correct. Fixing the Root Mirror
http://www.123helpdesk.nl Powered by Joomla! Gegenereerd op: 28 July, 2011, 22:18

123HELPDESK

You should now have a working Solaris system, but your root filesystem is no longer mirrored. To fix this you need to rebuild the meta device.

Identify the name of the root filesystem metadevice from vfstab (it's the line you commented out earlier: /dev/md/dsk/d10 in this example). Then use metastat to determine the components of the mirror: # metastat d10 d10: Mirror Submirror 0: d11 State: Okay Submirror 1: d12 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 20482875 blocks (9.8 GB) d11: Submirror of d10 State: Okay Size: 20482875 blocks (9.8 GB) Stripe 0: Device Start Block Dbase State Reloc Hot Spare c3t0d0s0 0 No Okay Yes

d12: Submirror of d10 State: Okay Size: 20482875 blocks (9.8 GB) Stripe 0: Device Start Block Dbase State Reloc Hot Spare c3t1d0s0 0 No Okay Yes

In our example we can see that the mirror is composed of two submirrors, d11 (Device: c3t0d0s0) and d12 (Device: c3t1d0s0).

The boot archive was fixed on c3t0d0s0, so d11 is the good half, and d12 the faulty half. You should therefore detach d12 # metadetach d10 d12

We can now switch back to using the metadevice as the root filesystem (using the backup of the vfstab you created earlier) and reboot: # cp /a/etc/vfstab_backup /a/etc/vfstab # shutdown -i 6

Once your systems has rebooted the root filesystem is back on the metadevice, but it's not mirrored, to re-enable the mirror you just need to reattach the device you detached above (in this case d12):
http://www.123helpdesk.nl Powered by Joomla! Gegenereerd op: 28 July, 2011, 22:18

123HELPDESK

# metattach d10 d12

The mirror will now resync, you can check on its progress with metastat: # metastat d12

Once syncing is complete you have a working mirrored root filesystem.

http://www.123helpdesk.nl

Powered by Joomla!

Gegenereerd op: 28 July, 2011, 22:18

Anda mungkin juga menyukai