On 2013-03-25 15:03 (GMT+0400) Andrey Borzenkov composed:
Felix Miata wrote:
On 2013-03-25 12:15 (GMT+0400) Andrey Borzenkov composed:
Simon Hobson wrote:
back in Grub 1 days, I could remember how to install grub just by mounting the filesystem, chrooting to it, and issuing a few grub commands. I've never managed to make this work with 1.99 (as currently installed with Debian). Is there a simple set of commands that will do what worked in grub 1 (going form memory here) : hd0 = /dev/sda root = (hd0,0) install (hd0)
mkdir /sysroot mount /dev/your-root-dev /sysroot mount /dev/your-boot-dev /sysroot/boot mount --bind /dev /sysroot/dev mount --bind /sys /sysroot/sys mount --bind /proc /sysroot/proc mount --bind /run /sysroot/run (recommended if you are using systemd) chroot /sysroot grub-install /dev/your-grub-boot-device (may be grub2-install on some distro)
Lots more to remember than what I do with Grub Legacy:
The only thing to remember is grub-install. Everything else is standard "create proper chroot environment" which is not related to what you are going to do in chroot.
What exactly is the point of your comment?
Lots less to remember with Grub Legacy, as there is no need to chroot to set it up, plus there is the context of $SUBJECT.
# grub # if booted to live media,
Did you try to do it in chroot without mounting /dev on any modern distribution?
To what end? Are you forgetting $SUBJECT, the thread purpose?
grub> root (hd0,2) # e.g. in this case third partition on first
Or this without having correct device.map? Which is implied by lack of "chroot" in your example.
If the find command finds not what is expected, a device.map file can be configured in the live environment or the target mounted to /boot and a device.map configured there if an appropriate one is not there already. In any event, there's no need for chroot when using live media containing executable Grub Legacy, or if as $SUBJECT breaking to a Grub prompt from a Grub menu, and no need for configuration files scattered in diverse places separate from the target location, or a configuration script that depends on them for its function.
-- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
