Ubuntu 12.04 SSD根频繁随机只读文件系统

Ubuntu 12.04 SSD根频繁随机只读文件系统

我真的需要你的帮助。我有一台戴尔 Inspiron 1545,8GB RAM 和 Sandisk Extreme 240GB SSD。磁盘分为三个分区,/root、/swap - 8GB、/home

BLKIDD:

/dev/sda1: UUID="7cd24cc2-ad1a-4601-944a-b958c002c09b" TYPE="ext4" 
/dev/sda3: UUID="2cce638f-c3fd-44e8-8787-e2df10f7b593" TYPE="ext4" 
/dev/sda5: UUID="27fa814e-c4e8-4622-b115-bb1f3537971e" TYPE="swap" 
/dev/zram0: UUID="a286239a-f0bc-405d-b355-e4c8f7db29da" TYPE="swap" 

我不断遇到随机系统问题,迫使我重新启动,当我重新启动时,它会在启动时进行文件系统检查并要求我按 f 键修复错误。我检查了驱动器是否有坏扇区和错误,它是干净的,SMART 报告也是如此,没有发现任何问题。我重新安装了操作系统,但问题仍然存在。它随机发生,有时在磁盘使用率高时或正常关机后发生。

这是我的 fstab,我对其进行了修改,希望它会有所帮助,但它并没有发生太大变化:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=7cd24cc2-ad1a-4601-944a-b958c002c09b /               ext4     discard,noat$
# /home was on /dev/sda3 during installation
UUID=2cce638f-c3fd-44e8-8787-e2df10f7b593 /home           ext4     discard,noat$
# swap was on /dev/sda5 during installation
UUID=27fa814e-c4e8-4622-b115-bb1f3537971e none            swap    sw           $
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

我已经在 Google 上搜索这个问题一个半星期了,但仍然找不到解决方法。有些人说这个问题是由内核更新和 ext4 文件系统引起的。

uname -a:

Linux juri-laptop 3.5.0-25-generic #39~precise1-Ubuntu SMP Tue Feb 26 00:11:13 UTC 2013 i686 i686 i386 GNU/Linux

我不是 Linux 专家,所以请对我温柔一点,不要对我的一些命令和报告太苛刻。

提前感谢你们。

朱里

已编辑 - 更好的 fstab 副本

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=7cd24cc2-ad1a-4601-944a-b958c002c09b /               ext4     discard,noatime,nodiratime,errors=remount-ro 0       1
# /home was on /dev/sda3 during installation
UUID=2cce638f-c3fd-44e8-8787-e2df10f7b593 /home           ext4     discard,noatime,nodiratime,defaults        0       2
# swap was on /dev/sda5 during installation
UUID=27fa814e-c4e8-4622-b115-bb1f3537971e none            swap    sw              0       0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

以下是我的 dmesg 日志的一些片段,希望这能对问题有所帮助。我在文件中搜索了“error”,结果如下:

[    4.167274] EXT4-fs warning (device sda1): ext4_clear_journal_err:4407: Filesystem error recorded from previous mount: IO failure
[    4.167278] EXT4-fs warning (device sda1): ext4_clear_journal_err:4408: Marking fs in need of filesystem check.

[    9.487927] EXT4-fs (sda1): re-mounted. Opts: discard,errors=remount-ro

[   24.081103] ERROR @wl_cfg80211_get_station : Could not get rate (-1)
[   24.081110] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)
[   24.081115] ERROR @wl_cfg80211_get_station : Could not get rate (-1)
[   24.081117] ERROR @wl_cfg80211_get_station : Could not get rssi (-1)
[   24.081122] ERROR @wl_dev_intvar_get : error (-1)
[   24.081124] ERROR @wl_cfg80211_get_tx_power : error (-1)

[   42.749595]          res 51/40:20:e8:68:5d/00:00:07:00:00/40 Emask 0x409 (media error) <F>

[   42.749600] ata1.00: error: { UNC }

[   42.770408] Sense Key : Medium Error [current] [descriptor]

[   42.770434] Add. Sense: Unrecovered read error - auto reallocate failed

[   42.770448] end_request: I/O error, dev sda, sector 123562216

答案1

好了,伙计们,问题来了。我想现在已经解决了,这全归功于我几个小时的谷歌搜索、测试和坚持。

正如我上面提到的,我通过将内核升级到 3.8.2 解决了只读文件系统问题,但这又导致我的 wifi 驱动程序出现问题(Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01))。我无法让 wifi 正常工作,因为这似乎是 wl 模块的问题。

尽管如此,我发现这篇文章(http://www.mindwerks.net/2012/06/wireless-bcm4312-with-the-3-4-and-3-5-kernel/),它帮助我修复了 wifi 问题。所以我决定再试一次内核 3.8.2 来修复 wifi,结果成功了。

总结:如果您遇到只读文件系统问题且无法正常工作,请检查您正在运行的内核版本uname -a。如果低于 3.8.2,请按照以下步骤升级到该版本:

我通常用于内核升级 / 降级的最简单的说明是由 ubuntuforums.org 用户 lykwydchykyn 提供的(我为这篇文章修改了 url):

Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/

Download 3 (maybe 4) debs to a folder somewhere:

linux-headers-VERSION-NUMBER_all.deb
linux-headers-VERSION-NUMBER_amd64.deb
linux-image-VERSION-NUMBER_amd64.deb
linux-image-extra-VERSION-NUMBER_amd64.deb   # if available

Install the debs with whatever package manager front-end you use (is gdebi still around?), or use these commands:

cd /path/to/folder/where/you/put/the/debs
sudo dpkg -i *.deb

来源:http://ubuntuforums.org/showthread.php?p=11391743#post11391743

如果升级内核后遇到 wifi 问题。请尝试以下步骤:

Download the 32 or 64-bit version:
http://www.broadcom.com/support/802.11/linux_sta.php
Download my patches: bc_wl_abiupdate.patch and switch_to.patch
Extract the sources:
cd ~/Downloads; mkdir -p wl; cd wl; tar xf ../hybrid-portsrc*.tar.gz
Patch and compile the sources:
patch -p0 src/wl/sys/wl_linux.c < ~/Downloads/switch_to.patch; patch -p0 src/wl/sys/wl_linux.c < ~/Downloads/bc_wl_abiupdate.patch;
make; sudo make install; sudo depmod; sudo modprobe wl 

加载“wl”内核模块后,等待 Ubuntu 几秒钟,网络管理器最终会开始寻找无线网络。

就是这样,应该可以工作了。

祝大家好运。

答案2

如何更新 Ubuntu、Linux Mint 或基于 Debian 的内核

更新内核将帮助您修复安全漏洞、提高稳定性、更新驱动程序、新内核功能并提高速度。

找出你的内核版本

# uname -r

或者

# cat /proc/version_signature

或者在 GUI 中使用 gnome-system-monitor,在菜单中查找系统监视器,然后查看第一个选项卡系统。

对于 x86-64

下载软件包:

$ wget -c kernel.ubuntu.com/~kernel-ppa/mainline/v3.13.1-trusty/linux-headers-3.13.1-031301_3.13.1-031301.201401291035_all.deb
$ wget -c kernel.ubuntu.com/~kernel-ppa/mainline/v3.13.1-trusty/linux-headers-3.13.1-031301-generic_3.13.1-031301.201401291035_amd64.deb
$ wget -c kernel.ubuntu.com/~kernel-ppa/mainline/v3.13.1-trusty/linux-image-3.13.1-031301-generic_3.13.1-031301.201401291035_amd64.deb

安装内核3.13.1:

# dpkg -i *.deb
# update-grub
# reboot

相关内容