分页: 1 / 1

休眠(pm-hibernate)后,启动到另一操作系统挂载休眠分区操作,是否会照成损坏?

发表于 : 2015-08-08 18:44
vickycq
双系统(Debian + Debian),经常让主系统休眠,再启动到第二系统工作。偶尔会发现重启恢复主系统的会话时,根分区变成只读,再重启则进入initramfs命令行,需要fsck才能正常启动。
时间比较久远,syslog里翻不到记录了。

Re: 休眠(pm-hibernate)后,启动到另一操作系统挂载休眠分区操作,是否会照成损坏?

发表于 : 2015-08-09 5:59
poloshiao
再重启则进入initramfs命令行
0. 參閱
https://wiki.debian.org/InitramfsDebug
Rescue shell (also known as initramfs shell)
fsck
1. https://help.ubuntu.com/community/Fstab ... k_order.29
You may also "tune" or set the frequency of file checks (default is every 30 mounts) but in general these checks are designed to maintain the integrity of your file system and thus you should strongly consider keeping the default settings.
預設每 30 次 正常關機 重新開機 會執行 fsck 一次
不正常關機 每次重新開機 都會執行 fsck 一次

2. 原理 參閱
http://www.computerhope.com/unix/fsck.htm
搜尋 clean 或 dirty

Re: 休眠(pm-hibernate)后,启动到另一操作系统挂载休眠分区操作,是否会照成损坏?

发表于 : 2015-08-09 13:30
vickycq
poloshiao 写了:
再重启则进入initramfs命令行
0. 參閱
https://wiki.debian.org/InitramfsDebug
Rescue shell (also known as initramfs shell)
fsck
1. https://help.ubuntu.com/community/Fstab ... k_order.29
You may also "tune" or set the frequency of file checks (default is every 30 mounts) but in general these checks are designed to maintain the integrity of your file system and thus you should strongly consider keeping the default settings.
預設每 30 次 正常關機 重新開機 會執行 fsck 一次
不正常關機 每次重新開機 都會執行 fsck 一次

2. 原理 參閱
http://www.computerhope.com/unix/fsck.htm
搜尋 clean 或 dirty
感谢。不过不是自动fsck,需要手动执行fsck /dev/sda4。

Re: 休眠(pm-hibernate)后,启动到另一操作系统挂载休眠分区操作,是否会照成损坏?

发表于 : 2015-08-09 15:59
poloshiao
不过不是自动fsck,需要手动执行fsck /dev/sda4。
可能是 開機程序 進入 Rescue shell
如果你沒 手动执行 fsck
繼續開機程序 可能也會 自动 fsck

補充 大概描述 不算精確

一般正常硬盤分割區 標示 clean
開機成功 自動改標示 為 dirty
正常關機成功 自動改標示 為 clean
不正常關機 維持標示 為 dirty

開機程序 碰到 標示 為 dirty 就執行 fsck
/etc/fstab 掛載分割區 開機 第 30 次 就執行 fsck

执行 fsck 成功後 自動改標示 為 clean

fsck 進行什麼功能
http://manpages.ubuntu.com/manpages/viv ... sck.8.html
fsck - check and repair a Linux filesystem

Re: 休眠(pm-hibernate)后,启动到另一操作系统挂载休眠分区操作,是否会照成损坏?

发表于 : 2016-02-22 0:09
科学之子
贴出来这个命令的输出结果?

代码: 全选

cat /proc/cmdline
如果里面有ro,修改引导程序替换为rw是否有效?
例如:

代码: 全选

kernel /boot/vmlinuz-3.16.0-4-686-pae root=/dev/sda2 rw
initrd /boot/initrd.img-3.16.0-4-686-pae
rw的含义是让根分区可读写,这样就不是只读了

Mon Feb 22 00:21:15 CST 2016补充:
简单地说就是将默认内核启动参数的ro替换为rw

Re: 休眠(pm-hibernate)后,启动到另一操作系统挂载休眠分区操作,是否会照成损坏?

发表于 : 2016-02-22 7:05
poloshiao
简单地说就是将默认内核启动参数的ro替换为rw
ro 替换为 rw 請詳細參見
http://askubuntu.com/questions/468846/p ... -rw/570873
Permanent GRUB edit from RO to RW