bz865162
Someone need this for kexec to load memdisk which is smaller then 32k.
kexec-tools-2.0.3-Load-bzImages-smaller-than-32-KiB.patch
bz849650, for efi booting system we need this acpi_rsdp kernel argument
after vivek's secure boot work we maybe need drop this one.
kexec-tools-2.0.3-kdump-pass-acpi_rsdp-to-2nd-kernel-for-efi-booting.patch
For devices with filesystem, udev /dev/disk/by-uuid/* links are usually
reliable. But one exception is multipath devices, child and top layer
device may have same uuid.
As dm devices maintain /dev/mapper/* as persistent names, so converting to
/dev/mapper/* firstly then try by-uuid/* and by-id/*
Also because user know better what's the persistent name we just document well
to suggest user use persistent name in kdump.conf. it's suggested to
to use lvm or multipath canonical names or uuid/label.
Updated kdump.conf examples and related chunks in kexec-kdump-howto.txt
use lvm /dev/vg/<devname> in examples
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Add below two commits from upstream:
1.
commit c96e7736d85e40685939011e6d51b3c0a28739a3
Author: Vivek Goyal <vgoyal@redhat.com>
Date: Wed Jul 18 09:33:51 2012 -0400
vmcore-dmesg: Do not write beyond end of buffer
scan_vmcoreinfo() currently assumes that every vmcoreinfo note line ends
with \n and overwrites new line with \0. But last entry in note, CRASHTIME=
does not end with \n and this leads to corrupting memory as we write beyond
end of buffer.
Normally things were fine but when I added some fields to vmcoreinfo, this
bug started showing and vmcore-dmesg started crashing.
I am planning to send a patch to fix this in kernel but it might be good
idea to handle this case in user space too so that vmcore-dmesg works
fine with cores of older kernels.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2.
commit df88cab364cd1a3b8c992042d62efe5e350e6b2a
Author: Vivek Goyal <vgoyal@redhat.com>
Date: Mon Jul 30 13:32:48 2012 -0400
vmcore-dmesg: vmcore-dmesg: Make it work with new structured logging format
Now kernel has made kernel logging structured and exsisting vmcore-dmesg
does not work with this new format. Hence kernel version 3.5 is broken. In
3.6 now a kernel patch has been put which exports relevant fields. This
patch parses those fields and makes vmcore-dmesg work with new logging
format.
Currently it does not display log levels or dictionary. I personally think
that log levels are not very useful and it also requires additional kernel
patches so that log levels are not bitfields and relevant information is
exported to user space properly.
Concept of dictionary is new and relevant information is exported. One can
possibly enahnce vmcore-dmesg to also print dictionary contents based on
a user command line option.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
F18 switch to use grub2 for efi booting, add the config files
to bootloaders array.
Tested with F18 alpha.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
For raw device dump, also pass persistent name to dracut --device to fix
the device renaming problem.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
currently --mount param are retrieved from /proc/mounts, but the device
name could be renamed in initramfs. So here convert them to persistent
names before passing to dracut
lvm canonical dev name is /dev/mapper/lvname-link which will be showed
in /proc/mounts
here fix get_mp function by using findmnt utils to find the mount point.
This patch depends on below dracut patch:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2903
[chaowang]:
in case device is not mounted we should not echo the mount line in to_mount()
use findmnt -n to strip the header line
for nfs don't pass persistent name to dracut
[vivek]:
improve variable names
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
In initramfs we should use persistent name created by udev to avoid
device rename issue.
fix by using udev persistent name when we copy the kdump.conf
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Copy the function get_persistent_dev from dracut for us to handle the
persistent name issues.
[vivek] add error handling for get_persistent_dev
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
When we intall kdump.conf to initramfs we have converted the UUID and LABEL
to device name. So in initramfs these convert code is not used indeed.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Copy comments from the bz:
In rhel7 onwards, we will require dump target filesystem to be mounted in first kernel so that kdump can make use of same mount options instead of trying to come up with its own mount options. This should make mounting that file system safer. Also it reduces complexity in kdump code.
That will mean one needs to put an entry for the dump file system in /etc/fstab
so that after reboot when kdump service starts, it can find the dump target and build initramfs instead of failing.
For raw device upon complex storage such as multipath and iscsi
dracut does not resolve the module dependency automaticlly,
I sent a patch for the device pass via dracut argument "--device"
see below for reference:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2836
Add --device <device> in mkdumprd for raw dump to fix this issue.
Testing:
raw dump on iscsi targets.
Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: Chao Wang <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Original host_fs_types could only contain one iscsi slave,
This is due to the check_block_and_slaves will return once the helper function
return TRUE, so only one slave with fs type will be added to host_fs_types[]
Thus, there will no chance to setup other slaves in kdump iscsi setup routine.
Use for_each_host_dev_and_slaves_all to setup all slaves.
Tested by chaowang and myself.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Add two radiobuttons for user to select automatic/manual memory reserve
For fedora they will not be added.
When switching from manual configure to auto reserve, the memory size and
summary widgets will be dimmed.
Testing below cases on virtual machine, all cases need reboot and verify:
Fedora:
1. Enable/Disable kdump
2. change reserve size
3. change kdump.conf content
4. Auto -> Manual
5. Manual -> Auto
RHEL:
modify the /etc/redhat-release and install the rhel7 kernel rpm in fedora vm.
1. auto reservation
2. manual specify reserve mem size
3. enable/disable kdump
4. change kdump.conf content
Vivek: label with text "Memory To Be Reserved"
Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
The '_' before UI string is for Alt+TheFirstCharacter shortkey
ie. Press Alt+T will focus on the self.totalMem widget.
But the totalMem and systemUsableMem are not configurable, so
this is in fact unnecessary. OTOH, The 'Alt+T' will be used in later
patches, so remove these two here.
Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Pygtk documentation says the page size field is not used, but actually
there will be a gtk warning below:
/usr/share/firstboot/modules/firstboot_kdump.py:216: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
self.kdumpMemspin = gtk.SpinButton(self.memAdjustment, 0, 0)
Fix it by setting the last field to 0.
Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Per vivek, update all kernels configs in grub config file make more sense.
use --update-kernel=ALL to update all grub entries.
Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Memory reservation could fail, so add a new widget to show the
actual reserved size. If crashkernel is set but reserved size is
0, we still regard kdump is enabled, the actual reserved widget
just show the reservation status.
vivek: label with text "Memory Currently Reserved"
Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Per discussion in kdump meetint, add crashkernel=auto to rhcrashkernel-param
script for rhel7 for testing. Anaconda will call this script to add the cmdline
instead of hardcode it.
Signed-off-by: Dave Young <dyoung@redhat.com>
Fedora firstboot will alert about requiring a kernel-kdump
for x86, this is not true. In fact all arches what we support
do not depend on kernel-kdump any more.
Thus remove the kernel-kdump handling in firstboot.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
elilo is deprecated in fedora, so remove the elilo support in firstboot module.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
Update to use grub2, also update the config file names
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
Copying something from old bug 688150:
Steps to Reproduce:
1.Go through FirstBoot process while get to Kdump
2.Change Kdump memory
3.Press Finish
4.A window pops-up (Changing Kdump setting requires ...)
5.Do not press "No" or "Yes" but pres the "X" in the right up corner.
Actual results:
The effect of this action is the same as pressing "YES"
Expected results:
The effect of this action is the same as pressing "NO
So this patch fix to only reboot when rc == gtk.RESPONSE_YES.
Port from below patch from rhel:
commit ed0c89d8e42b9205671cb6c81f9f73c275bee72f
Author: amwang <amwang@redhat.com>
Date: Thu Mar 17 10:07:52 2011 +0000
Resolves: bug 688150.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
The text of gtk checkbutton for enable kdump was not localized.
Add gettext _() around it to make it translatable.
[update]:
-add changelog
Port below patch from rhel:
commit ce18ccc9557137b276471fbe200d7a18ce90fcf5
Author: amwang <amwang@redhat.com>
Date: Mon Aug 9 08:20:34 2010 +0000
Resolves: bug 619744.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
Make kdump configurable in firstboot
Add an advanced kdump config text widget, so user can configure
kdump.conf in firstboot,
[update]:
-add changelog
-remove unused variable
Port below patch from rhel:
commit e5ac50339e73b11cd9d5ba91712c43cce7ffcbcb
Author: amwang <amwang@redhat.com>
Date: Thu Mar 17 09:18:13 2011 +0000
Resolves: bug 598064.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
in case kdump is disabled, we also need to disable the kdump service
This patch is ported from below rhel patch, changed below two issues though:
1. fixed the systemctl line
2. dropped an useless line for using 0 for gtk adjustment page_size field.
see http://www.pygtk.org/pygtk2tutorial/sec-SpinButtons.html for the field doc.
Rhel6 commit is below:
commit c5735dee743fa41d14635fe2fbf5f48264bc36f6
Author: nhorman <nhorman@redhat.com>
Date: Thu Jul 29 15:52:00 2010 +0000
Resolves: bz 594830
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz805782
the text domain should be kexec-tools instead of firstboot,
or it kexec-tools translation will not find the right .mo
Backport from rhel6 bz619061
commit 18de84f91906ec41b2640f67d21eef39ecb0833b
Author: amwang <amwang@redhat.com>
Date: Fri Jul 30 02:45:52 2010 +0000
Resolves: bug 619061.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Add force_rebuild option in kdump.conf
Some user need always force rebuild the dumprd, add an kdump.conf
option force_rebuild here. If force_rebuild is set to 1
kdump initrd will be rebuilt every time then the service starts.
Testing:
Tested below cases:
force_rebuild
force_rebuild 0
force_rebuild 1
force_rebuild 2
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves bz845916.
For raw dump code below:
$CORE_COLLECTOR /proc/vmcore | dd of=$1 bs=$DD_BLKSIZE >> /tmp/dd_progress_file 2>&1 || return 1
in case pipe fails it will still return 0, Fix this by return the PIPESTATUS[0] at the end of this fuction.
Signed-off-by: Chao Wang <chaowang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Kdump dracut hooks need to enter emergency shell, currently it directly call
"sh -i -l", with recent dracut this does not work anymore without proper ctty.
change to call dracut lib function _emergency_shell instead of directly call
'sh -i -l'
This patch depends on dracut patch:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2821
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Currently net options means either nfs or ssh dump.
Better to split these two into standalone options. That's more clear to user.
after the split, ssh dump need user specify "ssh user@host"
nfs dump need user specify "nfs host:nfsshare"
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
dump_nfs mount the nfs share to /mnt, it's not what we expected.
Change to use dracut fstab mount infrastructure for this.
After the fix nfs dump is just same as localfs dump.
The --mount for nfs does not work before, it depend on the upstream patch:
1. dracut fix to autoload nfs.ko in case nfs4. the patch post as below:
http://permalink.gmane.org/gmane.linux.kernel.initramfs/2768
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
nfs will be handled in fstab-sys as well as localfs.
so rename dump_localfs to dump_fs firstly.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
in dump_localfs, we should error out if fstab mount fails
Also error out if mkdir fails.
vivek: display error message for debugging purpose.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
We should use systemctl instead of service to start/restart the kdump service
update kexec-kdump-howto.txt as well.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
we now switched to systemd, 'service kdump propagate' does not work anymore.
update the alert message to use 'kdumpctl propagate'
vivek: update kexec-kdump-howto.txt as well.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
For "-c /dev/null" Harald mentioned that it is useless.
In fact, dracut code [[ -f /dev/null ]] will return false thus it will still use
the default config file
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Cong Wang <amwang@redhat.com>