On 11/07/2015 01:16 PM, Andrei Borzenkov wrote:
07.11.2015 22:43, don fisher пишет:
I have a USB system disk that currently will not boot. I currently have the USB disk loaded on my main system and would like to run grub2 to update the boot block on the USB device. I have looked at the USB grub.cfg file and it appears to match the one on my system except for the UUID. How does one execute grub2 with a target other than my system disk. Also, what is the best way to get the UUID for the partition. I scanned the output of hwinfo and the UUID on the USB drive appears to be correct, but there must be an easier way.
It is not quite clear, but assuming you want to install grub2 that looks for /grub2 on USB for its configuration, it is
mount /dev/sdXN /mnt grub2-install --boot-directory=/boot /dev/sdX
where /dev/sdXN is device for partition on your USB disk.
It will copy grub2 files to /grub2 and bootstrap code in MBR. This code will look for /grub2 on partition N for its files, e.g. /grub2/grub.cfg.
It will *not* create or update grub.cfg - you will need to write it yourself. Thanks. I believe I have the grub2 files in /boot/grub2. The drive tries to boot, then gives me a ioerror 2 message and hangs. There is something it is looking for that is not there or incorrect. I guess I will have to do a system install on the USB drive again and start from scratch. I was hoping there was a way to trick grub2 into executing on one drive while it was updating another. How do you get the UUID?
Don -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org