Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179693 - mount-boot.eclass should not operate in a chroot
Summary: mount-boot.eclass should not operate in a chroot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 22:44 UTC by Bugs Bunny
Modified: 2007-05-26 02:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bugs Bunny 2007-05-24 22:44:05 UTC
grub should not mount any partitions inside a chroot during an install.

Reproducible: Always

Steps to Reproduce:
1. setup a chroot and emerge grub with an fstab setup
2.
3.

Actual Results:  
boot partition is mounted when it should not be.


<robbat2> i try not to touch grub, but I do know enough about it's internals
<robbat2> it's been a couple of years since I made any commits to the main tree sys-boot/grub anyway
<__Tired__> there is a bug I want to know if you all want a bug or if it will be closed invalid
<__Tired__> when doing up a tarball for a reinstall on a running system if /etc/fstab exists in the chroot it mounts  a partition which in turn causes the files to never be installed properly on /boot which is not mounted
<robbat2> what mounts that partition?
<__Tired__> from a quick glance it appears to be the ebuild
<robbat2> hmm, i see why
<robbat2> not sure why you bugged me about it tho
<robbat2> file a bug for base-system
<__Tired__> your in the herd that maintains it :-b
<__Tired__> thanks will do
<robbat2> stating that their needs to be a way to disable the mount-boot eclass
<robbat2> inside chroots
Comment 1 SpanKY gentoo-dev 2007-05-25 04:15:48 UTC
there really is no way at all to address this ... plus, you cant blanket say "no mounting in chroots" as there are scenarios where you want /boot mounted in chroot

i dont see the real issue here ... try to describe it more clearly as to what your problem is
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-25 04:46:20 UTC
If you are building a chroot to tar up and send to another system, and you do 'emerge grub' inside the chroot, it mounts the real /boot on your system, and installs grub into that, instead of the chroot's /boot.

I think maybe solvable with a special ENV var, similar to genkernel's usage.
DONT_MOUNT_BOOT=1 emerge grub
Comment 3 SpanKY gentoo-dev 2007-05-25 05:05:11 UTC
obscure env var that people wont notice ?  works for me ;)

added to the tree, cheers
Comment 4 Bugs Bunny 2007-05-25 14:03:00 UTC
If doing an chroot setup on an already running system I do not want boot mounted via an ebuild. This is not proper for the chroot enviroment. Any partition that is or should be mounted should be done outside the chroot.
Comment 5 SpanKY gentoo-dev 2007-05-26 02:19:58 UTC
Robin just told you how to do that: DONT_MOUNT_BOOT=1 emerge grub