This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 444497

Summary: preupgrade doesn't work with software raided /boot
Product: [Fedora] Fedora Reporter: mschout
Component: preupgradeAssignee: Seth Vidal <skvidal>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 9CC: bbaetz, christof, ihok, katzj, mail, nhruby, red, russ+bugzilla-redhat, wwoods
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-01-07 04:08:31 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description mschout 2008-04-28 14:21:01 EDT
Description of problem:

I installed preupgrade from updates-testing, and tried to upgrade to rawhide. 
The packages downloaded successfully, and it downloaded the boot images and set
up grub.  However, when rebooting, it fails with an error that it cannot find
/upgrade/stage2.img.

The grub config entry kernel line preupgrade generated was:

        kernel /upgrade/vmlinuz preupgrade lang=en_US.UTF-8 keymap=us
stage2=hd:md0:/upgrade/stage2.img

I managed to get past this by changing "hd:md0" to "hd:sda1", which is one of
the components of md0.  That gets past the error and anaconda starts normally,
but I then got an unhandled exception when it tried to set up md0 (most likely
because sda1 was already in use).

So it appears that the initrd generated by preupgrade does not start up the md
arrays, and as a result of this, it cannot find the stage2 image.

Version-Release number of selected component (if applicable):

preupgrade 0.9

How reproducible:

Run preupgrade on a machine with /boot on a md raid device, and reboot when it
is ready to finish the upgrade.
 
Actual results:

anaconda fails to find /upgrade/stage2.img because md devices are not available.


Expected results:

anaconda starts successfully.
Comment 1 Will Woods 2008-04-28 14:44:00 EDT
Preupgrade just uses anaconda's initrd (aka stage1). stage1 does not handle
setting up any LVM or RAID devices - that's all done in stage2. GRUB also
doesn't understand LVM or RAID, which is why /boot is a plain disk partition 99%
of the time. And that's why we put stage2.img in /boot.

The other possible option for /boot is software RAID1, which looks like a plain
disk partition to GRUB, and therefore works fine for booting. But we don't
handle that in preupgrade.

So we need to handle the RAID1 case for /boot in bootpath_to_anacondapath().
Comment 2 Seth Vidal 2008-04-28 14:45:18 EDT
Can you try out 0.9.2 from koji
http://koji.fedoraproject.org/koji/packageinfo?packageID=6045

and tell me if it gets it right?

Thanks
Comment 3 mschout 2008-04-28 15:31:49 EDT
same result with preupgrade-0.9.2-1.fc8
Comment 4 mschout 2008-04-28 15:47:32 EDT
I should have mentioned that I am indeed using RAID1, which is why it works for
grub. Obviously I could get around that by breaking the raid1 on /boot before
running preupgrade, then re-mirroring after the fact.  But having /boot on a
raid1 partition is not an unusual setup IMO :).
Comment 5 Seth Vidal 2008-04-28 15:58:00 EDT
okay, so I'm confused - are you saying md0 doesn't work for grub on that raid1?
Comment 6 mschout 2008-04-28 16:07:38 EDT
sorry.  md0 *does* work for grub (since it is raid1, and grub sees it as a plain
partition).

Basically, I am just saying that the scenario Will describes above is indeed the
case with my system.
Comment 7 Seth Vidal 2008-04-28 16:22:46 EDT
okay, so are you saying the first comment on this report is not true? That it
did work with hd:md0?

Your last comment said it DOES work, so when did it NOT work?
Comment 8 mschout 2008-04-28 16:31:18 EDT
no. the report is accurate.  booting the *OS* works.  Booting preupgrade works,
but stage2 of preupgrade can not load because the md device has not been set up.
 Because of this, the upgrade can not be started. Sorry, I guess I should not
have bothered clarifying this because it apparently has only caused confusion :).

The bottom line is that preupgrade does not work because it can not load
stage2.img on a machine where /boot is a RAID1.  See Will Woods' comment above
for explanation why, and suggestion on how to fix.

If its still unclear, let me know :).
Comment 9 Seth Vidal 2008-04-28 16:32:13 EDT
So, apparently wwoods has groked what you meant here.
ignore my question.
Comment 10 Bug Zapper 2008-05-14 06:19:53 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Dominic 2008-08-22 07:59:46 EDT
Is there a recommended workaround to make this upgrade work successfully on systems where /boot is mounted on a software raid-1 partition?
Comment 12 mschout 2008-08-22 09:31:44 EDT
Break the mirror, upgrade, then remirror after the upgrade.

e.g. something like this (untested)

mdadm /dev/md0 --fail /dev/sda1
mdadm /dev/md0 --remove /dev/sda1
mdadm --zero-superblock /dev/sda1

(repeat for other raided devices)

assign a new UUID to /dev/sdb1 or else the upgrade will complain

tune2fs -U random /dev/sda1

change /etc/fstab to use /dev/sda1 instead of /dev/md0 etc.

reboot to make sure it works.

Then do the preupgrade/upgrade

afterwards, remirror.

If you don't want do do all of that, burn a DVD and do an upgrade that way.
Comment 13 Will Woods 2008-12-15 12:11:24 EST
This should work as expected in the next preupgrade build.

(Actually it should have worked in the current release - preupgrade-1.0.0 - but bug 473103 got in the way.)
Comment 14 Fedora Update System 2008-12-16 17:35:41 EST
preupgrade-1.0.1-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/preupgrade-1.0.1-1.fc8
Comment 15 Fedora Update System 2008-12-16 17:38:31 EST
preupgrade-1.0.1-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/preupgrade-1.0.1-1.fc10
Comment 16 Fedora Update System 2008-12-16 17:38:31 EST
preupgrade-1.0.1-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/preupgrade-1.0.1-1.fc9
Comment 17 Fedora Update System 2008-12-21 03:22:58 EST
preupgrade-1.0.1-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-11587
Comment 18 Fedora Update System 2008-12-21 03:38:12 EST
preupgrade-1.0.1-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-11540
Comment 19 Fedora Update System 2008-12-21 03:45:31 EST
preupgrade-1.0.1-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-11437
Comment 20 Fedora Update System 2009-01-07 04:07:40 EST
preupgrade-1.0.1-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2009-01-07 04:08:15 EST
preupgrade-1.0.1-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Fedora Update System 2009-01-07 04:24:01 EST
preupgrade-1.0.1-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Davide Repetto 2009-06-15 21:16:07 EDT
Problem still persists in fc10
Comment 24 Will Woods 2009-06-16 10:39:19 EDT
Support for preupgrade with /boot on RAID was removed in preupgrade-1.1.x due to incompatibility with the Fedora 11 installer - see bug bug 500004.

If you get a traceback when attempting a preupgrade with /boot on RAID, see bug 504826.