[OT]rm把笔记本弄变砖了

36 views
Skip to first unread message

B.Tag

unread,
May 17, 2016, 10:58:31 PM5/17/16
to sh...@googlegroups.com, sz...@googlegroups.com
hi all:
有谁遇到过把笔记本变砖的经历。
我大概说明一下情况,刚买的笔记本,默认操作系统windows 8,
重装系统,默认启动系统Linux,发行版选择的kali。
进入bios设置uefi,关闭。
进入分区的时候,发现有默认的恢复区,GPT等,全删了
安装完成后。
还在保修期,某天想重装系统,测试rm的威力,
rm -rfv /
然后机器自动死掉,关电源重启,黑屏。。。。。。。
永远的黑屏。。。。。。。。。。。。。。。。。。。
no zuo no die!!!!
最后返厂了。

        现在安装系统一般就不敢去乱动默认的分区了。


----------
个人

Github : https://github.com/7ym0n

GMAIL : bb....@gmail.com
 
Q  Q : 289871025


Shell Xu

unread,
May 17, 2016, 11:03:53 PM5/17/16
to shlug, sz...@googlegroups.com
传说中的删除了efi引导项?

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout



--
彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
blog: http://shell909090.org/blog/

Alpha Cheng

unread,
May 17, 2016, 11:09:13 PM5/17/16
to sh...@googlegroups.com, sz...@googlegroups.com
所以说这个地方几个发行版做得不太好

efi为什么不去ro mount

还有一个奇怪之处是

Inline image 1

难道不提示这个么

Regards.


Afa.L Cheng


Disclaimer:

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

B.Tag

unread,
May 17, 2016, 11:17:58 PM5/17/16
to sh...@googlegroups.com, sz...@googlegroups.com
我会告诉你,说我都没用普通用户,直接用的root么!!!:D
 
官方说保留恢复区,能一键恢复。从未用过这个 功能!!

----------
个人

Github : https://github.com/7ym0n

GMAIL : bb....@gmail.com
 
Q  Q : 289871025



Rivsen

unread,
May 17, 2016, 11:52:17 PM5/17/16
to sh...@googlegroups.com, sz...@googlegroups.com

一键恢复成Windows~

Send from my Nexus 5.

SuperCat

unread,
May 17, 2016, 11:55:17 PM5/17/16
to sh...@googlegroups.com
这不只是删引导项那么简单了,直接破坏了EFI数据了,相当于过去的乃把BIOS刷坏了
硬盘分区随便动是没关系的,毕竟乃能换硬盘的

Chaos Eternal

unread,
May 18, 2016, 6:07:05 AM5/18/16
to sh...@googlegroups.com
不知道你们在说什么。。

# efibootmgr 
efibootmgr: EFI variables are not supported on this system.

# fdisk /dev/sda -l
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2c9d4164

Device     Boot  Start       End   Sectors   Size Id Type
/dev/sda1  *      2048    499711    497664   243M 83 Linux
/dev/sda2       501758 468860927 468359170 223.3G  5 Extended
/dev/sda5       501760 468860927 468359168 223.3G 8e Linux LVM


EFI关掉的话,整个硬盘应该是想咋整就咋整啊。没听说Legacy BIOS会把数据存硬盘上这一说。

Xi Shen

unread,
May 18, 2016, 7:34:27 AM5/18/16
to sh...@googlegroups.com
uefi是bios读取硬盘上启动项的一个接口。你删了,他就是读不到。不存在你用rm能把bios删了的。

而且你还关闭了uefi...

你说的"黑屏"是开机后屏幕不能点亮;还是bios后,找不到启动项,黑屏?



一键恢复成Windows~


所以说这个地方几个发行版做得不太好

efi为什么不去ro mount

还有一个奇怪之处是

image.png

难道不提示这个么
--

Regards,
David

B.Tag

unread,
May 18, 2016, 9:26:19 PM5/18/16
to sh...@googlegroups.com, sz...@googlegroups.com
bios进不去 啥都不显示,连logo都没。。。

没想通为啥。按道理 应该能进bios才对呀

----------
个人

Github : https://github.com/7ym0n

GMAIL : bb....@gmail.com
 
Q  Q : 289871025



Chaos Eternal

unread,
May 18, 2016, 9:35:50 PM5/18/16
to sh...@googlegroups.com
efi怎么删?

Jackie Mao

unread,
May 18, 2016, 10:23:29 PM5/18/16
to sh...@googlegroups.com
硬盘卸掉开机会有什么提示?
Best regards
Jackie Mao
==================================================

Web:nbinshine.en.alibaba.com  / www.inshine.co
Tel: +86-574-26890009
Fax: +86-574-56655161
Mob: +86-13605846556
Add: Room 1015,Block B,ChangJiang Plaza,Mingzhou Road,Beilun,NingBo

Plain_Text

unread,
May 18, 2016, 11:16:13 PM5/18/16
to sh...@googlegroups.com, sz...@googlegroups.com

2016-05-19(Thursday) 09:25:56 +0800, "B.Tag" <bb....@gmail.com>:

> bios进不去 啥都不显示,连logo都没。。。
>
> 没想通为啥。按道理 应该能进bios才对呀





  'rm -rf' 不仅仅将硬盘清空,还会对 /dev, /proc, /sys 等进行破坏。只是
传统的 BIOS 会被操作系统进行写保护(Read-Only), 而现在的 UEFI 则是部分可写。
所以执行这个命令还破坏了主板。就好比当前挂载了移动硬盘,以及 NFS 网络盘,
那么用 'rm -rf' 破坏的绝不仅仅是本地硬盘。





Liang Guo

unread,
May 19, 2016, 12:04:28 AM5/19/16
to sh...@googlegroups.com, sz...@googlegroups.com
>
>   'rm -rf' 不仅仅将硬盘清空,还会对 /dev, /proc, /sys 等进行破坏。只是
> 传统的 BIOS 会被操作系统进行写保护(Read-Only), 而现在的 UEFI 则是部分可写。
> 所以执行这个命令还破坏了主板。就好比当前挂载了移动硬盘,以及 NFS 网络盘,
> 那么用 'rm -rf' 破坏的绝不仅仅是本地硬盘。
>
uefi的修改需要通过类似efibootmgr之类的东东吧?

Alpha Cheng

unread,
May 19, 2016, 12:23:44 AM5/19/16
to sh...@googlegroups.com, sz...@googlegroups.com

https://github.com/systemd/systemd/issues/2402

有人给systemd开了issue,其实这也是我难以理解的,为什么不去ro mount需要修改的时候remount,就像recovery时候的root一样。然而ro的话,麻烦是,grup install的时候也是要修改efivars的 (efibootmgr)

问题在于,如果每个厂商对UEFI的实现都stick to standard,rm /sys/firmware/efi/efivars/问题其实是不大的,它可以恢复

然而很多厂商的实现不是那么的标准,所以。。。

所以目前的 rm 的 safeguard:

rm -rf /
rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe

其实是很好用的

所以,B.Tag,你到底用的是哪个版本的rm?

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout

B.Tag

unread,
May 19, 2016, 12:50:07 AM5/19/16
to sh...@googlegroups.com, sz...@googlegroups.com
没懂起,rm命令 我只是root执行rm -rfv /的

----------
个人

Github : https://github.com/7ym0n

GMAIL : bb....@gmail.com
 
Q  Q : 289871025



您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。

Jackie Mao

unread,
May 19, 2016, 12:55:24 AM5/19/16
to sh...@googlegroups.com, sz...@googlegroups.com
如果刷bios可以解决应该没必要返厂吧

Chaos Eternal

unread,
May 19, 2016, 1:08:26 AM5/19/16
to sh...@googlegroups.com
问题是没开efi的话,不会有/sys/firemware/efi 这个东西啊

您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。

7ym0n.q6e

unread,
May 19, 2016, 3:32:42 AM5/19/16
to sh...@googlegroups.com
要不,抽空,找一台机器重现一下!!!

----------
个人

Github : https://github.com/7ym0n

GMAIL : bb....@gmail.com
 
Q  Q : 289871025



Shell Xu

unread,
May 19, 2016, 3:34:14 AM5/19/16
to shlug
土豪,求带。。。

7ym0n.q6e

unread,
May 19, 2016, 3:39:13 AM5/19/16
to sh...@googlegroups.com
我猜估计想找到问题,得现场还原,坐等kernel hacker和硬件hacker解释问题原因了。

----------
个人

Github : https://github.com/7ym0n

GMAIL : bb....@gmail.com
 
Q  Q : 289871025



小马xiaoma

unread,
May 21, 2016, 1:45:03 AM5/21/16
to shlug
如果删除硬盘上的全部数据,应该不至于如此,毕竟硬盘可以更换的。
但是,有可能某些发行版,将一些存放在硬件bios里的内容,挂载到系统的文件系统中。
那么,rm -rf / 后,会删除硬件的一些数据,导致系统无法正常启动。按理说硬件数据挂载上去应该是只读,不会被删除。反正就是很奇葩。

Shell Xu

unread,
May 21, 2016, 2:13:17 AM5/21/16
to shlug
原理上我觉得不应该。但是确实听到过有人惨叫说efi文件系统删除会导致引导出问题。

Xi Shen

unread,
May 22, 2016, 10:15:20 PM5/22/16
to shlug
EFI会读取硬盘上指定位置的一个程序,你把它删了,当然要惨叫~

奇葩的是,楼主居然连叫都叫不出来了,这才叫惨~

Thanks,
David S.

SuperCat

unread,
May 22, 2016, 10:49:17 PM5/22/16
to sh...@googlegroups.com

Chaos Eternal

unread,
May 22, 2016, 11:11:05 PM5/22/16
to sh...@googlegroups.com
还是那个问题,如果关了EFI, /sys里面怎么会有EFI参数的

小马xiaoma

unread,
May 23, 2016, 12:45:50 PM5/23/16
to shlug
这可能是一个BIOS的BUG,关了EFI,但是没起作用。或者可以说这是一个未写入文档的Feature。
Reply all
Reply to author
Forward
0 new messages