Navigation
Records in this category
- How to rebuild Solaris Device Tree
- Installing and Configuring MySQL on Solaris 10 with Service Management Facility
- Using ZFS for Zone Backups or Snapshots
- How to get access to the parallel port from a freshly installed system
- Moving a harddisk with a Sun Solaris 9 installation from one x86 machine to another
- Solaris root password recovery
- The Best MQSeries FAQ
- Installing and Configuring Oracle on Sun Solaris
- Solaris reminders
- Using truss,nm and ldd command to troubleshoot binary files
- Configuring Samba in Sun Solaris
- The best DNS FAQ for solaris
- The best NFS document for Solaris
- OS Patching technique with VxVM
- Replacing D1000 disks in Solaris
Tags
Sticky FAQs
Sun Solaris
How to rebuild Solaris Device Tree
If you ever shift around any bootable drives within a Sun Solaris box, you may find that either the device names (cxtxd0sx) do not follow the disk position within the server, or, the system just fails to boot because it can’t mount the other disk slices.
Let’s assume you are booting off of target 8 (c1t8d0s0), but wish to move that disk to the appropriate slot to make it target 0 (c1t0d0s0). You have changed all references in the /etc/vfstab file to reflect the new disk position, physically moved the drive from the target 8 slot to the target 0 slot, and changed the boot-device variable within the OBP to the appropriate disk. You should now be all set to boot from the disk in target 0, right?
Not quite yet.
Solaris creates a device tree with links to all the disks it knows about, and these don’t get rebuilt upon reboot. If you simply tried to boot the disk now in target 0, it would find the kernel, but fail to mount any of the other filesystems, because these device links are still pointing to the disk slices on target 8.
In order to boot off the drive in the new position, you will have to remove these device links and rebuild them. Here is how we do that:
1. Insert a Solaris 8, 9 or 10 cd into the hosts cdrom
2. From the ok prompt, enter boot cdrom -s
ok> boot cdrom -s
3. fsck the boot disk
# fsck -y /dev/rdsk/c1t0d0s0
Remember that your boot disk may differ than the example above. Since in our example above, we have put the disk into the slot for target 0 (c1t0d0), that is what we are using here.
4. Mount the root slice on /mnt
# mount /dev/dsk/c1t0d0s0 /mnt
Note that your root slice may differ than the above example.
5. Move path_to_inst
# mv /mnt/etc/path_to_inst /mnt/etc/PATH_TO_INST_ORIG
6. Remove all old device links
# rm /mnt/dev/rdsk/c* ; rm /mnt/dev/dsk/c* ; rm /mnt/dev/rmt/* ; rm
/mnt/dev/cfg/c*
7. Rebuild path_to_inst and devices
# devfsadm -r /a -p /mnt/etc/path_to_inst
8. Unmount the root slice and reboot
# umount /mnt ; init 6
You should now be able to boot off your old drive in its new slot.
Tags: device tree, Sun Solaris
Related entries:
- Installing and Configuring MySQL on Solaris 10 with Service Management Facility
- RHEL5 Kickstart installation using HTTP
- Veritas Cluster - Commands
- Passive Network Traffic Analysis: Understanding a Network Through Passive Monitoring
- Intrusion Detection Terminology (Part One)
Last update: 2009-06-18 17:51
AuthorLuke Francis
Revision: 1.0
You cannot comment on this entry