技术开发 频道

Chromium OS初体验 就是一款Linux

  【IT168 评论】好奇,弄了一个Chromium OS for VMWare 玩玩,发现Chromium OS并非像我之前想象的一样,并非完全是一个自主研发的独立操作系统。

  启动 Chromium OS 时 vmware 被设置成图形模式,但一片漆黑什么都看不到,感觉很神秘的样子。启动后登录界面如下图,登录必须联网才可以,默认使用 gmail 账号。

  登录进去以后就是一个Chrome浏览器(如下图),没有桌面,感觉光秃秃,真的仿佛一个嵌入式。好奇,按了一下 Ctrl + o,试图在Chrome浏览器中打开磁盘中的文件,发现文件目录结构与 Linux 很像并且通过“lost+found”字样初步推断,该分区属于 ext3 文件系统。

  由于 VMWare 通过 DHCP 自动获取 IP 上网,在 DHCP 服务器上查到 Chromium OS 地址,无法 ping 通,无法 ssh,无法 telnet,仿佛有防火墙。

  既然是工作在 VMWare 里的,那么干脆把 Chromium OS 磁盘挂在其他 VMWare 中试试看。

# fdisk -l

Disk
/dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units
= cylinders of 16065 * 512 = 8225280 bytes
Disk identifier:
0x0001d9d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      104391   83  Linux
/dev/sda2              14          78      522112+  82  Linux swap / Solaris
/dev/sda3              79        1044     7759395   83  Linux

Disk
/dev/sdb: 2988 MB, 2988442112 bytes
255 heads, 63 sectors/track, 363 cylinders
Units
= cylinders of 16065 * 512 = 8225280 bytes
Disk identifier:
0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         122      972800   83  Linux
Partition
1 has different physical/logical endings:
     phys
=(950, 0, 1) logical=(121, 27, 35)
Partition
1 does not end on cylinder boundary.
/dev/sdb2             122         243      972800   82  Linux swap / Solaris
Partition
2 has different physical/logical beginnings (non-Linux?):
     phys
=(950, 0, 2) logical=(121, 27, 36)
Partition
2 has different physical/logical endings:
     phys
=(1023, 63, 32) logical=(242, 55, 6)
Partition
2 does not end on cylinder boundary.
/dev/sdb3   *         243         364      972800   83  Linux
Partition
3 has different physical/logical beginnings (non-Linux?):
     phys
=(1023, 63, 32) logical=(242, 55, 7)
Partition
3 has different physical/logical endings:
     phys
=(1023, 63, 32) logical=(363, 82, 40)
Partition
3 does not end on cylinder boundary.
root@LinuxDev
~
#

  看到了分区结构,/deb/sda 是我的 Linux 系统,/dev/sdb 是 Chromium OS,不过结构挺奇怪的,没有见过。从表象上看,sdb2 是 SWAP,sdb1 和 sdb3 则可能是 ext3 文件系统。试一下:

root@LinuxDev /
# mkdir
-p /mnt/chos
root@LinuxDev
/
# mount
/dev/sdb1 /mnt/chos
root@LinuxDev
/
# ll
/mnt/chos
总用量
32
drwxr
-xr-x 6 platinum platinum  4096 12月  6 2009 ./
drwxr
-xr-x 7 root     root       168 12月  5 21:03 ../
drwxr
-xr-x 2 root     root      4096 12月  6 2009 etc/
drwxr
-xr-x 4 root     root      4096 12月  6 2009 home/
drwx
------ 2 root     root     16384 11月 20 08:17 lost+found/
drwxr
-xr-x 4 root     root      4096 12月  6 2009 var/
root@LinuxDev
/
# ll
/mnt/chos/etc
总用量
8
drwxr
-xr-x 2 root     root     4096 12月  6 2009 ./
drwxr
-xr-x 6 platinum platinum 4096 12月  6 2009 ../
lrwxrwxrwx
1 root     root       30 12月  6 2009 localtime -> /usr/share/zoneinfo/US/Pacific
root@LinuxDev
/
# ll
/mnt/chos/home/
总用量
16
drwxr
-xr-x 4 root     root     4096 12月  6 2009 ./
drwxr
-xr-x 6 platinum platinum 4096 12月  6 2009 ../
drwx
--x--x 2 platinum platinum 4096 12月  6 2009 chronos/
drwxr
-xr-x 4 root     root     4096 12月  6 2009 .shadow/
root@LinuxDev
/
#

  成功了,里面有数据,但没有什么和系统相关的,换个分区试试。

root@LinuxDev /
# umount
/dev/sdb1
root@LinuxDev
/
# mount
/dev/sdb3 /mnt/chos
root@LinuxDev
/
# ll
/mnt/chos
总用量
96
drwxr
-xr-x 22 root root  4096 11月 20 08:08 ./
drwxr
-xr-x  7 root root   168 12月  5 21:03 ../
drwxr
-xr-x  2 root root  4096 11月 20 08:07 bin/
drwxr
-xr-x  2 root root  4096 12月  5 20:37 boot/
drwxr
-xr-x  4 root root  4096 11月 20 08:07 dev/
drwxr
-xr-x 69 root root  4096 12月  5 20:35 etc/
drwxr
-xr-x  3 root root  4096 11月 20 08:07 home/
drwxr
-xr-x 18 root root  4096 11月 20 08:08 lib/
drwx
------  2 root root 16384 11月 20 08:06 lost+found/
drwxr
-xr-x  2 root root  4096 11月 20 08:07 media/
drwxr
-xr-x  3 root root  4096 11月 20 08:08 mnt/
drwxr
-xr-x  3 root root  4096 11月 20 08:07 opt/
lrwxrwxrwx  
1 root root    28 11月 20 08:08 postinst -> ./usr/sbin/chromeos-postinst*
drwxr
-xr-x  2 root root  4096  7月 14 10:36 proc/
drwx
------  2 root root  4096 12月  5 20:38 root/
drwxr
-xr-x  2 root root  4096 11月 20 08:07 sbin/
drwxr
-xr-x  2 root root  4096  7月 14 06:42 selinux/
drwxr
-xr-x  2 root root  4096 11月 20 08:07 srv/
drwxr
-xr-x  2 root root  4096  8月  7 18:31 sys/
drwxrwxrwt  
5 root root  4096 11月 20 08:09 tmp/
drwxr
-xr-x  2 root root  4096 11月 20 08:07 trunk/
drwxr
-xr-x 10 root root  4096 11月 20 08:07 usr/
drwxr
-xr-x 13 root root  4096 11月 20 08:07 var/
root@LinuxDev
/
#

  恩,这个是我们的 Chromium OS 系统了。这哪是什么独立的系统,就是个 Linux 壳,但图形界面是怎么回事呢?继续看。

  既然有完整的 / 结构,那么 chroot 进去好了:

# chroot /mnt/chos
groups: cannot find name
for group ID 11
root@LinuxDev:
/# cat /etc/shadow
root:
*:14583:0:99999:7:::
daemon:
*:14568:0:99999:7:::
bin:
*:14568:0:99999:7:::
sys:
*:14568:0:99999:7:::
sync:
*:14568:0:99999:7:::
games:
*:14568:0:99999:7:::
man:
*:14568:0:99999:7:::
lp:
*:14568:0:99999:7:::
mail:
*:14568:0:99999:7:::
news:
*:14568:0:99999:7:::
uucp:
*:14568:0:99999:7:::
proxy:
*:14568:0:99999:7:::
www
-data:*:14568:0:99999:7:::
backup:
*:14568:0:99999:7:::
list:
*:14568:0:99999:7:::
irc:
*:14568:0:99999:7:::
gnats:
*:14568:0:99999:7:::
nobody:
*:14568:0:99999:7:::
libuuid:
!:14568:0:99999:7:::
syslog:
*:14568:0:99999:7:::
chronos:$
1$Oq2yFY0k$w.F/wm/r6ozX3RmkZgn/C0:14568:0:99999:7:::
messagebus:
*:14568:0:99999:7:::
ntp:
*:14568:0:99999:7:::
sshd:
*:14568:0:99999:7:::
root@LinuxDev:
/#

  看来 root 没有密码,不能登录。干脆自己创建一个 root 级别的用户算了,从 Chromium OS 里进入,这样看得更清楚。

root@LinuxDev:/# useradd platinum
root@LinuxDev:
/# vi /etc/passwd (修改 uid 和 gid 为 0,修改 shell 为 /bin/bash,因为发现默认是 /bin/sh)
root@LinuxDev:
/# passwd platinum
Enter
new UNIX password:
Retype
new UNIX password:
passwd: password updated successfully
root@LinuxDev:
/#

  重启前,看看 iptables 是否被设置了

  由于不知道是什么发行版,是怎么设置的脚本,看一下 /etc/issue 看有什么线索。

root@LinuxDev:/# cat /etc/issue
Ubuntu karmic (development branch) \n \l

root@LinuxDev:
/#

   原来是 Ubuntu……

  查看一下 /etc/init/iptables.conf

root@localhost:/# cat /etc/init/iptables.conf
# Copyright (c)
2009 The Chromium OS Authors. All rights reserved.
# Use of
this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# iptables
#

start on login
-prompt-ready

# This is run
-once rather than a service.
task

script

/sbin/iptables -P INPUT DROP
/sbin/iptables -P FORWARD DROP
/sbin/iptables -P OUTPUT DROP

# Accept everything on the loopback
/sbin/iptables -I INPUT -i lo -j ACCEPT
/sbin/iptables -I OUTPUT -o lo -j ACCEPT

# Accept
return traffic inbound
/sbin/iptables -I INPUT  -m state --state ESTABLISHED,RELATED -j ACCEPT

# ssh
/sbin/iptables -A INPUT  -p tcp --dport 22 -j ACCEPT

# Accept
new and return traffic outbound
/sbin/iptables -I OUTPUT  -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

end script
root@localhost:
/#

   果不其然,怪不得无法 ping 通呢,都是 DROP,全都把默认改成 ACCEPT。

  关闭目前的 VMWare,启动 Chromium OS,启动后按 Ctrl + Alt + t 进入 terminal 模式(如图)su 到 platinum,启动 ssh,通过 ssh 远程用 platinum 账号登录,得到提示。

  QUOTE:

login as: platinum
platinum@
172.17.40.102's password: ********
Linux localhost 2.6.30-chromeos-intel-menlow #1 SMP Fri Nov 20 00:03:08 UTC 2009 i686

To access official Ubuntu documentation, please visit:
http:
//help.ubuntu.com/

The programs included
with the Ubuntu system are free software;
the exact distribution terms
for each program are described in the
individual files in
/usr/share/doc/*/copyright.

Ubuntu comes
with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Could
not chdir to home directory /home/platinum: No such file or directory
root@localhost:
/#

  看看启动参数

  QUOTE:

root@localhost:/home/chronos# cat /boot/extlinux.conf
DEFAULT chromeos
-usb
PROMPT
0
TIMEOUT
0

label chromeos
-usb
  menu label chromeos
-usb
  kernel vmlinuz
  append quiet console
=tty2 initrd=initrd.img init=/sbin/init boot=local rootwait root=LABEL=C-ROOT ro noresume noswap i915.modeset=1 loglevel=1

label chromeos
-hd
  menu label chromeos
-hd
  kernel vmlinuz
  append quiet console
=tty2 init=/sbin/init boot=local rootwait root=HDROOT ro noresume noswap i915.modeset=1 loglevel=1
root@localhost:
/home/chronos#

  看看映射结构

  QUOTE:

QUOTE:
root@localhost:
/# df
Filesystem           1K
-blocks      Used Available Use% Mounted on
rootfs                  
957496    603088    305768  67% /
udev                    
255548    169284     86264  67% /dev
/dev/disk/by-label/C-ROOT
                        
957496    603088    305768  67% /
/tmp                    255548         8    255540   1% /tmp
shmfs                  
255548       140    255408   1% /dev/shm
/dev/sda1               957496     80328    828528   9% /mnt/stateful_partition
/dev/sda1               957496     80328    828528   9% /var/cache
/dev/sda1               957496     80328    828528   9% /var/log
vartmp                  
255548        20    255528   1% /var/tmp
/dev/sda1               957496     80328    828528   9% /home
varrun                  
255548        56    255492   1% /var/run
varlock                
255548         0    255548   0% /var/lock
/media                  255548         0    255548   0% /media
/dev/mapper/cryptohome
                        
811972     36088    740900   5% /home/chronos


root@localhost:
/# mount
rootfs
on / type rootfs (rw)
none
on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none
on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev
on /dev type tmpfs (rw,relatime,mode=755)
none
on /dev/.bootchart/proc type proc (rw,relatime)
/dev/disk/by-label/C-ROOT on / type ext3 (ro,relatime,errors=continue,data=writeback)
/tmp on /tmp type tmpfs (rw,relatime)
shmfs
on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts
on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /mnt/stateful_partition type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/sda1 on /var/cache type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/sda1 on /var/log type ext3 (rw,relatime,errors=continue,data=writeback)
vartmp
on /var/tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /home type ext3 (rw,relatime,errors=continue,data=writeback)
varrun
on /var/run type tmpfs (rw,nosuid,relatime,mode=755)
varlock
on /var/lock type tmpfs (rw,nosuid,nodev,noexec,relatime)
/media on /media type tmpfs (rw,relatime)
/dev/mapper/cryptohome on /home/chronos type ext4 (rw,nosuid,nodev,noexec,relatime,barrier=1,data=ordered)
root@localhost:
/#

  看到了吗,/home/chronos 是个加密分区,里面存放的全是 Chromium 自己的私有数据信息。奇怪,不是 Chromium 或叫 Chrome 吗?

  这个“chronos”是不是作者想写“chromos”时的笔误?而这个 Chromium OS for VMWare 又是谁制作的呢?呵呵,不得而知……

  比较奇怪,有 3 个 /dev/sda1 分别映射到3 个不同的目录,但3 个目录里面内容却不同,具体原因不明,不知道哪位朋友清楚ps ax 看看都跑了什么吧

  QUOTE:

  PID TTY      STAT   TIME COMMAND
    
1 ?        Ss     0:01 /sbin/init
    
2 ?        S<     0:00 [kthreadd]
    
3 ?        S<     0:00 [migration/0]
    
4 ?        S<     0:00 [ksoftirqd/0]
    
5 ?        S<     0:00 [migration/1]
    
6 ?        S<     0:00 [ksoftirqd/1]
    
7 ?        S<     0:00 [events/0]
    
8 ?        S<     0:00 [events/1]
    
9 ?        S<     0:00 [cpuset]
  
10 ?        S<     0:00 [khelper]
  
13 ?        S<     0:00 [netns]
  
16 ?        S<     0:00 [async/mgr]
  
161 ?        S<     0:00 [kblockd/0]
  
162 ?        S<     0:00 [kblockd/1]
  
164 ?        S<     0:00 [kacpid]
  
165 ?        S<     0:00 [kacpi_notify]
  
282 ?        S<     0:00 [ata/0]
  
283 ?        S<     0:00 [ata/1]
  
284 ?        S<     0:00 [ata_aux]
  
288 ?        S<     0:00 [ksuspend_usbd]
  
293 ?        S<     0:00 [khubd]
  
296 ?        S<     0:00 [kseriod]
  
364 ?        S      0:00 [pdflush]
  
365 ?        S      0:00 [pdflush]
  
366 ?        S<     0:00 [kswapd0]
  
417 ?        S<     0:00 [aio/0]
  
418 ?        S<     0:00 [aio/1]
  
433 ?        S<     0:00 [crypto/0]
  
434 ?        S<     0:00 [crypto/1]
  
514 ?        S<     0:00 [pciehpd]
  
708 ?        S<     0:00 [scsi_eh_0]
  
711 ?        S<     0:00 [scsi_eh_1]
  
747 ?        S<     0:00 [kpsmoused]
  
754 ?        S<     0:00 [kstriped]
  
759 ?        S<     0:00 [kondemand/0]
  
760 ?        S<     0:00 [kondemand/1]
  
764 ?        S<     0:00 [usbhid_resumer]
1015 ?        S<     0:00 [kjournald]
1036 ?        S<     0:00 [kjournald]
1060 ?        SLs    0:01 /usr/bin/slim -d
1065 tty2     Ss+    0:00 /sbin/getty -8 38400 tty2
1069 tty1     Ss+    0:05 /usr/bin/X -nolisten tcp vt01 -auth /var/run/slim.auth
1079 ?        S      0:00 /bin/dd if=/proc/kmsg of=/var/run/rsyslog/kmsg
1081 ?        Ss     0:00 /bin/dbus-daemon --system --fork
1082 ?        Ss     0:00 /sbin/wpa_supplicant -u -s -O/var/run/wpa_supplicant
1085 ?        Sl     0:00 /usr/sbin/rsyslogd -c4
1089 ?        Ss     0:00 /usr/sbin/connmand
1092 ?        Ssl    0:00 /usr/sbin/console-kit-daemon
1155 ?        S      0:00 /sbin/dhclient -d -q -e BUSNAME=org.moblin.connman -pf /var/run/connman/dhclient.eth0.pid -lf /var/run/connman/dhclient.eth0.leases -cf /usr/lib/connma
1167 ?        Ts     0:00 /sbin/init
1185 ?        Ss     0:00 /usr/sbin/acpid --confdir /etc/acpi/events --socketfile /var/run/acpid.socket
1238 ?        S<s    0:00 /sbin/udevd --daemon
1351 ?        S<     0:00 /sbin/udevd --daemon
1357 ?        S<     0:00 /sbin/udevd --daemon
1432 ?        Ss     0:00 /usr/sbin/ntpd -g -u ntp:ntp
1683 ?        S<     0:01 [loop0]
1697 ?        S<     0:00 [kdmflush]
1721 ?        S<     0:00 [kcryptd_io]
1722 ?        S<     0:00 [kcryptd]
1726 ?        S<     0:00 [kjournald2]
1741 ?        S      0:00 /usr/bin/ck-launch-session /etc/X11/chromeos-xsession
1762 ?        S      0:17 /usr/bin/chromeos-wm --hotkey_overlay_image_dir=/usr/share/chromeos-assets/images --panel_anchor_image=/usr/share/chromeos-assets/images/panel_anchor.p
1763 ?        S      0:00 /bin/sh /usr/bin/chromeos-chrome --loop
1765 ?        S      0:00 /usr/bin/xscreensaver -no-splash
1793 ?        S      0:00 /usr/lib/devicekit-power/devkit-power-daemon
1800 ?        S      0:00 /usr/lib/devicekit-disks/devkit-disks-daemon
1801 ?        S      0:00 devkit-disks-daemon: not polling any devices
1819 ?        Sl     0:08 /opt/google/chrome/chrome --enable-plugins --enable-gview --no-first-run --user-data-dir=/home/chronos/cu.platinum@gmail.com/.config/google-chrome
1827 ?        S      0:00 /opt/google/chrome/chrome --enable-plugins --enable-gview --no-first-run --user-data-dir=/home/chronos/cu.platinum@gmail.com/.config/google-chrome
1828 ?        S      0:00 /opt/google/chrome/chrome --type=zygote
1839 ?        Sl     0:01 /opt/google/chrome/chrome --channel=1819.b6192a8.686734735 --type=renderer --lang=en-US --force-fieldtest=AsyncSlowStart/_AsyncSlowStart_off/DnsImpact/
1848 ?        Sl     0:00 /opt/google/chrome/chrome --channel=1819.b6d9bb0.155889903 --type=renderer --lang=en-US --force-fieldtest=AsyncSlowStart/_AsyncSlowStart_off/CacheSize/
1851 ?        S      0:00 /usr/bin/xterm -bg black -fg grey
1852 pts/0    Ss     0:00 bash
1863 pts/0    S      0:00 su - platinum
1872 pts/0    S+     0:00 -su
1891 ?        Ss     0:00 /usr/sbin/sshd
1894 ?        Rs     0:00 sshd: platinum@pts/1
1908 pts/1    Ss     0:00 -bash
1931 pts/1    R+     0:00 ps ax

  无线用的是:/sbin/wpa_supplicant

  DHCP 客户端:/sbin/dhclient

  kill 掉 chrome 进程,回到登录界面,进程变为

  QUOTE:

PID TTY      STAT   TIME COMMAND
    
1 ?        Ss     0:01 /sbin/init
    
2 ?        S<     0:00 [kthreadd]
    
3 ?        S<     0:00 [migration/0]
    
4 ?        S<     0:00 [ksoftirqd/0]
    
5 ?        S<     0:00 [migration/1]
    
6 ?        S<     0:00 [ksoftirqd/1]
    
7 ?        S<     0:00 [events/0]
    
8 ?        S<     0:00 [events/1]
    
9 ?        S<     0:00 [cpuset]
  
10 ?        S<     0:00 [khelper]
  
13 ?        S<     0:00 [netns]
  
16 ?        S<     0:00 [async/mgr]
  
161 ?        S<     0:00 [kblockd/0]
  
162 ?        S<     0:00 [kblockd/1]
  
164 ?        S<     0:00 [kacpid]
  
165 ?        S<     0:00 [kacpi_notify]
  
282 ?        S<     0:00 [ata/0]
  
283 ?        S<     0:00 [ata/1]
  
284 ?        S<     0:00 [ata_aux]
  
288 ?        S<     0:00 [ksuspend_usbd]
  
293 ?        S<     0:00 [khubd]
  
296 ?        S<     0:00 [kseriod]
  
364 ?        S      0:00 [pdflush]
  
365 ?        S      0:00 [pdflush]
  
366 ?        S<     0:00 [kswapd0]
  
417 ?        S<     0:00 [aio/0]
  
418 ?        S<     0:00 [aio/1]
  
433 ?        S<     0:00 [crypto/0]
  
434 ?        S<     0:00 [crypto/1]
  
514 ?        S<     0:00 [pciehpd]
  
708 ?        S<     0:00 [scsi_eh_0]
  
711 ?        S<     0:00 [scsi_eh_1]
  
747 ?        S<     0:00 [kpsmoused]
  
754 ?        S<     0:00 [kstriped]
  
759 ?        S<     0:00 [kondemand/0]
  
760 ?        S<     0:00 [kondemand/1]
  
764 ?        S<     0:00 [usbhid_resumer]
1015 ?        S<     0:00 [kjournald]
1036 ?        S<     0:00 [kjournald]
1065 tty2     Ss+    0:00 /sbin/getty -8 38400 tty2
1079 ?        S      0:00 /bin/dd if=/proc/kmsg of=/var/run/rsyslog/kmsg
1081 ?        Ss     0:00 /bin/dbus-daemon --system --fork
1082 ?        Ss     0:00 /sbin/wpa_supplicant -u -s -O/var/run/wpa_supplicant
1085 ?        Sl     0:00 /usr/sbin/rsyslogd -c4
1089 ?        Ss     0:01 /usr/sbin/connmand
1092 ?        Ssl    0:00 /usr/sbin/console-kit-daemon
1155 ?        S      0:00 /sbin/dhclient -d -q -e BUSNAME=org.moblin.connman -pf /var/run/connman/dhclient.eth0.pid -lf /var/run/connman/dhclient.eth0.leases -cf /usr/lib/connma
1167 ?        Ts     0:00 /sbin/init
1185 ?        Ss     0:00 /usr/sbin/acpid --confdir /etc/acpi/events --socketfile /var/run/acpid.socket
1238 ?        S<s    0:00 /sbin/udevd --daemon
1351 ?        S<     0:00 /sbin/udevd --daemon
1357 ?        S<     0:00 /sbin/udevd --daemon
1432 ?        Ss     0:00 /usr/sbin/ntpd -g -u ntp:ntp
1793 ?        S      0:00 /usr/lib/devicekit-power/devkit-power-daemon
1800 ?        S      0:00 /usr/lib/devicekit-disks/devkit-disks-daemon
1801 ?        S      0:00 devkit-disks-daemon: not polling any devices
1891 ?        Ss     0:00 /usr/sbin/sshd
1894 ?        Rs     0:01 sshd: platinum@pts/1
1908 pts/1    Ss     0:00 -bash
2107 ?        Ss     0:00 /usr/bin/slim -d
2115 tty1     Ss+    0:01 /usr/bin/X -nolisten tcp vt01 -auth /var/run/slim.auth
2128 ?        Ts     0:00 /sbin/init
2426 pts/1    R+     0:00 ps ax

  图形界面依赖于 X,而 google 系统实际上就是 slim 了。也许我分析的不正确,但如果真是这样,Chromium OS 充其量就是做了个类似 GNOME、KDE 的东西而已。

  个人认为,这样的东西不能称之为“OS”,OS 是 Operating System 的缩写,也就是“操作系统”。

  什么是操作系统?

  操作系统在维基百科中文版中的定义如下:

  操作系统(Operating System,简称OS) , 是电子计算机系统中负责支撑应用程序运行环境以及用户操作环境的系统软件,同时也是计算机系统的核心与基石。它的职责常包括对硬件的直接监管、对各种计算资源(如内存、处理器时间等)的管理、以及提供诸如作业管理之类的面向应用程序的服务等等。

  操作系统在维基百科英文版的定义 如下:

  An operating system is a special computer program that manages the relationship between application software, the wide variety of hardware that makes up a computer system, and the user of the system.

  那么,既然 google 出了这个 OS,那么我们很正常地从字面上认为他是自己来实现的,否则为何叫自己的 OS 呢?但是呢?他所做的部分仅仅是一个定制好的图形界面,大多数内容不是自己的。

  如果这样的话,我们自己写一个 shell,替换 /bin/bash,当用户登录的时候,完全是我所安排的人机对话界面。那么试问,我们这个安装在 Linux 中的 shell 算不算是“POS”(Platinum-OS) 呢?

  如果不算,那么 Chromium OS 与我们的“POS”又有什么本质区别呢?如果“POS”算是“OS”的话,那么微软的“DOS”可是真够冤的了,毕竟人家什么都做了,而“POS”只是一个 shell……

  以上是我的一些分析,可能有不对的地方,欢迎大家指正。

  本话题交流帖:http://linux.chinaunix.net/bbs/thread-1147542-1-1.html

0
相关文章