GNU GRUB - Bugs: bug #8539, Allow use of grub-install in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #8539: Allow use of grub-install in chrooted environment
Submitter: | None | ||
Submitted: | Sun 11 Apr 2004 12:13:43 PM UTC | ||
Category: | Installation | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Feature Request |
Status: | Works For Me | Privacy: | Public |
Assigned to: | None | Originator Name: | Sven Vermeulen |
Originator Email: | -email is unavailable- | Open/Closed: | Closed |
Release: | other | Release: | 0.94 |
Reproducibility: | Every Time | Planned Release: | None |
Jump to the original submission
Sun 23 Dec 2012 03:07:56 PM UTC, comment #17: |
Vladimir Serbinenko <phcoder> |
Sun 23 Dec 2012 02:54:27 PM UTC, comment #16:
|
adrelanos <adrelanos> |
Sun 23 Dec 2012 02:29:16 PM UTC, comment #15: I think it's safe to say, the grub inside chroot is broken, because multiple projects are affected.
|
adrelanos <adrelanos> |
Fri 14 May 2010 07:13:28 AM UTC, comment #14: This problem is reproducible here. The case is -
|
dE <de_logics> |
Sat 15 Dec 2007 12:46:10 PM UTC, comment #13: We've moved to GRUB 2 as a development platform. Please can you check if this bug still applies there, and if it does, reopen it?
|
Robert Millan <robertmh> |
Mon 10 May 2004 07:38:15 AM UTC, comment #12: Sounds reasonable yes. Thanks for all the effort that's put here and sorry that I wasn't participating in the discussion, I had some timing issues (who doesn't :)
|
Anonymous |
Thu 06 May 2004 12:44:04 AM UTC, comment #11: A patch (attached) has been accepted for GNU coreutils CVS version of 'df'. This bug is established as problematic due to that program, which will be fixed in the next CVS update/release. I'm suggesting we set this as WONTFIX (i.e., if you're having problems, upgrade coreutils) instead of trying to backport GRUB2 stuff right now. Sound reasonable? |
Anonymous |
Thu 29 Apr 2004 11:29:37 AM UTC, comment #10: No, you are right. Your solution would be perfect, as
|
Yoshinori K. Okuji <okuji> |
Wed 28 Apr 2004 05:55:42 PM UTC, comment #9: It certainly doesn't solve all problems, but I think it works as well as df alone, and better in some cases. In the case you mentioned, find_device returns whatever device /dev/root links to for /boot, /boot/grub, and /; df /{,boot{,/grub}} returns rootfs. /dev/root is a symlink (on my machine, linking to /dev/ide/host0/bus0/target0/lun0/part2, which is handled by convert() ), but rootfs simply throws an error.
|
Christian Jones <chjones> |
Wed 28 Apr 2004 11:36:22 AM UTC, comment #8: Unfortunately, your patch does not work with Mandrake Linux 9.2, because df -P returns this:
|
Yoshinori K. Okuji <okuji> |
Wed 28 Apr 2004 08:08:05 AM UTC, comment #7: Okay, so GNU df has some problems. They've (just) been submitted as bugs to the coreutils developers. Specifically, df <file> doesn't actually return the device <file> is on, it returns the first device that looks like it might be right. Since grub-install uses df <dir> to determine what devices the root and boot directories are on, this can be a problem. Though it here became apparent because you were chrooted, it would also have been a problem if, say, you'd mounted something at /mnt and then something else also at /mnt; you'll see the second one, but df sees the first.
|
Christian Jones <chjones> |
Wed 28 Apr 2004 03:53:12 AM UTC, comment #6: I think I may have tracked down (a big part of) the problem. Could you run a quick test, if you have a usable system in which you can chroot? Try this (the order is important)---
|
Christian Jones <chjones> |
Tue 27 Apr 2004 09:17:52 PM UTC, comment #5: Hmm, it sounds really difficult. What tool can you use in the chroot environment? Can you use Perl or stat, for example? |
Yoshinori K. Okuji <okuji> |
Sun 25 Apr 2004 06:01:15 PM UTC, comment #4: Sadly, no. /proc/mounts uses the paths from the real root, not the chroot. For instance, if the boot partition is mounted under /mnt/gentoo/boot, then /proc/mounts contains /mnt/gentoo/boot, wheras /etc/mtab should read "/boot" (because we're chrooted inside /mnt/gentoo).
|
Anonymous |
Wed 21 Apr 2004 11:13:00 AM UTC, comment #3: Copying /proc/mounts to /etc/mtab suffices. Don't you agree?
|
Yoshinori K. Okuji <okuji> |
Sun 18 Apr 2004 12:52:00 PM UTC, comment #2: That's just how the installation for Gentoo itself is done, and I believe the same goes for LFS. Without chroot, running grub-install fails because it requires /sbin/grub. Users are not able to symlink /mnt/gentoo/sbin/grub to /sbin/grub as "/" is read-only (LiveCD) (and I don't know if this'll work anyway).
|
Anonymous |
Mon 12 Apr 2004 05:58:17 PM UTC, comment #1: You haven't answered my question: why do you need to chroot? |
Yoshinori K. Okuji <okuji> |
Sun 11 Apr 2004 12:13:43 PM UTC, original submission:
Is it possible to allow grub-install to be used inside a chrooted environment? The main issue here is that grub-install requires a correct /etc/mtab which, in a chrooted environment, isn't 100% accurate.
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-12-23 | phcoder | Release | None | other | |
2012-12-23 | adrelanos | Attached File | - | Added diff_working_vs_defunct, #27144 | |
2012-12-23 | adrelanos | Attached File | - | Added created_inside_chroot_with_grub2.00-Defunct.cfg, #27143 | |
2012-12-23 | adrelanos | Attached File | - | Added created_inside_virtual_machine_by_grub2.00-Working.cfg, #27142 | |
2012-12-23 | adrelanos | Carbon-Copy | - | Added adrelanos | |
2007-12-15 | robertmh | Open/Closed | Open | Closed | |
2004-05-06 | None | Attached File | - | Added df-fix.patch.txt, #1272 | |
2004-04-28 | chjones | Attached File | - | Added grub-install-dffix.patch, #1247 | |
2004-04-12 | okuji | Status | None | Works For Me |
Powered by Savane 3.13-02a9.
Corresponding source code
Your problem has nothing to do with the original problem from over 5 years ago. And your problem has nothing to do with chroot either and is fixed in r4601