Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126438 - GTK installer can erase partition table
Summary: GTK installer can erase partition table
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Installer (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Linux Installer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-16 10:05 UTC by Christian Conkle
Modified: 2006-03-24 13:46 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 Christian Conkle 2006-03-16 10:05:40 UTC
The GTK installer just wiped the partition table on my primary hard drive.  Thanks to its prominent console output, I was able to recreate the partition table and get back up and running, but many users would not have that ability and could lose everything.  And it was scary anyway.

To reproduce: Boot 2006.0 LiveCD, in my case on x86.  Manually mount an existing hard drive partition somewhere in /mnt, forget to umount it.  Run installer, set to format another partition on the same drive.  In output log:

*snip*
GLI: March 16 2006 00:35:58 -   Partition 1 has origminor 1...saving start sector 63 and end sector 1124549
GLI: March 16 2006 00:35:58 -   Partition 2 has origminor 2...saving start sector 41287050 and end sector 586067264
GLI: March 16 2006 00:35:58 -   Partition 3 has origminor 3...saving start sector 1124550 and end sector 21205799
GLI: March 16 2006 00:35:58 -   Partition 5 has origminor 5...saving start sector 41287113 and end sector 51102764
GLI: March 16 2006 00:35:58 -   Partition 7 has origminor 7...saving start sector 52098858 and end sector 63360359
GLI: March 16 2006 00:35:58 -   Partition 8 has origminor 8...saving start sector 63360423 and end sector 288655919
GLI: March 16 2006 00:35:58 -   Partition 9 has origminor 9...saving start sector 288655983 and end sector 586067264
GLI: March 16 2006 00:35:58 -   Deleting old minor 1 to be recreated later
GLI: March 16 2006 00:35:58 -   Deleting old minor 5 to be recreated later
GLI: March 16 2006 00:35:58 -   Deleting old minor 7 to be recreated later
GLI: March 16 2006 00:35:58 -   Deleting old minor 8 to be recreated later
GLI: March 16 2006 00:35:58 -     Could not delete partition...ignoring
GLI: March 16 2006 00:35:58 -   Deleting old minor 9 to be recreated later
GLI: March 16 2006 00:35:58 -     Could not delete partition...ignoring
GLI: March 16 2006 00:35:58 -   Deleting extended partition with minor 2
GLI: March 16 2006 00:35:58 -   Deleting old minor 3 to be recreated later
GLI: March 16 2006 00:35:58 - Partitioning: Second pass...
GLI: March 16 2006 00:35:58 - Partitioning: Third pass....creating partitions
GLI: March 16 2006 00:35:58 -   Drive has 586072368 sectors
GLI: March 16 2006 00:35:58 -   Partition 1 has 549MB
GLI: March 16 2006 00:35:58 -     Old start sector 63 retrieved
GLI: March 16 2006 00:35:58 -     Retrieved start sector is not the same as the calculated next start sector
GLI: March 16 2006 00:35:58 -     Old end sector 1124549 retrieved
GLI: March 16 2006 00:35:58 -   Adding primary partition 1 from 63 to 1124549
GLI: March 16 2006 00:35:58 -   Partition 2 has 266005MB
GLI: March 16 2006 00:35:58 -     Old start sector 41287050 retrieved
GLI: March 16 2006 00:35:58 -     Retrieved start sector is not the same as the calculated next start sector
GLI: March 16 2006 00:35:58 -     Old end sector 586067264 retrieved
GLI: March 16 2006 00:35:58 -   Adding extended partition 2 from 41287050 to 1124549
*snip*

(Note "could not delete partition" lines--those were the mounted partitions.)

Followed by some installer warnings about it being a serious error... fired up fdisk, hit "p", nothing listed.  (Actually one tiny partition was there, but I was too startled to remember very well.)  Sorry I don't have the rest of the installer log: I was too pre-occupied with making sure I didn't lose those precious sector numbers.  There was some messaging about not being able to create partitions with end positions before their beginnings.  Again, I'm sorry I didn't keep the rest of the log.  I also have the "debug to console" output from the partition setup screen, if that'd be helpful.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2006-03-16 11:16:58 UTC
I *could* fix this by automatically unmounting any partitions that are being affected by the partitioning, but I don't think that's the right solution. I could also warn that there are mounted partitions on one of the detected disks, but that's not necessarily a problem, either, especially if you're not changing anything on the disk that has the mounted partition.

For now, I'm not going to do anything about it. You just shouldn't mount filesystems and then try to partition the same disk. It's silly to begin with.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2006-03-16 11:25:41 UTC
After talking to another developer, I decided to just make partitioning fail before it starts removing anything if there are any filesystems mounted on that particular drive.
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2006-03-16 11:26:02 UTC
Fixed in CVS
Comment 4 Jeffrey Forman (RETIRED) gentoo-dev 2006-03-24 13:46:42 UTC
Moving to Release Media/Installer.