summaryrefslogtreecommitdiffstats
path: root/booty/x86.py
Commit message (Collapse)AuthorAgeFilesLines
* The justConfigFile parameter doesn't do anything on x86, either (#568567).Chris Lumens2010-02-261-6/+3
| | | | | | My previous comments were wrong - we can determine that justConfigFile is useless here as well with the death of flags.setupFilesystems and eliminate it.
* Move bootloader into the Anaconda object.Chris Lumens2010-02-041-3/+3
|
* With flags.setupFilesystems gone, justConfig can be removed from booty.Chris Lumens2009-12-031-3/+3
| | | | | | | ...well, it can mostly be removed. The s390 and x86 classes still do some complicated things that end up with a justConfig test, so it has to stay in those files. However, their write() methods no longer need to accept that parameter.
* Generate more complete device.map grub file when upgrading grub. (#533621)Radek Vykydal2009-11-181-101/+63
| | | | | | | | | | | | | | | | | | | When updating device.map during upgrade of grub, I missed case when driveorder changes between install and upgrade (e.g. when driveorder different from that detected during upgrade had been specified when isntalling) in my previous patch. To fix it, I generate device.map in similar way as when installing (only updating it with some devices that we can know about only from updated device.map - e.g. chainloaded devices). This brought me to another consolidation of the code (started in previous grub installation patches): * remove updateGrub, use writeGrub with upgrade flag instead * move code from writeGrub into separate methods writeGrubConf (called only for grub (re)install) writeSysconfig (called both for grub (re)install and upgrade) writeDeviceMap (called both for grub (re)install and upgrade) * remove old writeSysconfig and updateDeviceMap that were called only from upgradeGrub, use new writeSysconfig and writeDeviceMap with upgrade flag instead.
* Remove another code duplication in grub upgrade code.Radek Vykydal2009-10-291-21/+4
| | | | | This is one of follow-up commits for commit 358a9a34f496fdd2b032edf12274a146b606d1a4, dealing with upgrade.
* Remove code duplication, use fixed code from writeGrub.Radek Vykydal2009-10-291-44/+3
| | | | | This is one of follow-up commits for commit 358a9a34f496fdd2b032edf12274a146b606d1a4, dealing with upgrade.
* Remove target parameter from grub installation code - it is no more needed.Radek Vykydal2009-10-291-11/+3
| | | | | This is one of follow-up commits for commit 358a9a34f496fdd2b032edf12274a146b606d1a4, dealing with upgrade.
* Fix grub stage1 installation for /boot on md raid1.Radek Vykydal2009-10-091-30/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a patch to fix installation of grub in case we have md raid 1 /boot device. I posted similar patch some time ago, Hans reviewed it, but it didn't gather much attention so I was afraid to push it - it changes behavior. Now I decided to do things a bit differently. Also, some weeks ago Hans has pushed a patch fixing bootloader target selection for mdraid (commit 45a7048e5f56316e052e4699b5ec70aa291ddd5e) upon which my patch is standing. So here I come again (sorry for repeating myself). We offer installation into mbr or boot partition (/dev/mdX) in UI. In F11 and RHEL5 if md boot partition was on /dev/sda1 and /dev/sdb1, in case of "mbr" we installed grub twice into mbr of /dev/sda, and in case of "partition" into mbr of /dev/sda and /dev/sdb. Member drive removal in the second case didn't work I think (no boot). Hans's patch changed the behavior (it was expected) - we are really installing bootloader into boot device if /dev/mdX is selected, and if mbr is selected, we are installing twice into mbr of selected drive as before. My patch wants to make it behave "the right" way, that is - install where you were asked to, and be able to boot when one member disk is removed (see bug https://bugzilla.redhat.com/show_bug.cgi?id=213578), so: A) In case of installing into boot partition: install it there in a way that the boot works if one member is removed. B) In case of installing into mbr: iff the disk contains member of boot md array, install also into mbrs of other members. If one member is removed, be able to boot - this is fixed by the patch. Note: I'd like to fix upgrade of grub part too, especially when now the behavior has changed wrt what we write out in grub.conf and /etc/sysconfig/grub. Also UI can writing for mbr could say that we'd install into mbr of other member disks too (if it is the case) If you want details, below are some cases that illustrate the change (also the code may be hard to follow for given case, I can post a test script using which you can get resulting grub input for given case) 1) sda, sdb, install to mbr, /boot is sdb1 works both with and without the patch, the same grub commands are run 2) sda, sdb, sdc, install to mbr of sda, /boot is mdarray of sdb3 and sdc3 without the patch: - boots with both disks, doesn't if any is removed - log: Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd0,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd0,2)/grub/grub.conf grub> Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd1,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd1,2)/grub/grub.conf grub> both disks - OK 2nd disk removed - OK 1st disk removed - OK with the patch: - boots even when any of member disks is removed - log: Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd1,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd1,2)/grub/grub.conf grub> 3) sda, sdb, install to mbr of sda, /boot is mdarray of sda3 and sdb3 without patch: - it boots with both disks, doesn't find stage1 (_ on screen) if any of them is removed - log: Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd1,1) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd1,1)/grub/grub.conf grub> Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd2,1) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd2,1)/grub/grub.conf grub> with the patch: - boots even when one of member disks is removed - log: Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> device (hd0) /dev/sdb grub> root (hd0,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd0,2)/grub/grub.conf grub> Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd0,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd0,2)/grub/grub.conf grub> 4) like 3), but /boot is mdarray of sda3 and sdb2 - notice different partition numbers - removing a specific one of member disks can't work as location of grub.conf file stored in first block of stage2 is shared and so contains only the last grub-installed value. without the patch: - doesn't boot with both disks, doesn't boot with any single disk - log: Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd0,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd0,2)/grub/grub.conf grub> Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd1,1) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd1,1)/grub/grub.conf grub> with the patch: - boots when one second disk is removed, not when the first one is removed (in the sense of boot order) - log: Running... ['/sbin/grub-install', '--just-copy'] Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> device (hd0) /dev/sdb grub> root (hd0,1) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd0,1)/grub/grub.conf grub> Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map'] GNU GRUB version 0.97 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd0,2) Filesystem type is ext2fs, partition type 0xfd grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0) /grub/stage2 p (hd0,2)/grub/grub.conf grub>
* Use type of device rather than name in booty target selection.Hans de Goede2009-09-151-26/+16
| | | | | | | | | We were using startswith "md" together with checking the iswmd option to determine wether an md array is a disk or a partition in the booty sense of things. This is ofcourse wrong, instead we should check if it is an isw mdraid array, or a native metadata mdraid array. This patch fixed this, note the type of isw bios raid using mdraid is "disk".
* Expose common fsset methods and properties in class Storage.David Cantrell2009-09-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add the following methods and properties to class Storage which map through to FSSet methods, modify existing calls to use the method on class Storage: turnOnSwap() mountFilesystems() umountFilesystems() parseFSTab() mkDevRoot() createSwapFile() fsFreeSpace() mtab mountpoints migratableDevices rootDevice Callers no longer need to pass the Anaconda object to the FSSet methods directly. The method on Storage takes care of that. The mtab() method on FSSet is exposed as a property on Storage. The same is true for fsFreeSpace().
* dracut has initrd-generic-<version> instead of initrd-<version> (#519185)Hans de Goede2009-08-261-6/+6
| | | | | | | | dracut using kernel come with a prebuild initrd-generic-<version> instead of initrd-<version>, so if we fail to find /boot/initrd-<version>.img, check for /boot/initrd-generic-<version>.img instead. I've done things this way so that if we ever need to generate system specific (so non generic) initrd's for some reason the code will stay working.
* Pass InstalltData to booty __init__ as it needs access to many of its membersHans de Goede2009-08-051-3/+3
| | | | | | | | | Currently we are passing storage and network to booty's __init__, for writing the necessary kernel cmdline parameters for dracut for international consoles / keyboards booty will also need access to keyboard and language, instead of passing these all in seperately just pass InstalltData to booty's __init__. This is a preparation patch for writing out the dracut kernel cmdline commands for i18n support.
* Add a dracutSetupString method to network.pyHans de Goede2009-08-041-3/+3
| | | | | | | | | Add a dracutSetupString method to network.py, this can be used to ask the Network class to get a dracut setup string to setup the interface needed for a connection to a certain host. This patch also adds code to booty to use this to get kernel cmdline dracut setup commands for any NIC's needed to connect to devices needed for /
* Update device.map when upgrading (#513393)Radek Vykydal2009-07-301-0/+28
|
* Use iutil arch specifiers rather than rhplJeremy Katz2009-07-011-2/+1
| | | | | Switch to using iutil.isFoo() methods rather than checking the value of rhpl.getArch()
* Do not install grub more times than needed.Radek Vykydal2009-06-301-1/+1
|
* Fix grub upgrade (#505966)Radek Vykydal2009-06-251-5/+5
| | | | | We need to run grub 'root' and 'install' commands in one grub shell session when upgrading grub.
* booty changes for iswmdJacek Danecki2009-06-221-6/+12
| | | | This patch adds support for iswmd kernel parameter in booty.
* Catch errors from bootloader installation and tell the user (#502210).Chris Lumens2009-06-051-25/+36
|
* Remove the bootloader --lba32 option.Chris Lumens2009-06-041-21/+5
|
* Initialize x86 class variables before efiBootloaderInfo.__init__()Peter Jones2009-04-281-1/+5
| | | | | | | If self._configdir and self._configname are set after efiBootloaderInfo.__init__() is called, they're never right for EFI systems. If we set them before, efiBootloaderInfo.__init__() only *conditionally* overwrites them, so normal x86 is safe.
* Clean up argument list after changing from rhpl to iutil for execWithRedirectJesse Keating2009-04-171-2/+2
| | | | | | | | | | iutil uses subprocess.Popen and passes in the argv as a list, which causes Popen to use the first entry of the list as the executable, and the rest of the entires as arguments to that executable. This is different from how rhpl did things in which the first argument of the arglist had to be the executable itself. Also iutil expects argv to be a real list not a tuple.
* Make root= line in grub.conf and path spec in fstab consistentHans de Goede2009-03-201-2/+1
| | | | | | | | | booty was using its own code to find out wether to pass in UUID=.... or /dev/.... as root= option, leading to inconsistencies between fstab (/dev/mapper/Volgroup-lv_root) and grub.conf (UUID=...) Harmless, but confusing. This patch fixes this by removing the no longer needed getRootDevName method from booty and instead using device.fstabSpec
* Fix writing the default= line in grub.conf (#490756).Chris Lumens2009-03-191-1/+1
| | | | | This was caused by trying to compare an instance of an object with a string, which of course is never going to work.
* Fix booty for dmraidHans de Goede2009-03-091-23/+28
| | | | | | Booty was expecting the xxxxxxx part of /dev/xxxxxx paths instead of new storage device names, this patch fixes this, making booty work on dmraid with the new storage code.
* Stop with the fsset usage.David Lehman2009-03-051-7/+7
|
* Fix passing a device vs. passing a device's name in several more places.Chris Lumens2009-03-041-3/+3
|
* Adapt getPhysicalDevices to the new storage code.Chris Lumens2009-03-041-28/+22
|
* bootloader.write takes fewer arguments now, so clean up arg passing.Chris Lumens2009-03-041-1/+1
|
* Move BootyNoKernelWarning into __init__.py and use it.Chris Lumens2009-03-041-1/+2
| | | | | Also, this gets rid of the goofy self.noKernelsWarn method which doesn't serve any useful purpose now that booty's part of anaconda.
* We're not even using the results of getImages here.Chris Lumens2009-03-041-2/+1
|
* Use anaconda's provided rootDevice instead of performing another lookup.Chris Lumens2009-03-041-3/+3
|
* Add a storage instance to all bootloaderInfo subclasses.Chris Lumens2009-03-041-9/+9
| | | | | | We could pass storage around to all the various functions that will need it, but that's a big mess. It's far easier to just set this when we create the bootloaderInfo class and never worry about it again.
* Remove all uses of fsset.getEntryByMountPoint.Chris Lumens2009-03-041-35/+33
|
* Don't use rhpl.executil anymore.Chris Lumens2009-03-041-10/+10
|
* Move each bootloader class into its own file.Chris Lumens2009-03-041-0/+567