[PATCH RFC] module-setup.sh: install usb serial driver for ttyUSB0
by Dave Young
In case one want to use usb serial console, we need to pack the usb serial
driver into kdump initramfs so that one can see the console output on the usb
console.
I only handled ttyUSB0, this is like a hard code, but it should be enough for
most cases. Also only install the driver for the ttyUSB0 device.
Tested with adding "console=ttyUSB0" in 2nd kernel commandline.
Tested latest F22 kernel, there's CONFIG_USB_SERIAL_CONSOLE=y, kdump work ok.
Signed-off-by: Dave Young <dyoung(a)redhat.com>
---
dracut-module-setup.sh | 8 ++++++++
1 file changed, 8 insertions(+)
--- kexec-tools.orig/dracut-module-setup.sh
+++ kexec-tools/dracut-module-setup.sh
@@ -626,4 +626,12 @@ installkernel() {
[ "$wdt" = "iTCO_wdt" ] && instmods lpc_ich
instmods $wdt
fi
+
+ if [ -c /dev/ttyUSB0 ]; then
+ _majmin=$(get_maj_min /dev/ttyUSB0)
+
+ _driver=$(readlink /sys/dev/char/$_majmin/device/driver)
+ _driver=$(basename $_driver)
+ instmods $_driver
+ fi
}
7 years, 4 months
Question: is there any automated way of building rpm package?
by HATAYAMA Daisuke
Hello,
Is there any automated way of building rpm package?
That is, installing files such eppic, kexec-tools-po, makedumpfile and kexec-tools with expected file names necessary for installation, place them proper file path location and then execute rpmbuild command.
I first found out there's no Makefile and INSTALL file, and then I tried preparing them manually in an ad-hoc way, but faced build failure several times and gave up.
--
Thanks.
HATAYAMA, Daisuke
8 years, 3 months
[PATCH] mkdumprd: Fix the bug to get persistent device correctly
by Minfei Huang
One filesystem has an unique uuid to detect itself. For btrfs, several
diskes can have the same uuid, and the soft link /dev/disk/by-uuid/$uuid
points the only one disk which is contained in the btrfs.
It may fails to filter out the disk by uuid, although there is a
filesystem on the disk, like btrfs.
In order to get the persistent device, we can use command "blkid".
Signed-off-by: Minfei Huang <mhuang(a)redhat.com>
---
mkdumprd | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/mkdumprd b/mkdumprd
index 4d251ba..5fb578b 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -27,14 +27,14 @@ perror() {
}
get_persistent_dev() {
- local i _tmp _dev
+ local i _tmp _dev _uuid
_dev=$(udevadm info --query=name --name="$1" 2>/dev/null)
[ -z "$_dev" ] && {
perror_exit "Kernel dev name of $1 is not found."
}
- for i in /dev/mapper/* /dev/disk/by-uuid/* /dev/disk/by-id/*; do
+ for i in /dev/mapper/* /dev/disk/by-id/*; do
_tmp=$(udevadm info --query=name --name="$i" 2>/dev/null)
if [ "$_tmp" = "$_dev" ]; then
echo $i
@@ -42,6 +42,18 @@ get_persistent_dev() {
fi
done
+ if [ "x" != "x""$(blkid $1 | grep "UUID")" ]; then
+ _uuid=`blkid $1 | grep "UUID" | awk '{print $2}'`
+ _uuid=${_uuid#*\"}
+ _uuid=${_uuid%\"*}
+ _dev=/dev/disk/by-uuid/$_uuid
+ _tmp=$(udevadm info --query=name --name=$_dev 2>/dev/null)
+ if [ "x" != "x"$_tmp ]; then
+ echo $_dev
+ return
+ fi
+ fi
+
perror "WARNING: Persistent device name of $1 not found. Using $1 as dump target name"
echo $1
}
--
1.9.3
8 years, 3 months
[PATCH 0/4] Dump core correctly to the bind mounted target
by Minfei Huang
Enhance kdump to support bind mounted target, since kdump cann't parse
the bind mounted path.
Following is the testcases which kdump can generate the core sucessfully.
1) rootfs, default path / specified path
2) rootfs with bind mounted path which is in the rootfs device
# cat /etc/kdump | grep ^path
path /var/crash
# mount -o bind /var/crash /mnt/crash
4) rootfs with bind mounted path which is not in the rootfs device
# cat /etc/kdump | grep ^path
path /var/crash
# mount /dev/vdb /mnt
# mount -o bind /var/crash /mnt/crash
5) no-rootfs
6) no-rootfs with bind mounted path which is in the same device
7) no-rootfs with bind mounted path which is not in the same device
8) nfs
9) nfs with bind mounted path which is under the nfs mount point path
# cat /etc/kdump | grep ^nfs
nfs 192.168.122.134:/opt/crash
# cat /etc/kdump | grep ^path
path /var/crash
# mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
# mount -o bind /mnt/nfs/var/crash /mnt/nfs/dump
10) nfs with bind mounted path which is not under the nfs mount point path
# cat /etc/kdump | grep ^nfs
nfs 192.168.122.134:/opt/crash
# cat /etc/kdump | grep ^path
path /var/crash
# mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
# mount -o bind /mnt/nfs/var/crash /mnt/dump
11) nfs which don't specify the nfs option in the /etc/kdump, with bind mounted path which is under the nfs mount point path
# cat /etc/kdump | grep ^nfs
# mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
# cat /etc/kdump | grep ^path
path /mnt/nfs/var/crash
# mount -o bind /mnt/nfs/var/crash /mnt/nfs/dump
12) nfs which don't specify the nfs option in the /etc/kdump, with bind mounted path which is not under the nfs mount point path
# cat /etc/kdump | grep ^nfs
# mount.nfs 192.168.122.134:/opt/crash /mnt/nfs
# cat /etc/kdump | grep ^path
path /mnt/nfs/var/crash
# mount -o bind /mnt/nfs/var/crash /mnt/dump
13) ext4
14) ext4 with bind mounted path which is under the ext4 mount point path
15) ext4 with bind mounted path which is not under the ext4 mount point path
16) btrfs
17) btrfs with subvolume which mounts under mount point path
18) btrfs with subvolume which does not mount under mount point path
Minfei Huang (4):
kdump-lib: Add new function to cut out the substring
kdump-lib: Add the new function to enhance bind mounted judgement
kdump-lib: Get the mount point correctly, if the device has several
mount point
dracut-module-setup: Fix the incorrect dumping target, if the path is
bind mounted
dracut-module-setup.sh | 49 +++++++++++++++++++++++++++++++++++-----
kdump-lib.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++++-
mkdumprd | 32 +++++++++++++++++++-------
3 files changed, 128 insertions(+), 14 deletions(-)
--
1.9.3
8 years, 6 months
[PATCH 0/8 v9] Enhance kdump to support ipv6
by Minfei Huang
Enhance kdump to support ipv6 protocal.
v9:
- re-construct the patchset to make it more clear.
- modify some function name
v8:
- re-construct the patchset to make it more clear.
v7:
- use interface function is_ipv6_address to check whether is ipv6 or not
- fix some bugs
v6:
- construct the patches, split more small patches
- wrap the similar functional code to make it more clearly
v5:
- modify the get_route function
v4:
- consistent the netdevice name to add the prefix "kdump-" before the ethX
v3:
- Support the static route
v2:
- Fix some bugs
Minfei Huang (8):
kdump-lib: Quote the parameter to correct it if contains the blank
mkdumprd: Add proper prefix "kdump-" before ethX in 2nd kernel
kdump-lib: Add functions to enhance ipv6 judgement
dracut-kdump: Use the first filtered ip address as the dumping
directory
dracut-module-setup: Support the static route with ipv6 mode
dracut-module-setup: Support the static ip with ipv6 mode
dracut-module-setup: Enhance kdump to support ipv6
dracut-module-setup: Enhance iscsi to support ipv6
dracut-kdump.sh | 4 +-
dracut-module-setup.sh | 162 ++++++++++++++++++++++++++++++++++++-------------
kdump-lib.sh | 64 +++++++++++++++----
mkdumprd | 16 ++++-
4 files changed, 189 insertions(+), 57 deletions(-)
--
1.9.3
8 years, 6 months
[PATCH 0/8 v10] Enhance kdump to support ipv6
by Minfei Huang
Enhance kdump to support ipv6 protocal.
v10:
- adjust some code to make it review easiler
- add comment to describe the function
v9:
- re-construct the patchset to make it more clear.
- modify some function name
v8:
- re-construct the patchset to make it more clear.
v7:
- use interface function is_ipv6_address to check whether is ipv6 or not
- fix some bugs
v6:
- construct the patches, split more small patches
- wrap the similar functional code to make it more clearly
v5:
- modify the get_route function
v4:
- consistent the netdevice name to add the prefix "kdump-" before the ethX
v3:
- Support the static route
v2:
- Fix some bugs
Minfei Huang (8):
kdump-lib: Quote the parameter to correct it if contains the blank
mkdumprd: Add proper prefix "kdump-" before ethX in 2nd kernel
kdump-lib: Add functions to enhance ipv6 judgement
dracut-kdump: Use the first filtered ip address as the dumping
directory
dracut-module-setup: Support the static route with ipv6 mode
dracut-module-setup: Support the static ip with ipv6 mode
dracut-module-setup: Install the network to support ipv6
dracut-module-setup: Enhance iscsi to support ipv6
dracut-kdump.sh | 4 +-
dracut-module-setup.sh | 165 ++++++++++++++++++++++++++++++++++++-------------
kdump-lib.sh | 65 +++++++++++++++----
mkdumprd | 16 ++++-
4 files changed, 193 insertions(+), 57 deletions(-)
--
1.9.3
8 years, 6 months