Bug 493333
Summary: | anaconda ntfsresize mount error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robert de Rooy <rderooy> | ||||
Component: | anaconda | Assignee: | David Cantrell <dcantrell> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | low | ||||||
Version: | rawhide | CC: | anaconda-maint-list, davidz, katzj, pjones, rmaximo, tcallawa, vanmeeuwen+fedora | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-04-29 16:27:35 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Robert de Rooy
2009-04-01 13:42:39 UTC
Created attachment 337524 [details]
traceback
Based on what I can see, the problem is that /etc/mtab is not getting updated when the filesystem is unmounted. On the regular install media, /etc/mtab is a symlink to /proc/mounts. On the livecd, it appears to be a real file. The filesystem does actually get unmounted and mount point is removed, but the /etc/mtab file still contains a line which confuses ntfsresize, among other programs. You can use the F-11 Beta Live CD to perform an install in your case, you'll just need to change /etc/mtab before running 'Install to Hard Drive'. Do this: 1) From Applications, System Tools, choose Terminal 2) In the terminal window, run the following commands: su - ln -sf /proc/mounts /etc/mtab Then you can run the installer. For livecd-tools maintainer(s): My guess is around line 540 in imgcreate/creator.py that removes mtab is the culprit. The symlink to /proc/mounts is made, but then it's removed. But this is just a guess, I did not run livecd-creator or anything. In the live environment, /etc/mtab is intentionally a normal file and not the symlink; we only use the symlink when building a livecd not during operation. The problem is that anaconda's unmount just calls umount(2) and doesn't do anything to care about /etc/mtab 16.53.54 <halfline> anything that reads /etc/mtab is broken too 16.54.17 <halfline> since it's not public api, just a private implementation detail 16.58.04 <dcantrell> jeremy: yeah, so libntfs/volume.c in ntfsprogs has ntfs_check_if_mounted() which first tries to read mtab. reassign the bug there Okay, so I tried to fix this in libntfs, but here's the problems: libntfs is using the {set,get,end}mntent() calls to check whether a device node is mounted. Contrary to what Ray said in comment 4, those are public API for glibc. It also looks to see if the mount is read-only, or if the device is mounted at /. We could scrape the mount flags out of /proc/mounts, but because of how /proc/mounts works, we have no way to see if the device node is mounted at /. For example, on my laptop, /dev/sda3 is mounted at /: [spot@velociraptor devel]$ grep /dev/sda3 /etc/mtab /dev/sda3 / ext3 rw 0 0 But, if I search /proc/mounts for /dev/sda3: [spot@velociraptor devel]$ grep /dev/sda3 /proc/mounts [spot@velociraptor devel]$ [spot@velociraptor devel]$ grep "/ " /proc/mounts rootfs / rootfs rw 0 0 /dev/root / ext3 rw,relatime,errors=continue,user_xattr,acl,data=ordered 0 0 So, we can't scrape through /proc/mounts reliably. You're going to need to make an /etc/mtab. Reassigning to anaconda. You can use /proc/self/mountinfo; that file exposes dev_t to fix the problem with using device nodes for identification (which in itself is broken). Available since at least 2.6.26, maybe earlier. Or you can wait for libmount in an upcoming util-linux-ng release. Should be fixed in anaconda-11.5.0.42-1 I tried again with the F11-Preview-i686-Live LiveCD. The first time I got an error:1 which was not really informative, as no additional information was displayed. I booted back into windows, to make sure the filesystem was consistent and did a clean shutdown. after this the resize succeeded. |