安装linux ubuntu崩溃,ubuntu上的崩溃转储:vmlinuz或崩溃文件不是支持的文件格式...

根据@ lurker的评论

vmlinuz是压缩的,可以使用以下命令解压缩(从

Extract vmlinux from vmlinuz or bzImage开始)

$sudo dd if=vmlinuz-3.2.0-23-generic-pae skip=`grep -a -b -o -m 1 -P '\x1f\x8b\x08\x00' vmlinuz-3.2.0-23-generic-pae| cut -d: -f 1` bs=1 | zcat > /tmp/vmlinux

4998324+0 records in

4998324+0 records out

4998324 bytes (5.0 MB) copied, 201.859 s, 24.8 kB/s

gzip: stdin: decompression OK, trailing garbage ignored

现在出错了

crash:/var/crash/_usr_sbin_ietd.0.crash:不支持的文件格式

我们还需要使用apport-unpack从崩溃报告中提取核心转储文件,如下所示(from here)

@ubuntu:/tmp$sudo apport-unpack

Usage: /usr/bin/apport-unpack

@ubuntu:/tmp$sudo apport-unpack /var/crash/_usr_sbin_ietd.0.crash /var/crash/

ERROR: Destination directory exists and is not empty.

@ubuntu:/tmp$

@ubuntu:/tmp$sudo mkdir coretest

@ubuntu:/tmp$sudo apport-unpack /var/crash/_usr_sbin_ietd.0.crash /tmp/coretest/

@ubuntu:/tmp$cd coretest/

@ubuntu:/tmp/coretest$

@ubuntu:/tmp/coretest$ls

Architecture Date ExecutablePath ProblemType ProcCwd ProcMaps Signal UserGroups

CoreDump DistroRelease ExecutableTimestamp ProcCmdline ProcEnviron ProcStatus Uname

@ubuntu:/tmp/coretest$ls -lt

total 384

-rw-r--r-- 1 root root 4 May 29 00:13 Architecture

-rw-r--r-- 1 root root 24 May 29 00:13 Date

-rw-r--r-- 1 root root 12 May 29 00:13 DistroRelease

-rw-r--r-- 1 root root 10 May 29 00:13 ExecutableTimestamp

-rw-r--r-- 1 root root 339968 May 29 00:13 CoreDump

-rw-r--r-- 1 root root 5 May 29 00:13 ProblemType

-rw-r--r-- 1 root root 66 May 29 00:13 ProcEnviron

-rw-r--r-- 1 root root 969 May 29 00:13 ProcMaps

-rw-r--r-- 1 root root 737 May 29 00:13 ProcStatus

-rw-r--r-- 1 root root 2 May 29 00:13 Signal

-rw-r--r-- 1 root root 31 May 29 00:13 Uname

-rw-r--r-- 1 root root 14 May 29 00:13 ExecutablePath

-rw-r--r-- 1 root root 14 May 29 00:13 ProcCmdline

-rw-r--r-- 1 root root 1 May 29 00:13 ProcCwd

-rw-r--r-- 1 root root 0 May 29 00:13 UserGroups

@ubuntu:/tmp/coretest$cd CoreDump

bash: cd: CoreDump: Not a directory

@ubuntu:/tmp/coretest$sudo crash /tmp/vmlinux /boot/System.map-3.2.0-23-generic-pae /tmp/coretest/CoreDump

crash 6.1.6

Copyright (C) 2002-2013 Red Hat, Inc.

Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation

Copyright (C) 1999-2006 Hewlett-Packard Co

Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited

Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.

Copyright (C) 2005, 2011 NEC Corporation

Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.

Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.

This program is free software, covered by the GNU General Public License,

and you are welcome to change it and/or distribute copies of it under

certain conditions. Enter "help copying" to see the conditions.

This program has absolutely no warranty. Enter "help warranty" for details.

GNU gdb (GDB) 7.3.1

Copyright (C) 2011 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "i686-pc-linux-gnu"...

crash: /tmp/vmlinux: no debugging data available

@ubuntu:/tmp/coretest$

对于“No debugging data available”,需要安装一些根据this link和one安装的debuginfo软件包(programname-dbg或progname-dbgsym)

但是,添加GPG密钥(如下所示)的步骤对于下载工作至关重要

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01

您应该收到消息

public key “Ubuntu Debug Symbol Archive Automatic Signing Key

” imported

而不是“未改变”的状态.如果在此步骤中显示“未更改”,则您将无法下载debuginfo包.

在这种情况下,尝试使用http 80端口导入GPG密钥为(here)

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值