TIP: Emergency "Upgrades" (long)TIP: Emergency "Upgrades" (long) Lito A. Lampitoc mailto:ral@codewan.com.ph Wed Jan 30 04:43:02 2002 Previous message: Solaris 8 Intel on Dell OptiPlex Just recently, I had a problem of "Cannot mount root at.." when I reboot my Solaris 2.6 onNetrai5, then Idid almost the same procedure as yours, this is what i did first: 1. boot cdrom -s 2.fsck -F ufs /dev/rdsk/ 3. boot cdrom -s 4. mount /drv/dsk/c0t1d0s0 /a 3.drvconfig -r /a/devices -p /a/etc/path_to_inst 5. devlinks -r /a 6. disks -r /a 7. tapes -r /a 8. ports -r /a 9. umount /a 10. halt 11. boot But it did'nt work :(. So I resorted to a more drastic measure: boot from cdrom and mount then: 1. cd /tmp/dev ; tar cvfp - . | ( cd /a/dev ; tar xvfp - ) 2. cd /tmp/devices ; tar cvfp - . | ( cd /a/devices ; tar xvfp - ) 3. cp /tmp/root/etc/path_to_inst /a/etc/path_to_inst 4. halt 5. boot But again, I am frustrated that it didnt work. Having no option i reinstall my system :( What do u think could be wrong with my procedure as compared to yours? If i had seen ur post earlier, then I would have tried that. "Jonathan C. Patschke" wrote: I'm a bit of a newbie to the list, and haven't seen much posted beside questions & answers. I'd like to share a tip--a preemptive answer, if you will. :) If you don't like it, feel free to LART me, and I'll not make this mistake again--I'll post it to my website or something. Otherwise, I'll post them as I discover them. This weekend I had a moderately critical SPARC LX die on me (dead motherboard), and had no SPARC LX with which to replace it[1]. I did, however, have a SPARC 10. But, I didn't have the time to reinstall Solaris, and do all the necessary things to get the server back online. I, as my users have so often wailed "just wanted it to work". What I -wanted- to be able to do was just pop the disc from the LX into the 10, and magically have everything work. Of course that didn't work, but the full procedure isn't really complicated. The following procedure worked for me, and I'm sure that it'll work for most anyone else, provided that a few caveats are noted: 1) The two machines are of the same kernel architecture (arch -k). This is almost a moot point, as all new Sun boxen are sun4u. 2) The drivers on the boot drive you want to move contain a superset of the drivers necessary to drive the devices in both machines. Now, here's the procedure: 1) Install the disc(s) in the new machine. 2) Set the appropriate NVRAM variables to convince OpenBoot that it really wants to boot from the disc that you used toboot from in the dead SPARC. 3) Boot from the "Solaris Software, Disc 1" CDROM. Don't boot from the "Solaris Installation Disc". 4) fsck your boot disc's / partition (usually /dev/rdsk/c0t0d0s0 on a sun4u, or c0t3d0s0 on a sun4[cdm]). If your machine died while it wasn't running, you may skip this step. 5) Mount your boot disc's / partition as /mnt 6) rm -rf /mnt/dev /mnt/devices (doesn't it feel weird to type that?) 7) cp -f /etc/path_to_inst /mnt/etc/path_to_inst 8) chroot /mnt /usr/sbin/devfsadm -v 9) Reboot. Allow the system to boot from the boot disc, and verify normal operation. Note that your IP address may be different, if you're relying on DHCP to configure things for you. It's straightforward, if you think about it. However, I'd sure have appreciated having the procedure all spelled-out before I started Now, here's why that works (at least, to the best of my knowlege): /etc/path_to_inst contains all the "instance" data for every driver on the system. It's a map of system resources to drivers, meaning, it tells SunOS which device drivers to load, and where to point them. This file is used to maintain the /devices hive and the /dev directory. The kernel doesn't need to get this information from there, it gets the info it needs to boot from the NVRAM. However, all the usermode stuff requires this information. So, if you just swap discs, you'll -boot-, but only / will mount successfully (as read-only). You can't remount the partition read-write, because /etc/path_to_inst loaded the SCSI driver with the -old- system's device information, and /dev/dsk/c0t0d0s0 points to this faulty information. Only by clearing, and then rebuilding this information can you get the system to boot properly. You need to do this from the Solaris CD since you can't, obviously, make changes to a read-only partition. A note about step #8: The chroot is necessary. Specifying -r will only tell devfsadm where to build the new /devices and /dev hives, not which path_to_inst to update. The -v is there because I like lots of output. One last note: I mentioned that the boot disc needs the drivers for both machines, and that both machines need to be kernel-compatible. This isn't strictly true. If you browse around the Solaris Software CD, you will find kernel drivers, but there's a substantial risk of breaking things, so only try that as a last resort. -- Lito A. Lampitoc Foundation for Communication Initiatives phone:+63(2)8941345 CodeWAN Project http://www.codewan.com.ph/ -- "If you think you're good, you're not."