shift hard disk from primary IDE channel to secondary IDE channal

Wellcomes All,
some times ago I 've installed a Debian ditribution on an Hard Disk who was set as Primary Master. Few days ago, I 've decided to install another Hard Disk with a different Operating System. When I did that, I turned off the old hard disk, and I mouted the new one on the Primary IDE Channel.
Now the problem is that I can't boot the OS which is set on the Secondary Master, and every times I want to execute the boot form the hard disk who is on the Secondary Channel I have to switch it on the Primary .
So, I want to install a boot manager, but the problem is that the File System will be change name.... My ask is: what I have to do, and what files I have to modify, overwrite on the old OS (Debian) in order to work correctly?
Many thanks in advance.

I cannot give a Debian-specific answer. The main problem is that modern Linux distributions do something like the following in /etc/fstab:

LABEL=BOOT            /boot  ext2  auto,defaults defaults 0 0 
LABEL=ROOT            /        ext2  auto,defaults defaults 0 0

The "Label" stuff is what's giving you the problem. What happens is that every partition gets a filesystem-specific "tag" such as "BOOT" or "ROOT". The mount process finds the "first" partition that matches this tag.

To fix this, hard-code the device IDs. So in the /etc directory on the / mountpoint on your SECOND drive, do something like this:

/dev/hdb1          /boot       <other stuff>
/dev/hdb2          /             <other stuff>

But you're not done yet. If your boot-loader is "grub", you also have to go into the SECONDARY Boot partition and change the grub configuration there to make sure if tries to load the kernel and "initrd" image off /dev/hdb* instead of "BOOT" or "ROOT", etc.

You're still not done. In the grub configuration on the PRIMARY drive, in the Boot partition, you have to install a "chain loader" into the Grub configuration. Google for "Grub" and "chain loader".