Subject: Re: boot from second hard disk???

From: [email-masked] (Craig Petty)
Date: Mon, 2 May 1994 20:20:54 GMT

Yes, the device reconfiguring business has several major flaws.  

You are in real big trouble if you have to change your / or /usr disk, and
the target-id of the disk changes in the process.  Its a bit of a catch-22.
adding the new disk needs reconfigure, but reconfigure needs the new disk.

The only solution ( I know of) is to boot off the net, CD, or some other
Solaris machine, and manually install the /dev & /devices on the new disk.

As for your specific problem, I would:

1) Take 2nd drive from Machine B, physically attach it to Machine A.
2) Reboot (with -r) machine A.
3) On machine A:
   - mount root of 2nd disk (i.e. /mnt)
   - duplicate /dev & /devices to /mnt/dev & /mnt/devices 
	 (i.e. tar, cp won't work) (or re-dd the whole thing).
4) Move 2nd disk back to machine B.

I think the above should work (I assume you can fill in the missing
holes, like unmount /mnt, etc).

Your concept of "dd"'ing the disk was very sound, and shows a good
understanding of how things work.  Unfortunately, that is often not
good enough with Solaris (or SVR4?), since a few things, such as
device reconfiguring, are basically unsound.

It would have worked perfectly had you physically attached the
disk to machine A (rather than over the network) before
doing the dd. (I assume that is what you did.  IF not, I'm going to 
be very embarrassed ;-)).  

> 6.	However, I can get everything works by changing the 2nd hard disk 
> 	scsi id from 2 to 6 which make use of the CDROM device driver.  
> 	But I can't use the CDROM in this case because the device driver is 
> 	already used.
> 

Oops, wait a minute.  If the above is true, all you should have to
do (on machine B) is 

      1) Set the SCSI id of the 2nd drive to 6, 
      2) Set the SCSI id of the CD to 2 (Make sure it is attached on ON)
      3) "boot -r"
      4) halt
      5) Reset the SCSI id's (if you desire)
      6) "boot"

Wow, that makes it easier.  I'll leave my original comments for
the edification (or possible flaming) of our viewing audience.

>   When I want to boot solaris 2.3 from the second hard disk, I come 
> across the problem of missing device driver.  Here is the scenario.
>   
> 1.	Machine A is running solaris 2.3 and machine B is running 
> 	SunOS 4.1.3 and a second hard disk is attached to machine B.
> 
> 2.	I use "dd" to duplicate the whole image of machine A to the 
> 	second hard disk in machine B, and then try it boot machine B
> 	from the second hard disk.
> 
> 3.	Before booting from the second hard disk, I've edited the vfstab 
> 	to mount the system disk from the second hard disk.
> 
> 	/dev/dsk/c0t2d0s0   /dev/rdsk/c0t2d0s0  /   ufs 1   no  -
> 	/dev/dsk/c0t2d0s6   /dev/rdsk/c0t2d0s6  /usr    ufs 2   no  -
> 
> 4.	When booting from 2nd hard disk of machine B, it complains that
> 	it does not have the driver for the second hard disk.  The problem
> 	seems to come from the dynamic binding of device driver in
> 	solaris 2.3.  Since machine A does not have a second hard disk, 
> 	the /dev/dsk directory of machine A only gets the device driver for
> 	the CDROM and internal hard disk which makes the image in the 
> 	2nd hard disk of machine B does not get the device driver for 
> 	itself.
> 
> 5.	I've tried to "create" the driver for the second hard disk by using
> 	"boot disk2 -r" but it fails.
> 
> 6.	However, I can get everything works by changing the 2nd hard disk 
> 	scsi id from 2 to 6 which make use of the CDROM device driver.  
> 	But I can't use the CDROM in this case because the device driver is 
> 	already used.
> 
> 
> I want to know how can I get the 2nd hard disk driver for system.
> 
> thanks,
> 
> --
> Leung [Chi-Leung Fung] | email: [email-masked] | phone: (852) 358 7021
> Everything takes longer than you expect.
> 
> 
> 
-- 
Craig Petty/[email-masked]/Currently Contracting At Sun        
SrUnixSunSolarisAdmin/SysGuiRpcDevlpr/Contract/AvlAug94/CA/AZ/NW/NYC/ALASKA/INTL
NBCS: B3/5 t+ f+ w g r+ s- k-v cd