Bug 449957 - mkdumprd ignores /etc/sysconfig/mkinitrd
Summary: mkdumprd ignores /etc/sysconfig/mkinitrd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: kexec-tools
Version: 9
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 449964
TreeView+ depends on / blocked
 
Reported: 2008-06-04 14:07 UTC by Jan Kratochvil
Modified: 2008-06-04 14:51 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-06-04 14:27:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
/sbin/mkdumprd fix. (263 bytes, patch)
2008-06-04 14:07 UTC, Jan Kratochvil
no flags Details | Diff

Description Jan Kratochvil 2008-06-04 14:07:23 UTC
Description of problem:
While using qemu-kvm to run a -snapshot copy of my system I need to provide
custom configuration for /sbin/mkinitrd.  This configuration is ignored by
/sbin/mkdumprd and so the crash test in qemu-kvm fails as it has no device to
dump the data to.

My native system uses ahci.ko while qemu-kvm needs ata_piix.ko.

Version-Release number of selected component (if applicable):
kernel-2.6.25.3-18.fc9.x86_64
kvm-65-7.fc9.x86_64
kexec-tools-1.102pre-8.fc9.x86_64
mkinitrd-6.0.52-2.fc9.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. echo 'MODULES="$MODULES ata_piix"' >>/etc/sysconfig/mkinitrd
2. Install new kernel or run
   mkinitrd -f /boot/initrd-2.6.25.3-18.fc9.x86_64.img 2.6.25.3-18.fc9.x86_64
3. Run qemu-kvm:
   sync;hdparm -f /dev/sda{,1,2,3} /dev/mapper/luks-sda{2,3};nice qemu-kvm -hda
/dev/sda -snapshot -net nic -net tap -serial stdio -m 384 -smp 1
4. Run inside qemu-kvm: service kdump start
5. Run inside qemu-kvm: echo c >/proc/sysrq-trigger

Actual results:
Freeing unused kernel memory: 356k freed
Write protecting the kernel read-only data: 1120k
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Loading scsi_mod.ko module
SCSI subsystem initialized
Loading sd_mod.ko module
Driver 'sd' needs updating - please use bus_type methods
Loading libata.ko module
Loading ahci.ko module
Loading jbd.ko module
Loading mbcache.ko module
Loading ext3.ko module
Loading dm-mod.ko module
input: ImExPS/2 Generic Explorer Mouse as
/devices/platform/i8042/serio1/input/input2
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Creating Block Devices
Creating block device ram0
Creating block device ram1
Creating block device ram10
Creating block device ram11
Creating block device ram12
Creating block device ram13
Creating block device ram14
Creating block device ram15
Creating block device ram2
Creating block device ram3
Creating block device ram4
Creating block device ram5
Creating block device ram6
Creating block device ram7
Creating block device ram8
Creating block device ram9
hwclock: can't open '/dev/misc/rtc': No such file or directory
Saving to partition /dev/sda2
dd: writing '/dev/sda2': No space left on device
120633+0 records in
120632+0 records out
Attempting to enter user-space to capture vmcore

Expected results:
Freeing unused kernel memory: 356k freed
Write protecting the kernel read-only data: 1120k
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Loading scsi_mod.ko module
SCSI subsystem initialized
Loading sd_mod.ko module
Driver 'sd' needs updating - please use bus_type methods
Loading libata.ko module
Loading ahci.ko module
Loading jbd.ko module
Loading mbcache.ko module
input: ImExPS/2 Generic Explorer Mouse as
/devices/platform/i8042/serio1/input/input2
Loading ext3.ko module
Loading dm-mod.ko module
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Loading ata_piix.ko module
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14
ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15
ata1.00: ATA-7: QEMU HARDDISK, 0.9.1, max UDMA/100
ata1.00: 195371568 sectors, multi 16: LBA48 
ata1.00: configured for MWDMA2
ata2.00: ATAPI: QEMU DVD-ROM, 0.9.1, max UDMA/100
ata2.00: configured for MWDMA2
scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    0.9. PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 195371568 512-byte hardware sectors (100030 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support
DPO or FUA
sd 0:0:0:0: [sda] 195371568 512-byte hardware sectors (100030 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support
DPO or FUA
 sda: sda1 sda2 sda3
sd 0:0:0:0: [sda] Attached SCSI disk
scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     0.9. PQ: 0 ANSI: 5
Creating Block Devices
Creating block device ram0
Creating block device ram1
Creating block device ram10
Creating block device ram11
Creating block device ram12
Creating block device ram13
Creating block device ram14
Creating block device ram15
Creating block device ram2
Creating block device ram3
Creating block device ram4
Creating block device ram5
Creating block device ram6
Creating block device ram7
Creating block device ram8
Creating block device ram9
Creating block device sda
hwclock: can't open '/dev/misc/rtc': No such file or directory
Saving to partition /dev/sda2
534387+1 records in
534387+1 records out
Saving core complete
md: stopping all md devices.
Restarting system.
machine restart

Additional info:
As /sbin/mkdumprd is derived from /sbin/mkinitrd the removal of the sysconfig
load may be intentional, unaware if some mkinitrd configuration may break mkdumprd.

Comment 1 Jan Kratochvil 2008-06-04 14:07:23 UTC
Created attachment 308342 [details]
/sbin/mkdumprd fix.

Comment 2 Neil Horman 2008-06-04 14:27:20 UTC
You are correct in your initial thought - the removal of the sysconfig load in
mkdumprd was intentional.

we don't always want to mirror the mkinitrd configuration in kdump.  There is a
separate directive in /etc/kdump.conf to do what you need.  Please see the
extra_modules directive.  That should do what you need it to.

Sorry for the confusion.  Please reopen this if the extra_modules directive
doesn't  do what you need it to do.


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