Bug 794957 - f17 alpha tc2 custom partitioning bootloader on root partition leaves the disk without ANY bootloader
Summary: f17 alpha tc2 custom partitioning bootloader on root partition leaves the dis...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 17
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedBlocker
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-18 05:54 UTC by Reartes Guillermo
Modified: 2013-01-10 06:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-20 16:57:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
mbr after performing a f17 alpha tc2 install (512 bytes, application/octet-stream)
2012-02-18 05:54 UTC, Reartes Guillermo
no flags Details
/var/log/anaconda after install (146.81 KB, application/x-gzip)
2012-02-18 05:58 UTC, Reartes Guillermo
no flags Details
anaconda log (15.56 KB, text/plain)
2012-02-20 17:47 UTC, Reartes Guillermo
no flags Details
anaconda program (368.31 KB, text/plain)
2012-02-20 17:47 UTC, Reartes Guillermo
no flags Details
anaconda storage (1.13 MB, text/plain)
2012-02-20 17:51 UTC, Reartes Guillermo
no flags Details
anaconda if (99 bytes, text/plain)
2012-02-20 17:52 UTC, Reartes Guillermo
no flags Details

Description Reartes Guillermo 2012-02-18 05:54:00 UTC
Created attachment 564040 [details]
mbr after performing a f17 alpha tc2 install

Description of problem:

When installing with custom partitioning and selecting to install the
bootloader in the root partition, after reboot the firmware will
not find anything in the mbr. A manual grub reinstall is requiered to restore boot capabilities.

Anaconda was kind enough to not delete the disk's partitions. :-)

Version-Release number of selected component (if applicable):
F17aTC2, KDE-LiveCD

 
Actual results:

unbotable system for ANY os installed on the system

Expected results:


Additional info:

Please make sure this does not get to the alpha...

Comment 1 Reartes Guillermo 2012-02-18 05:58:37 UTC
Created attachment 564041 [details]
/var/log/anaconda after install

anaconda.ifcfg.log
anaconda.log
anaconda.program.log
anaconda.storage.log

Comment 2 Chris Lumens 2012-02-20 15:00:03 UTC
Please attach log files as individual, uncompressed attachments.  Doing anything else prevents us from searching bugzilla in the future.  Thanks.

Comment 3 Reartes Guillermo 2012-02-20 17:47:04 UTC
Created attachment 564487 [details]
anaconda log

Comment 4 Reartes Guillermo 2012-02-20 17:47:42 UTC
Created attachment 564488 [details]
anaconda program

Comment 5 Reartes Guillermo 2012-02-20 17:51:23 UTC
Created attachment 564490 [details]
anaconda storage

Comment 6 Reartes Guillermo 2012-02-20 17:52:08 UTC
Created attachment 564491 [details]
anaconda if

Comment 7 Reartes Guillermo 2012-02-20 17:55:15 UTC
I downgraded systemd but no effect.

Once in xorg failsafe, individual (ad hoc definition: program that seems to not to use some service or librarie) programs do work at normal speed. For example glxgears worked, but firefox exhibited the slowness.

Comment 8 Reartes Guillermo 2012-02-20 17:56:42 UTC
Sorry, please ignore my previous post, it is for another bugreport.

Comment 9 Brian Lane 2012-02-21 00:54:35 UTC
grub2 doesn't support installing to a partition. You need to install it to the mbr. Anaconda shouldn't allow this to happen.

Comment 10 Reartes Guillermo 2012-02-21 22:08:59 UTC
> grub2 doesn't support installing to a partition. 
> You need to install it to the mbr. 
> Anaconda shouldn't allow this to happen.

That is correct, that is why i choose it, to see how f17 handled it. Maybe the option should not be anymore (as long as grub2 is the bootloader to be installed).
Or maybe some method for that option to be grayed out. But in this case it was selectable so i tested it.

But even if the option is not suposed to be used, it actually touched the mbr. the expected behaviour is to either install grub2 in the root partition or fail and display an error message.

In no way should this option lead to any codepath that can write the mbr. (in fact, not even read it, because the caption of the option clearly says that any actions will be performed over the root partition).

Comment 11 Tim Flink 2012-02-21 22:49:08 UTC
Since you need custom partitioning in order to hit this bug, I don't think it's alpha blocker [1] material. Final, maybe. Alpha, no.

-1 alpha blocker
-1 alpha NTH

[1] http://fedoraproject.org/wiki/Fedora_17_Alpha_Release_Criteria

Comment 12 Adam Williamson 2012-02-21 23:02:25 UTC
bcl: erm, grub2 does allow installing to a partition, they just don't recommend it. we actually specifically added code in anaconda to pass the --force parameter which is required when installing grub2 to a partition. From pyanaconda/bootloader.py:

    def install(self):
        # XXX will installing to multiple drives work as expected with GRUBv2?
        for (stage1dev, stage2dev) in self.install_targets:
            args = ["--no-floppy", self.grub_device_name(stage1dev)]
            if stage1dev == stage2dev:
                # This is hopefully a temporary hack. GRUB2 currently refuses
                # to install to a partition's boot block without --force.
                args.insert(0, '--force')

I agree with Tim that this isn't Alpha blocking as it's outside the default install parameters that are all we support for Alpha. I'm +/-0 on NTH, since it would be nice for this to work, I guess.

The initial description worries me somewhat as it implies anaconda somehow wipes whatever was previously in the MBR when this happens. If that's true, it may be a bigger issue. We should test and check that.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 13 Reartes Guillermo 2012-02-21 23:18:40 UTC
> The initial description worries me somewhat as it implies
> anaconda somehow wipes whatever was previously in the MBR
> when this happens. If that's true, it may be a bigger 
> issue. We should test and check that.

After reboot i was forced to boot sysrescuecd and install grub again.
So, yes, it wiped the mbr instead of reporting that grub2 failed to install.

Sadly, i am still being hit by "Bug 795050" on that system, so i don't know if i will be able to try reinstalling with rc4 (wich is currently being downloaded).

I think this slould not reach release. I only installed one system, it is F15 + Other OS + F17a + OpenSuse. So it is still grub_legacy based. The mbr wiped contained generic code put by opensuse.

Comment 14 Adam Williamson 2012-02-21 23:21:39 UTC
I just tested and cannot reproduce the result. I installed F16 with grub2 in the MBR (/dev/vda), then installed F17 and told it to install grub2 to the root partition of the F17 system (/dev/vda5). On reboot, it correctly loads F16's grub2 from the MBR - I see the F16 kernels and can boot to F16 just fine. So I'm definitely not reproducing the 'MBR wipe' scenario.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 15 Adam Williamson 2012-02-21 23:29:05 UTC
I also find that if I add a chainloader entry to F16's grub2.cfg, I can properly chainload the F17 install - showing that installation of grub2 to the root partition of the F17 install worked correctly.

I can't see anything in your logs which shows either a failure installing grub2 to the root partition or that would result in the previous MBR being wiped. Are you totally sure anaconda caused this? I really can't get something similar to happen.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 16 Robyn Bergeron 2012-02-22 02:43:55 UTC
-1 alpha blocker, -1 NTH, as it's outside the criteria for alpha, but am with adam on the "let's make sure it's not an MBR wipe" testing, or seeing if anyone can duplicate the problem here.

Comment 17 Rex Dieter 2012-02-22 15:40:44 UTC
Seems I can reproduce this using RC4 (kde live x86_64).  guess I'll try again using mbr (default) this time.

Comment 18 Adam Williamson 2012-02-22 16:37:55 UTC
rex: please, if it's not too late, take a copy of all the anaconda logs from your reproducer before 'trying again'...



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 19 Adam Williamson 2012-02-22 17:07:55 UTC
reartes' MBR looks like it has NetBSD's bootloader in it, based on the strings:

http://wiki.netbsd.org/how_netbsd_boots_on_x86/



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 20 Adam Williamson 2012-02-22 17:13:25 UTC
I'm wondering if the cause of this is the change we implemented to mark the protective MBR as active. I do see:

21:06:13,516 DEBUG storage: Set pmbr_boot on parted.Disk instance --
  type: gpt  primaryPartitionCount: 7
  lastPartitionNumber: 7  maxPrimaryPartitionCount: 128
  partitions: [<parted.partition.Partition object at 0x27c1050>, <parted.partition.Partition object at 0x27c13d0>, <parted.partition.Partition object at 0x27c1150>, <parted.partition.Partition object at 0x27c1590>, <parted.partition.Partition object at 0x27c1710>, <parted.partition.Partition object at 0x27c1890>, <parted.partition.Partition object at 0x27c1a10>]
  device: <parted.device.Device object at 0x27b5450>
  PedDisk: <_ped.Disk object at 0x27c3e18>

in reartes' storage.log.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 21 Adam Williamson 2012-02-22 17:31:26 UTC
For the record: rex's case seems to have been user error, he chose to install the bootloader to the first partition on a system which had no pre-existing bootloader in the MBR, and that config is simply non-bootable by definition, anaconda did nothing wrong there.

So we can discard rex's case, we have reartes' case and also jreznik's case -  https://bugzilla.redhat.com/show_bug.cgi?id=796261 - to look into.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 22 Adam Williamson 2012-02-22 18:26:32 UTC
So I just did an openSUSE 12.1 install, told it to install its bootloader to the MBR, and it installs a regular grub-legacy, definitely does not look like reartes' attachment - https://bugzilla.redhat.com/attachment.cgi?id=564040 - at all. Of note is that openSUSE doesn't appear to default to installing a bootloader to the MBR, at least if your disk already contains one, it defaults to installing bootloader to its root / boot partition. So I rather think Reartes didn't have grub in the MBR at all, and what was there didn't come from openSUSE. but it's hard to be sure.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 23 Adam Williamson 2012-02-22 20:02:46 UTC
now I tested installing F17 Alpha RC4 from 'DVD' (this is all in a KVM) alongside the openSUSE install, telling it to put the bootloader on root partition not MBR: install succeeded with no errors, system reboots to openSUSE as expected.

Comment 24 Reartes Guillermo 2012-02-22 20:57:27 UTC
My original MBR prior to F17 A rc2 install contained "generic code", that was put
there by opensuse because i installed opensuse's grub on that root partition. I do not use nor have installed recently any BSD flavour.

I only tested/installed F17 KDE LiveCDs

I tested again with the rc2 (the only one i can boot due another bug) and i could not reproduce the bug. Note: the MBR contains grub1 installed from systemrescuecd. So it is not exactly the same test case.

I will later try to reproduce it reinstalling opensuse in the same way and re-doing the rc2 install, probably in the weekend, just to be sure.

The most important part is that is not as widespread as i initially thought and
that is a good thing.

regarding comment #20:
 * the boot disk is an ssd with a MBR partition scheme, there are four more data disks, they are all GPT partitioned.

Comment 25 Adam Williamson 2012-02-22 21:55:59 UTC
I'm not quite sure what SUSE means by 'generic code'. You have to have *some* kind of a bootloader in the MBR in order to, well, boot. What you attached certainly *looks* like the bootloader netbsd uses, judging from the strings. It certainly isn't grub.

My vote on this is -1 blocker as we have no other reports of it, and I couldn't reproduce either with an install alongside F16 or an install alongside openSUSE.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 26 Tim Flink 2012-02-22 22:23:23 UTC
We have -3 blocker votes and this seems to be related to some non-standard setups that are outside of the alpha release criteria [1] if there is indeed a bug here.

Rejecting as Alpha Blocker.

[1] http://fedoraproject.org/wiki/Fedora_17_Alpha_Release_Criteria

Comment 27 Adam Williamson 2012-05-08 06:21:29 UTC

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 28 Jesse Keating 2012-07-19 18:50:19 UTC
Is this still a problem with F17 final?

Comment 29 Reartes Guillermo 2012-07-20 16:49:47 UTC
I am not able to test for this bug at the moment, since my setup changed completely and cannot be changed. The best course of action might be to close the bug-report (since F17 was released) and hope for the best.


Note You need to log in before you can comment on or make changes to this bug.