So, would it be optimal if the Grub dev team added a parameter to search, similar to the "--fs-uuid" parameter, but for the hard drive's unique identifier? Maybe a "--hd-uuid" parameter? So something like "--hd-uuid --set 012345, msdos4" where the 012345 is the id of the whole drive, and the msdos4 is the fourth partition according to the MBR partition table (or should be able to do "gpt4" if GPT).
Well, for now you can use tune2fs to tweak the UUID after imaging. If you somehow have imaging scripted, since tune2fs is a CLI program, you could add it to end of the script. Unfortunately, you would need to go back into the cloned drive after imaging and edit grub.cfg to match the uuids in the case you go with tune2fs. Even if they added a --hd-uuid parameter, you would still have to go back in and change the grub.cfg file after imaging (just partitions, not whole disk) to match the uuid of the hard drive. But again, this should be automatable. Or... It would also be cool if the dev team added a feature to grub so that it holds which hard drive it booted from in a variable. Like a HOME_DRIVE variable or something. Then your config files could be based off HOME_DRIVE and you could use the same exact config file in all the cloned drives, hence no need for extra work after cloning. Jake Also, you say that the two disks have different serial numbers, yet you've cloned them after each-other. So you must be talking about something in the firmware of the hard drive? There is a 4-byte disk signature in the MBR. So if you only clone partitions, that would remain as a difference. And the GPT header has a uuid for the whole drive. Sent from my iPhone _______________________________________________ Bug-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-grub
