トップ «前の日記(2011-04-12) 最新 次の日記(2011-04-14)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|04|05|06|07|

2011-04-13 :-(

_ 午前

0500 起床

0830 始業

0900 刺身にタンポポ

_ 午後

1400 うご

1700 退勤

_

1800 ぐったり

2000 飯

_ [NetBSD][rm -rf /]NetBSD 5.1 で rm -rf /

伝統的なこの作業についての試験は root が "/bin/rm -rf /" をしたらどうなるのか? が有名だが、fujiwara が「rm -rf / したことないって? 仮想マシンでやればいいじゃない」と言っていたので一般教養として自分でもやってみた。

使用ツール

VMWare Player に NetBSD 5.1 をセットアップしてユーザーを 1 人追加しただけ。

使用中のファイルは device busy になる。/bin/sh でログインしているのでビルトインコマンドは使える。/sbin などは削除されたので exit も出来ないし shutdown も出来ないし ssh も出来ない。「rm /bin/rm」してるはずなんだが、/bin/rm を削除させるようにカーネルへ命令だけが指示されて( 保留された? ) /bin/rm の処理が終了したらカーネルが /bin/rm を削除するんだろか。

ログはこんな

yukina# rm -rf /
rm: /home: Device busy
rm: /usr: Device busy
rm: /var: Device busy
rm: /kern/boottime: Read-only file system
rm: /kern/copyright: Read-only file system
rm: /kern/hostname: Read-only file system
rm: /kern/hz: Read-only file system
rm: /kern/loadavg: Read-only file system
rm: /kern/msgbuf: Read-only file system
rm: /kern/pagesize: Read-only file system
rm: /kern/physmem: Read-only file system
rm: /kern/rootdev: Read-only file system
rm: /kern/rrootdev: Read-only file system
rm: /kern/time: Read-only file system
rm: /kern/version: Read-only file system
rm: /kern: Device busy
rm: /proc/curproc: Read-only file system
rm: /proc/self: Read-only file system
rm: /proc/596/fd: Read-only file system
rm: /proc/596/file: Read-only file system
rm: /proc/596/mem: Read-only file system
rm: /proc/596/regs: Read-only file system
rm: /proc/596/fpregs: Read-only file system
rm: /proc/596/ctl: Read-only file system
rm: /proc/596/stat: Read-only file system
rm: /proc/596/status: Read-only file system
rm: /proc/596/note: Read-only file system
rm: /proc/596/notepg: Read-only file system
rm: /proc/596/map: Read-only file system
rm: /proc/596/maps: Read-only file system
rm: /proc/596/cmdline: Read-only file system
rm: /proc/596/exe: Read-only file system
rm: /proc/596/cwd: Read-only file system
rm: /proc/596/root: Read-only file system
rm: /proc/596/emul: Read-only file system
rm: /proc/596/statm: Read-only file system
rm: /proc/596/xmmregs: Read-only file system
rm: /proc/596: Read-only file system
rm: /proc/98/fd: Read-only file system
rm: /proc/98/file: Read-only file system
rm: /proc/98/mem: Read-only file system
rm: /proc/98/regs: Read-only file system
rm: /proc/98/fpregs: Read-only file system
rm: /proc/98/ctl: Read-only file system
rm: /proc/98/stat: Read-only file system
rm: /proc/98/status: Read-only file system
rm: /proc/98/note: Read-only file system
rm: /proc/98/notepg: Read-only file system
rm: /proc/98/map: Read-only file system
rm: /proc/98/maps: Read-only file system
rm: /proc/98/cmdline: Read-only file system
rm: /proc/98/exe: Read-only file system
rm: /proc/98/cwd: Read-only file system
rm: /proc/98/root: Read-only file system
rm: /proc/98/emul: Read-only file system
rm: /proc/98/statm: Read-only file system
rm: /proc/98/xmmregs: Read-only file system
rm: /proc/98: Read-only file system
rm: /proc/560/fd: Read-only file system
rm: /proc/560/file: Read-only file system
rm: /proc/560/mem: Read-only file system
rm: /proc/560/regs: Read-only file system
rm: /proc/560/fpregs: Read-only file system
rm: /proc/560/ctl: Read-only file system
rm: /proc/560/stat: Read-only file system
rm: /proc/560/status: Read-only file system
rm: /proc/560/note: Read-only file system
rm: /proc/560/notepg: Read-only file system
rm: /proc/560/map: Read-only file system
rm: /proc/560/maps: Read-only file system
rm: /proc/560/cmdline: Read-only file system
rm: /proc/560/exe: Read-only file system
rm: /proc/560/cwd: Read-only file system
rm: /proc/560/root: Read-only file system
rm: /proc/560/emul: Read-only file system
rm: /proc/560/statm: Read-only file system
rm: /proc/560/xmmregs: Read-only file system
rm: /proc/560: Read-only file system
rm: /proc/554/fd: Read-only file system
rm: /proc/554/file: Read-only file system
rm: /proc/554/mem: Read-only file system
rm: /proc/554/regs: Read-only file system
rm: /proc/554/fpregs: Read-only file system
rm: /proc/554/ctl: Read-only file system
rm: /proc/554/stat: Read-only file system
rm: /proc/554/status: Read-only file system
rm: /proc/554/note: Read-only file system
rm: /proc/554/notepg: Read-only file system
rm: /proc/554/map: Read-only file system
rm: /proc/554/maps: Read-only file system
rm: /proc/554/cmdline: Read-only file system
rm: /proc/554/exe: Read-only file system
rm: /proc/554/cwd: Read-only file system
rm: /proc/554/root: Read-only file system
rm: /proc/554/emul: Read-only file system
rm: /proc/554/statm: Read-only file system
rm: /proc/554/xmmregs: Read-only file system
rm: /proc/554: Read-only file system
rm: /proc/561/fd: Read-only file system
rm: /proc/561/file: Read-only file system
rm: /proc/561/mem: Read-only file system
rm: /proc/561/regs: Read-only file system
rm: /proc/561/fpregs: Read-only file system
rm: /proc/561/ctl: Read-only file system
rm: /proc/561/stat: Read-only file system
rm: /proc/561/status: Read-only file system
rm: /proc/561/note: Read-only file system
rm: /proc/561/notepg: Read-only file system
rm: /proc/561/map: Read-only file system
rm: /proc/561/maps: Read-only file system
rm: /proc/561/cmdline: Read-only file system
rm: /proc/561/exe: Read-only file system
rm: /proc/561/cwd: Read-only file system
rm: /proc/561/root: Read-only file system
rm: /proc/561/emul: Read-only file system
rm: /proc/561/statm: Read-only file system
rm: /proc/561/xmmregs: Read-only file system
rm: /proc/561: Read-only file system
rm: /proc/365/fd: Read-only file system
rm: /proc/365/file: Read-only file system
rm: /proc/365/mem: Read-only file system
rm: /proc/365/regs: Read-only file system
rm: /proc/365/fpregs: Read-only file system
rm: /proc/365/ctl: Read-only file system
rm: /proc/365/stat: Read-only file system
rm: /proc/365/status: Read-only file system
rm: /proc/365/note: Read-only file system
rm: /proc/365/notepg: Read-only file system
rm: /proc/365/map: Read-only file system
rm: /proc/365/maps: Read-only file system
rm: /proc/365/cmdline: Read-only file system
rm: /proc/365/exe: Read-only file system
rm: /proc/365/cwd: Read-only file system
rm: /proc/365/root: Read-only file system
rm: /proc/365/emul: Read-only file system
rm: /proc/365/statm: Read-only file system
rm: /proc/365/xmmregs: Read-only file system
rm: /proc/365: Read-only file system
rm: /proc/408/fd: Read-only file system
rm: /proc/408/file: Read-only file system
rm: /proc/408/mem: Read-only file system
rm: /proc/408/regs: Read-only file system
rm: /proc/408/fpregs: Read-only file system
rm: /proc/408/ctl: Read-only file system
rm: /proc/408/stat: Read-only file system
rm: /proc/408/status: Read-only file system
rm: /proc/408/note: Read-only file system
rm: /proc/408/notepg: Read-only file system
rm: /proc/408/map: Read-only file system
rm: /proc/408/maps: Read-only file system
rm: /proc/408/cmdline: Read-only file system
rm: /proc/408/exe: Read-only file system
rm: /proc/408/cwd: Read-only file system
rm: /proc/408/root: Read-only file system
rm: /proc/408/emul: Read-only file system
rm: /proc/408/statm: Read-only file system
rm: /proc/408/xmmregs: Read-only file system
rm: /proc/408: Read-only file system
rm: /proc/473/fd: Read-only file system
rm: /proc/473/file: Read-only file system
rm: /proc/473/mem: Read-only file system
rm: /proc/473/regs: Read-only file system
rm: /proc/473/fpregs: Read-only file system
rm: /proc/473/ctl: Read-only file system
rm: /proc/473/stat: Read-only file system
rm: /proc/473/status: Read-only file system
rm: /proc/473/note: Read-only file system
rm: /proc/473/notepg: Read-only file system
rm: /proc/473/map: Read-only file system
rm: /proc/473/maps: Read-only file system
rm: /proc/473/cmdline: Read-only file system
rm: /proc/473/exe: Read-only file system
rm: /proc/473/cwd: Read-only file system
rm: /proc/473/root: Read-only file system
rm: /proc/473/emul: Read-only file system
rm: /proc/473/statm: Read-only file system
rm: /proc/473/xmmregs: Read-only file system
rm: /proc/473: Read-only file system
rm: /proc/487/fd: Read-only file system
rm: /proc/487/file: Read-only file system
rm: /proc/487/mem: Read-only file system
rm: /proc/487/regs: Read-only file system
rm: /proc/487/fpregs: Read-only file system
rm: /proc/487/ctl: Read-only file system
rm: /proc/487/stat: Read-only file system
rm: /proc/487/status: Read-only file system
rm: /proc/487/note: Read-only file system
rm: /proc/487/notepg: Read-only file system
rm: /proc/487/map: Read-only file system
rm: /proc/487/maps: Read-only file system
rm: /proc/487/cmdline: Read-only file system
rm: /proc/487/exe: Read-only file system
rm: /proc/487/cwd: Read-only file system
rm: /proc/487/root: Read-only file system
rm: /proc/487/emul: Read-only file system
rm: /proc/487/statm: Read-only file system
rm: /proc/487/xmmregs: Read-only file system
rm: /proc/487: Read-only file system
rm: /proc/477/fd: Read-only file system
rm: /proc/477/file: Read-only file system
rm: /proc/477/mem: Read-only file system
rm: /proc/477/regs: Read-only file system
rm: /proc/477/fpregs: Read-only file system
rm: /proc/477/ctl: Read-only file system
rm: /proc/477/stat: Read-only file system
rm: /proc/477/status: Read-only file system
rm: /proc/477/note: Read-only file system
rm: /proc/477/notepg: Read-only file system
rm: /proc/477/map: Read-only file system
rm: /proc/477/maps: Read-only file system
rm: /proc/477/cmdline: Read-only file system
rm: /proc/477/exe: Read-only file system
rm: /proc/477/cwd: Read-only file system
rm: /proc/477/root: Read-only file system
rm: /proc/477/emul: Read-only file system
rm: /proc/477/statm: Read-only file system
rm: /proc/477/xmmregs: Read-only file system
rm: /proc/477: Read-only file system
rm: /proc/485/fd: Read-only file system
rm: /proc/485/file: Read-only file system
rm: /proc/485/mem: Read-only file system
rm: /proc/485/regs: Read-only file system
rm: /proc/485/fpregs: Read-only file system
rm: /proc/485/ctl: Read-only file system
rm: /proc/485/stat: Read-only file system
rm: /proc/485/status: Read-only file system
rm: /proc/485/note: Read-only file system
rm: /proc/485/notepg: Read-only file system
rm: /proc/485/map: Read-only file system
rm: /proc/485/maps: Read-only file system
rm: /proc/485/cmdline: Read-only file system
rm: /proc/485/exe: Read-only file system
rm: /proc/485/cwd: Read-only file system
rm: /proc/485/root: Read-only file system
rm: /proc/485/emul: Read-only file system
rm: /proc/485/statm: Read-only file system
rm: /proc/485/xmmregs: Read-only file system
rm: /proc/485: Read-only file system
rm: /proc/459/fd: Read-only file system
rm: /proc/459/file: Read-only file system
rm: /proc/459/mem: Read-only file system
rm: /proc/459/regs: Read-only file system
rm: /proc/459/fpregs: Read-only file system
rm: /proc/459/ctl: Read-only file system
rm: /proc/459/stat: Read-only file system
rm: /proc/459/status: Read-only file system
rm: /proc/459/note: Read-only file system
rm: /proc/459/notepg: Read-only file system
rm: /proc/459/map: Read-only file system
rm: /proc/459/maps: Read-only file system
rm: /proc/459/cmdline: Read-only file system
rm: /proc/459/exe: Read-only file system
rm: /proc/459/cwd: Read-only file system
rm: /proc/459/root: Read-only file system
rm: /proc/459/emul: Read-only file system
rm: /proc/459/statm: Read-only file system
rm: /proc/459/xmmregs: Read-only file system
rm: /proc/459: Read-only file system
rm: /proc/457/fd: Read-only file system
rm: /proc/457/file: Read-only file system
rm: /proc/457/mem: Read-only file system
rm: /proc/457/regs: Read-only file system
rm: /proc/457/fpregs: Read-only file system
rm: /proc/457/ctl: Read-only file system
rm: /proc/457/stat: Read-only file system
rm: /proc/457/status: Read-only file system
rm: /proc/457/note: Read-only file system
rm: /proc/457/notepg: Read-only file system
rm: /proc/457/map: Read-only file system
rm: /proc/457/maps: Read-only file system
rm: /proc/457/cmdline: Read-only file system
rm: /proc/457/exe: Read-only file system
rm: /proc/457/cwd: Read-only file system
rm: /proc/457/root: Read-only file system
rm: /proc/457/emul: Read-only file system
rm: /proc/457/statm: Read-only file system
rm: /proc/457/xmmregs: Read-only file system
rm: /proc/457: Read-only file system
rm: /proc/446/fd: Read-only file system
rm: /proc/446/file: Read-only file system
rm: /proc/446/mem: Read-only file system
rm: /proc/446/regs: Read-only file system
rm: /proc/446/fpregs: Read-only file system
rm: /proc/446/ctl: Read-only file system
rm: /proc/446/stat: Read-only file system
rm: /proc/446/status: Read-only file system
rm: /proc/446/note: Read-only file system
rm: /proc/446/notepg: Read-only file system
rm: /proc/446/map: Read-only file system
rm: /proc/446/maps: Read-only file system
rm: /proc/446/cmdline: Read-only file system
rm: /proc/446/exe: Read-only file system
rm: /proc/446/cwd: Read-only file system
rm: /proc/446/root: Read-only file system
rm: /proc/446/emul: Read-only file system
rm: /proc/446/statm: Read-only file system
rm: /proc/446/xmmregs: Read-only file system
rm: /proc/446: Read-only file system
rm: /proc/262/fd: Read-only file system
rm: /proc/262/file: Read-only file system
rm: /proc/262/mem: Read-only file system
rm: /proc/262/regs: Read-only file system
rm: /proc/262/fpregs: Read-only file system
rm: /proc/262/ctl: Read-only file system
rm: /proc/262/stat: Read-only file system
rm: /proc/262/status: Read-only file system
rm: /proc/262/note: Read-only file system
rm: /proc/262/notepg: Read-only file system
rm: /proc/262/map: Read-only file system
rm: /proc/262/maps: Read-only file system
rm: /proc/262/cmdline: Read-only file system
rm: /proc/262/exe: Read-only file system
rm: /proc/262/cwd: Read-only file system
rm: /proc/262/root: Read-only file system
rm: /proc/262/emul: Read-only file system
rm: /proc/262/statm: Read-only file system
rm: /proc/262/xmmregs: Read-only file system
rm: /proc/262: Read-only file system
rm: /proc/122/fd: Read-only file system
rm: /proc/122/file: Read-only file system
rm: /proc/122/mem: Read-only file system
rm: /proc/122/regs: Read-only file system
rm: /proc/122/fpregs: Read-only file system
rm: /proc/122/ctl: Read-only file system
rm: /proc/122/stat: Read-only file system
rm: /proc/122/status: Read-only file system
rm: /proc/122/note: Read-only file system
rm: /proc/122/notepg: Read-only file system
rm: /proc/122/map: Read-only file system
rm: /proc/122/maps: Read-only file system
rm: /proc/122/cmdline: Read-only file system
rm: /proc/122/exe: Read-only file system
rm: /proc/122/cwd: Read-only file system
rm: /proc/122/root: Read-only file system
rm: /proc/122/emul: Read-only file system
rm: /proc/122/statm: Read-only file system
rm: /proc/122/xmmregs: Read-only file system
rm: /proc/122: Read-only file system
rm: /proc/1/fd: Read-only file system
rm: /proc/1/file: Read-only file system
rm: /proc/1/mem: Read-only file system
rm: /proc/1/regs: Read-only file system
rm: /proc/1/fpregs: Read-only file system
rm: /proc/1/ctl: Read-only file system
rm: /proc/1/stat: Read-only file system
rm: /proc/1/status: Read-only file system
rm: /proc/1/note: Read-only file system
rm: /proc/1/notepg: Read-only file system
rm: /proc/1/map: Read-only file system
rm: /proc/1/maps: Read-only file system
rm: /proc/1/cmdline: Read-only file system
rm: /proc/1/exe: Read-only file system
rm: /proc/1/cwd: Read-only file system
rm: /proc/1/root: Read-only file system
rm: /proc/1/emul: Read-only file system
rm: /proc/1/statm: Read-only file system
rm: /proc/1/xmmregs: Read-only file system
rm: /proc/1: Read-only file system
rm: /proc/0/fd: Read-only file system
rm: /proc/0/mem: Read-only file system
rm: /proc/0/ctl: Read-only file system
rm: /proc/0/status: Read-only file system
rm: /proc/0/note: Read-only file system
rm: /proc/0/notepg: Read-only file system
rm: /proc/0/cmdline: Read-only file system
rm: /proc/0/cwd: Read-only file system
rm: /proc/0/root: Read-only file system
rm: /proc/0/emul: Read-only file system
rm: /proc/0: Read-only file system
rm: /proc/meminfo: Read-only file system
rm: /proc/cpuinfo: Read-only file system
rm: /proc/uptime: Read-only file system
rm: /proc/mounts: Read-only file system
rm: /proc/devices: Read-only file system
rm: /proc/stat: Read-only file system
rm: /proc/loadavg: Read-only file system
rm: /proc: Device busy
rm: /dev/pts/0: Read-only file system
rm: /dev/pts: Device busy
rm: /dev: Directory not empty
rm: /: Device busy
yukina# ls
ls: not found
yukina# pwd
/home/rin
yukina# cd /
yukina# pwd
/
yukina# ls
ls: not found
yukina# rm -rf /
sh: rm: not found
yukina# reboot
reboot: not found
yukina# cd /sbin
cd: can't cd to /sbin
yukina# ls
ls: not found
yukina# echo *
dev home kern proc usr var
yukina# cd /usr
yukina# echo *
*
yukina# cd ..
yukina# cd /kern
yukina# echo *
*
yukina# cd /
yukina# exit
本日のツッコミ(全2件) [ツッコミを入れる]
_ うさだー (2011-04-14 14:34)

何を消してるんだよ!

_ みわ (2011-04-15 00:22)

いろいろな記憶だよ (´・ω・`)