Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144639 - Install unmounts partitions that it did not mount when cleaning up after a failure
Summary: Install unmounts partitions that it did not mount when cleaning up after a fa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Installer (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux Installer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-21 06:42 UTC by Simon Stelling (RETIRED)
Modified: 2007-03-03 18:04 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 Simon Stelling (RETIRED) gentoo-dev 2006-08-21 06:42:02 UTC
(Using amd64 livecd 48c4536699d325524321c0ee6736b78a)

If a partition is still mounted, the partitioning code dumps a traceback and exits. After that, install_failed_cleanup() is called, which unmounts the partitions. IMO GLI should just unmount the partition before partitioning and then continue, as it would unmount them anyway.

GLI: August 21 2006 01:03:44 - DEBUG: Event() cleared at top of 'while' loop in CC in secondary thr ead...starting step 0, Partition
GLI: August 21 2006 01:03:44 - partition(): Processing /dev/sda...
GLI: August 21 2006 01:03:44 - Exception received during 'Partition': PartitionsMountedError :FATAL : partition: Cannot partition /dev/sda due to filesystems being mounted
GLI: August 21 2006 01:03:44 - Traceback (most recent call last):
GLI: August 21 2006 01:03:44 - File "/opt/installer/GLIClientController.py", line 197, in run
    self._install_steps[self._install_step]['function']()
GLI: August 21 2006 01:03:44 - File "/opt/installer/templates/x86ArchitectureTemplate.py", line 404 , in partition
    raise GLIException("PartitionsMountedError", 'fatal', 'partition', "Cannot partition " + device  + " due to filesystems being mounted")
GLI: August 21 2006 01:03:44 - GLIException: PartitionsMountedError :FATAL: partition: Cannot parti tion /dev/sda due to filesystems being mounted
GLI: August 21 2006 01:03:44 - DEBUG: waiting at top of 'while' loop in CC in secondary thread...wa iting to start step 1, Mount local partitions
GLI: August 21 2006 01:03:45 - DEBUG: install_failed_cleanup(): gathering mounts to unmount
GLI: August 21 2006 01:03:45 - DEBUG: install_failed_cleanup(): running: umount -l /mnt/gentoo
GLI: August 21 2006 01:03:45 - DEBUG: install_failed_cleanup(): running: umount -l
GLI: August 21 2006 01:03:45 - DEBUG: install_failed_cleanup(): running: cp /tmp/compile_output.log  /tmp/compile_output.log.failed then removing /tmp/compile_output.log
Comment 1 Preston Cody (RETIRED) gentoo-dev 2006-08-21 06:56:45 UTC
Aborting if there are mounted partitions is the desired behavior.  if they are mounted we must assume they are mounted for a good reason.  unmounting is not a good solution.
why were you mounting things?
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2006-08-21 09:43:44 UTC
well, that might be, but then it'd be better to not unmount those 'mounted for a good reason' partitions. in my case i mounted a partition to check that i'd not erase any data because sda became sdb or such.
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2006-08-21 09:53:35 UTC
Okay, the fact that the installer unmounts the mounted partition that caused the problem in the first place is a "bug". The only time it happens is when the install fails because a partition on a disk it's going to touch is mounted, but I suppose it needs to be fixed anyway. The solution is to make a list of everything that's been mounted and use that to umount, instead of the output of 'mount | grep ^/mnt/gentoo'.
Comment 4 Preston Cody (RETIRED) gentoo-dev 2007-03-03 18:04:28 UTC
This has been fixed.