summaryrefslogtreecommitdiffstats
path: root/booty/bootloaderInfo.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix instData removal mis mergeHans de Goede2010-02-161-8/+2
| | | | | This reverses 1 chunck of commit d6d4c4800ebc2958eb87a706e4a7c799647ca447 as that chunck was caused by a mis merge (and is wrong).
* Fix a handful of simple pychecker errors.Chris Lumens2010-02-161-1/+1
|
* Move bootloader into the Anaconda object.Chris Lumens2010-02-041-9/+8
|
* Move storage into the Anaconda class.Chris Lumens2010-02-041-2/+2
|
* Move network to the Anaconda object.Chris Lumens2010-02-041-3/+9
|
* Move keyboard to the Anaconda object.Chris Lumens2010-02-041-1/+1
|
* Move instLanguage to the Anaconda object.Chris Lumens2010-02-041-1/+3
|
* Hookup new python EDD code (#478996)Hans de Goede2010-01-281-1/+1
| | | | | | | | Replace all usage of the isys C EDD code with the new storage python EDD code. Note that this moves the sorting of partition.req_disks from devices.py to paritioning.py, because sorting now needs access to the storage object, this also has the added advantange that now we always allocatePartitions in sorted drive order, even in interactive mode.
* make dracut only activate the root LV (#553295)Hans de Goede2010-01-211-1/+1
| | | | | | Currently we are making dracut activate the entire root containing VG, dracut-004 now has support for activating only specified LV's, this patch moves us over to that.
* Emit a dracut setup string for the root device itselfHans de Goede2010-01-141-1/+1
| | | | | | | We were only emitting dracut setup strings for devices the root device depends on, not for the root device itself. This causes non booting systems when the root device itself is of a type which needs a setup string (such as a regular mdraid array).
* Don't write dracut kernel cmdline paramters to anaconda-ks.cfgHans de Goede2009-12-241-2/+6
| | | | | | | Don't write the dynamically generated dracut kernel cmdline parameters to anaconda-ks.cfg. Having them there will result in having some of them twice in the resulting kickstart install, including some which refer to no longer valid UUID's.
* Write dracut rd_NO_foo options to grub.confHans de Goede2009-12-241-1/+12
| | | | | | When we don't specify any MD / LVM / DM / LUKS to activate dracut will activate all found by default, so when we don't specify any write RD_NO_foo to the kernel cmdline in grub.
* Avoid duplicate kernel cmdline options and cleanup booty dracut codeHans de Goede2009-12-241-18/+27
| | | | | | | | | | | It is possible for 2 disks to have the same disk dracut cmdline options, or network cmdline options (if the disks are network devices) for example 2 iscsi disks on the same host. In this case we should only include the specific option once. This patch puts the collection of storage related setupStrings in a function, and makes get() loop over all kernel cmdline providing bits, so that the code for proper whitespace seperation of various args is not duplicated.
* Add support for whole-disk formatting.David Lehman2009-12-091-1/+5
| | | | Whole-disk formats are recognized but cannot be edited in any way.
* With flags.setupFilesystems gone, justConfig can be removed from booty.Chris Lumens2009-12-031-2/+1
| | | | | | | ...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.
* Copy cio_ignore kernel parameter to zipl.conf on s390 (#475675).David Cantrell2009-11-021-0/+4
| | | | | | Part of the changes necessary for #475675, we need to take the cio_ignore parameter (if it exists) given during installation and write it to the parameter list in /etc/zipl.conf on the target system.
* Remove target parameter from grub installation code - it is no more needed.Radek Vykydal2009-10-291-2/+1
| | | | | This is one of follow-up commits for commit 358a9a34f496fdd2b032edf12274a146b606d1a4, dealing with upgrade.
* Make bootLoaderInfo new-style class, so that its properties work correctly.Radek Vykydal2009-10-151-1/+1
| | | | | | | | | If the bootLoaderInfo is old-style class, setting of its property drivelist doesn't work, instead the property is overwritten with attribute and therefore for example any following calls of updateDriveList have no effect. AFAIK it doesn't cause problems anywhere at the moment, but I think it should be fixed it in master.
* Do not read DASD data from /tmp/install.cfg in booty (#526354).David Cantrell2009-10-131-2/+0
| | | | The DASD kernel parameters will be coming from DASDDevice objects.
* Fix grub stage1 installation for /boot on md raid1.Radek Vykydal2009-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Really put appended kernel cmdline arguments at the endHans de Goede2009-09-151-8/+16
| | | | | | Due to the auto generation of dracut cmdline, append arguments like "quiet rhgb" would no longer be at the end of the kernel cmdline in grub, making it (slightly) harder to remove them for debugging purposes.
* write ifname=eth#:MAC to kernel cmdline in grub.conf for dracutHans de Goede2009-09-151-1/+1
|
* Make iswmd the defaultHans de Goede2009-09-151-1/+2
| | | | | | Now that we've moved to dracut for the initrd in rawhide, which supports using mdraid for isw metadata raid sets (and uses this by default), make using mdraid for isw metadata raid sets the default.
* initrd-generic.img -> initramfs.imgHans de Goede2009-09-091-1/+1
| | | | | | | We're moving back to %post generation of dracut initrd's due to GPL concerns about shipping pre build initrd's. This means the initrd will no longer be truely generic. To reflect this and make clear it is not an mkinitrd initrd, the name was changed to initramfs.img.
* 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-7/+14
| | | | | | | | 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.
* Add keyboard kernel cmdline options to grub.conf for dracutHans de Goede2009-08-051-0/+1
| | | | Note this requires an updated system-config-keyboard
* Write dracut i18n cmdline options to grub.confHans de Goede2009-08-051-0/+2
|
* Pass InstalltData to booty __init__ as it needs access to many of its membersHans de Goede2009-08-051-12/+11
| | | | | | | | | 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-5/+10
| | | | | | | | | 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 /
* Use dracutSetupString() method to add the kernel parameters needed for dracutHans de Goede2009-08-041-3/+12
|
* Use iutil arch specifiers rather than rhplJeremy Katz2009-07-011-7/+6
| | | | | Switch to using iutil.isFoo() methods rather than checking the value of rhpl.getArch()
* Stop using rhpl.translateJeremy Katz2009-07-011-1/+4
| | | | Use python's gettext module instead of rhpl.translate
* Catch errors from bootloader installation and tell the user (#502210).Chris Lumens2009-06-051-13/+24
|
* Remove the bootloader --lba32 option.Chris Lumens2009-06-041-4/+0
|
* Add a Mac OS boot line to yaboot.conf (#499964).Chris Lumens2009-05-131-3/+6
| | | | | | | | | | The problem is that a Mac filesystem is HFS+, but is not marked bootable. The Apple Bootstrap partition is marked bootable. Therefore we take the stupid test and say if there's a bootable Apple Bootstrap partition on a disk and there's an HFS partition, mark that as the Mac OS partition for the bootloader config. This is about as stupid as what we're doing for DOS filesystems now and is easily screwed up, but it's better than nothing.
* Add "nomodeset" to the list of command line arguments copied to grub.confPeter Jones2009-04-281-1/+1
| | | | | | | "nomodeset" is one of the command line options that it's very likely you'll want post-install if you want it during install. Ergo, this patch adds it to the list of options preserved in the normal bootloader config file after installation.
* Fix another device vs. string problem in EFI bootloader config (#496669).Chris Lumens2009-04-211-4/+4
|
* Clean up argument list after changing from rhpl to iutil for execWithRedirectJesse Keating2009-04-171-5/+5
| | | | | | | | | | 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.
* Fix NameError traceback setting up bootloader in EFI installsWill Woods2009-04-171-2/+2
| | | | | | Gah. I failed to capture the complete traceback, but a quick inspection of addNewEfiEntry() shows that there's no global 'storage' name defined here. I'm guessing it's supposed to be 'self.storage' instead.
* Fix reading the console= parameter from the cmdline (#490731).Chris Lumens2009-04-061-1/+1
| | | | | This should mean that the serial device and options once again get preserved in the installed system's bootloader config.
* Fix testing if a PPC partition is bootable (#492726).Chris Lumens2009-04-011-1/+1
|
* Make root= line in grub.conf and path spec in fstab consistentHans de Goede2009-03-201-15/+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.
* Do not write LV uuid to grub.conf, but the filesystem uuidHans de Goede2009-03-181-7/+5
| | | | | | | | | | | | When re-using an existing LV for /, and thus one which has uuid set in its representing Device, we would write the LV uuid to grub.conf as root= parameter, resulting in a non booting system. Also we no longer keep labels anywhere, so don't look for a label. Note that we are only hitting this with pre-existing LV's because we are not setting / updating the LVDevice's uuid when creating a new one (something which we ought to fix).
* storage.disks never includes disks without media present.Chris Lumens2009-03-171-1/+1
|
* Add mediaPresent and eject to the OpticalDevice class.Chris Lumens2009-03-131-1/+1
| | | | | | | These no longer belong in isys.py as putting them in the classes is much more correct. I also put a mediaPresent method on Device in general. This will come in handy when we start dealing with USB CF readers and similar devices that can be present without having media.
* Fix booty for dmraidHans de Goede2009-03-091-1/+1
| | | | | | 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-1/+1
|
* Fix passing a device vs. passing a device's name in several more places.Chris Lumens2009-03-041-1/+1
|