I hope I'm wording this issue clearly.
I'd like to plug a disk (IDE or SATA) into an adapter that lets me plug it into my workstation via USB. (E.g. http://www.newegg.com/Product/Produc...82E16817153071
It will show up as /dev/sdX where X is some arbitrary letter depending on what other disks the system happens to have.
I'd like to have a script then partition, format and copy files onto it. Then we need to install GRUB on it.
Then I will remove the disk and install it permanently into a different computer, here it will either be /dev/hda (if IDE) or /dev/sda (if SATA).
However, it seems that in general when you install GRUB on a disk, it assumes it is going to be the same disk that boots??
I am first trying an IDE disk so it will be /dev/hda.
I get a "GRUB Hard Disk Error" when booting it as /dev/hda rather than whetever it was on the USB adapter. I used this to install grub:
grub-install --root-directory /mnt/removable/ /dev/sdX
Where X was the appropriate letter based on the USB adapter. Then I fixed /mnt/removable/boot/grub/device.map to use /dev/hda../dev/hdc instead of sda..sdc.
I haven't found much about this specific scenario I have so far on the web.
I am guessing that stage1 is either attempting to find files based on what the original workstations primary disk geometry was, or it's assuming that the disk is the same location as it was when it was a "removable" one (i.e. /dev/sdX or (hd5) or whatever, when it should just be looking at (hd0).
The goal is to do this kind of installation easily and quickly, and not have to do it individually on each final computer via install CDROM or whatever, or reboot the workstation each time in order to attach the disk as the same location there, etc. (This is a manufacturing setting).
Thanks for any ideas you have!