On Mon, Mar 25, 2013 at 2:51 PM, Felix Miata <[email protected]> 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? > # grub # if booted to live media, Did you try to do it in chroot without mounting /dev on any modern distribution? > 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. _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
