|
From: | smah oneandteo |
Subject: | In LiveDistro grub-mkconfig not work (cannot find a device for / (is /dev mounted?)) |
Date: | Sun, 27 Mar 2011 10:10:46 -0700 (PDT) |
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. Background: I have OpenSuse with grub legacy.When installed windows,bootloader was damaged.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 |
grub-mkconfig.zip
Description: Zip archive
[Prev in Thread] | Current Thread | [Next in Thread] |