On 27.03.2011 19:10, smah oneandteo wrote: > > Problem: > When I try use cammand like "update-grub2" or "grub-mkconfig -o > grub.cfg" in LiveDistro, raise error : > /usr/sbin/grub-probe: error: cannot find a device for / (is /dev > mounted?). > In grub 1.98. > You can't use grub-mkconfig in live distro. You can use it in chroot though.
>
> Background:
> I have OpenSuse with grub legacy.When installed windows,bootloader was
> damaged.
>
However I should also point out that what you probably want to, is to
reinstall grub, not reconfigure it. So you should use grub-install, not
grub-mkconfig
> So I must reinstall grub but I had LiveCD of Ubuntu 10.10 (with
> grub1.98).I could install grub2 bootloader but I can not generate
> grub.cfg from menu.lst.When I ran "update-grub2"
> raise above error (and internet did not solve my problem).
> I have decided that solved problem.First see update-grub2 script then
> read grub-mkconfig
> script.I found error raise by grub_probe because target is "/" of
> LiveDistro.This
> root not work.I used "chroot" and "mount --bind" many directories, but
> problem not
> solve (or I could not).So we shall define root directory of main FHS
> (like mounted
> to /mnt and define /mnt for target of grub_probe)
>
> Solver:
> I edit grub-mkconfig and add 3 options:
> -r, --rootdir root directory [default=/]
> -b, --bootdir boot directory [default=/boot]
> -g, --grubdir grub directory [default= in linux
> {bootdir}/grub,in BSD /grub]
> I tested it by Ubuntu 10.10 Live (grub 1.98).
>
> Sincerely
> SMAH1
>
>
>
> _______________________________________________
> Bug-grub mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/bug-grub
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bug-grub mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-grub
