Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, December 2, 2014

Asus C300M: A Nice Chromebook but I want Linux

I bought an Asus C300M Chromebook yesterday, with the plan to turn it into a little Mint Linux laptop.

Went searching online, there were lots to be found but all seemed to be about older Asus Chromebooks, like C200 or C300. Not sure if C300M is related to C300 or not. But so far I have not been able to get into the Developer Mode yet, although I did get it to flash this with a "localhost login" prompt on the screen:

The problem is that the prompt just flashes for a fraction of a second. There is no time to login.

I will keep on trying to figure this out. But if anyone has any tips on how to get into the Developer Mode, please share! Thanks in advance.

By the way, Chrome OS works nicely on this little machine. But I want to take the box to a country where most of Google's services are blocked by the government, which is the main reason for me to try installing Linux besides the fun of breaking things.

Thursday, November 20, 2014

VirtualBox Raw Disk Access Problem on Windows 7

For quite a while I have enjoyed running a guest Mint Linux virtual machine on a laptop that must run Windows 7: I pulled out the PC's SATA CD/DVD drive and put a second SSD in its place. To run a VM from a raw disk, VirtualBox has to be manually configured to do that and it must be run as Administrator in Windows.

All that was well, although not without a few kinks I considered minor, until this morning. All of a sudden, I got a dialog box from VirtualBox saying that it failed to start due to permission issues. Here is a list of relevant messages I've copied from the log file, which should read better than the small dialog box:

00:00:01.774460 VDInit finished
00:00:01.775010 AIOMgr: Endpoint for file 'D:\MEMEME\vbox\mint.vmdk' (flags 00040723) created successfully
00:00:01.775716 AIOMgr: Endpoint for file 'D:\MEMEME\vbox\mint.vmdk' (flags 00040781) created successfully
00:00:01.775867 AIOMgr: Endpoint for file '\\.\PhysicalDrive1' (flags 000c0781) created successfully
00:00:01.775885 VMSetError: D:\tinderbox\win-4.3\src\VBox\Devices\Storage\DrvVD.cpp(3061) int __cdecl drvvdConstruct(struct PDMDRVINS *,struct CFGMNODE *,unsigned int); rc=VERR_VD_IMAGE_READ_ONLY
00:00:01.775911 VMSetError: Failed to open image 'D:\MEMEME\vbox\mint.vmdk' for writing due to wrong permissions
00:00:01.775923 VD: Opening the disk took 1593453 ns
00:00:01.776149 VMSetError: D:\tinderbox\win-4.3\src\VBox\Devices\Storage\DrvBlock.cpp(1077) int __cdecl drvblockConstruct(struct PDMDRVINS *,struct CFGMNODE *,unsigned int); rc=VERR_VD_IMAGE_READ_ONLY
00:00:01.776153 VMSetError: Failed to attach driver below us! Image is read-only.
00:00:01.776169 VMSetError: D:\tinderbox\win-4.3\src\VBox\Devices\Storage\DevAHCI.cpp(8450) int __cdecl ahciR3Construct(struct PDMDEVINS *,int,struct CFGMNODE *); rc=VERR_VD_IMAGE_READ_ONLY
00:00:01.776171 VMSetError: AHCI: Failed to attach drive to Port0
00:00:01.776180 PDM: Failed to construct 'ahci'/0! VERR_VD_IMAGE_READ_ONLY (-3205) - Image is read-only.
00:00:01.910243 ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={8ab7c520-2442-4b66-8d74-4ff1e195d2b6} aComponent={Console} aText={Failed to open image 'D:\MEMEME\vbox\mint.vmdk' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).
00:00:01.910298 Failed to attach driver below us! Image is read-only. (VERR_VD_IMAGE_READ_ONLY).
00:00:01.910299 AHCI: Failed to attach drive to Port0 (VERR_VD_IMAGE_READ_ONLY)}, preserve=false
00:00:01.927049 Power up failed (vrc=VERR_VD_IMAGE_READ_ONLY, rc=E_FAIL (0X80004005))
00:00:02.011279 UIMachineLogicFullscreen::maybeAdjustGuestScreenSizeOpenGL Error: Render SPU: (MakeCurrent) failed to make 0xe00112d5, 0x10000 current with 0x6 error.

I have checked the permissions on the "mint.vmdk" file, both my account and the local Administrators group had full control on the file. So that couldn't have been the file with read-only permission causing this indigestion.

I have also run DISKPART and checked that the disk was not set to READ-ONLY.

I have discarded my saved image and tried to start the VM from a clean state. All to no avail.

I am trying to fix this problem, but thought I may be able to get some help from the community by posting it to the VirtualBox forum.

[EDIT 2014-12-02]:Upgraded to VirtualBox 4.3.20. The problem persists. My suspicion of DDP|E grows deeper.

[EDIT 2014-11-25]: No progress on this issue. Sent email to Credent support (DDP|E was purchased from Credent, I guess.) Falling back to boot Linux on the laptop.

[EDIT 2014-11-23]: From every troubleshooting I could think of, it seems that the disk is held by some process that prevents VirtualBox from being able to write to it.

C:\Program Files\Oracle\VirtualBox>.\VBoxManage.exe internalcommands
listpartitions -rawdisk \\.\PhysicalDrive1
VBoxManage.exe: error: Cannot open the raw disk: VERR_SHARING_VIOLATION

C:\Program Files\Oracle\VirtualBox>.\VBoxManage.exe internalcommands
listpartitions -rawdisk \\.\PhysicalDrive2
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x07  0   /130/3   1023/254/63        122747         8192

From the SystemInternals Process Explorer, it seems that the Dell Data Protection's CmgShieldSvc.exe process is the most suspicious.

[EDIT 2015-05-08]: The issue is resolved in the latest DDP|E release --- kudos to our Windows image team and their working with the Dell (Credent) engineers.

Saturday, November 24, 2012

Pain with Windows Continues

I admit that I seriously lack in-depth knowledge of Microsoft Windows, but this one still looks ridiculous never-the-less.

I am trying to hook up a ViewSonic gTablet to a Windows XP machine to load a ROM. Upon plug in the USB cable, Windows recognized the new device and popped up the Found New Hardware Wizard. All seems smooth sailing, until the wizard seems to stuck at copying a file.


Of course, when I check the destination folder, the file is there. The copying is already done but the Wizard just sits there twiddling its thumb, forever and ever. I can't even cancel it as the buttons are all greyed out. It only goes away and declares that it has finished installing the software for the device when I unplug the USB cable or power off the device.

Yet, when I plug the device back in, it is not functioning properly as an APX device. The properties dialog box in the Windows Device Manager says that "No drivers are installed for this device."

So the next thing I try is to remove the device from the Device Manager. Windows stuck again:


I guess I am going to try Linux.

[Edit 2012-11-25] -- I thought if Linux was to help, I would write another post titled "Linux to the Rescue" or something. But Linux made it so easy which made me question myself as why I started with Windows in the first place -- Possibly because most of the how-to type articles mention Windows. Well, anyway, I found this article on SlateDroid.com and followed its instructions to nvflash the tablet, which is basically, plug in the device using a mini USB cable, download nvflash, download the device image you want to install on the device and run the nvflash script -- not worth writing another post.

Saturday, October 20, 2012

VPN in Ubuntu and Upgrading to 12.10, Quantal Quetzal

The latest release of Ubuntu hit the news a couple of days ago. I have been hesitant upgrading for some time as I have become less enthusiastic about new operating system features since moving away from system level development.

My experiences following Ubuntu has been that, every time a new release comes out, some functions are broken. Over time, bugs get reported, updates released and broken functions repaired. It has been a great OS for years, although Unity has not been my favorite. Between Gnome and KDE, I have always liked Gnome better, so I have stayed with Ubuntu, using it on my desktop, my netbook, and home server.

After reading about the 12.10 release for a few days, I decided to upgrade my desktop. The upgrade went pretty smooth besides taking a while. I went the command line route as that was easier for me.

Before I started the upgrade process, I had to enable the upgrade to a non-long-term-support (LTS) release -- Ubuntu does 2 release every year, one in April and one in October, which is where the release numbers like 10.04 and 12.10 come from. The latest release, 12.10, means it is released in October 2012. I forgot the file containing that option, so I started the System Tools » Administration » Update Manager, went to Settings and change the Notify me of a new Ubuntu version option from For long-term support versions to For any new version.

Then in a terminal window, I did a do-release-upgrade. That's pretty much it -- all I had to do after than was answering a few questions about new configuration files -- Since I haven't done much customization, I only had to answer y.

The upgrade process kept all my personalizations, including my choice of Gnome 3 and background images, etc.

But then almost immediately after reboot into 12.10, I noticed something not working: My VPN to work. It is a Cisco AnyConnect setup. The Network Manager isn't much help -- it just says connection failed. In syslog, this one message looks quite suspicious: Failed to open tun device: Permission denied -- I checked /dev/net/tun, I should already have read and write access to it per group permissions. Only by granting world read/write access to the tun device seems to make VPN work -- That seems rather strange. But that's a story for another day.

Tuesday, August 4, 2009

谷歌 Chrome OS 和 Linux

我可能是少数中的少数:我一直对苹果的机器、操作系统不感兴趣。可能我这人也 cheap,首先苹果产品的价格我拒绝接受。其次 Linux 和开源软件世界给予我的个人自由是吸引我的最大因素,远远超过 Mac OS 美观的外表。

刚刚读了这篇文章《Will Linux Shine as Google Chrome OS?》,我同意作者 Christopher Smart 的观点,谷歌此举对 Linux 和开源软件有益。让用惯 Windows 的人去接受另外一种是用电脑的方法,是要花很大的功夫的。谷歌 Chrome OS 如果成功,她最直接的作用就是让用户亲身体验 Windows 之外的使用电脑的方法。尽管 Chrome OS 是针对 netbook(上网本)这个档次的机器,但是一个用户用过 Chrome OS 之后再延伸到 netbook 之外,相对就容易多了。

Friday, July 31, 2009

Netbooks

有一段时间了,对市场上的 netbook 大批出现极感兴趣。后来一位同事挑唆,忍不住买了一台翻新的(refurbished)Dell Mini 9。一用之下,爱不释手。机器来的时候安装的 Ubuntu 8.04,不久 9.04 出台,我就给她装上了,效果非常不错。平时我基本上用 Google 的 Gmail 和网上办公软件,有她之后更觉方便,基本上可以随时随地看点什么,或者写点什么。不久之前回国,外甥女看了也爱上了这台小机器,于是我就送给了她。因为行程匆忙,没有时间教她怎么连接国内的 DSL 服务上网,结果被我妹夫找人把 Ubuntu 给换成了 Windows。

这个小插曲让我觉得有些失落。上网搜了一下“Linux netbook”,有这样感觉的还真不止我一个。有人问“Has Microsoft Killed the Linux Netbook?”“Is Linux dead in the netbook water?”也有人宣称“Demise of the solid-state Linux Netbook”。华硕(Asus)本来是第一家做 netbook 的电脑商,也经不起金钱的诱惑,向微软投怀送抱

对我个人而言,用 Linux 有十几年了,所以用 Ubuntu 得心应手,没有丝毫的不便。特别是 9.04 的出台解决了许多硬件兼容问题,让安装使用都更为方便。当然我也理解微软视窗系统使用者的心理,人对于自己熟悉的环境、事物总是恋恋难舍,这是自然。然而我用 Linux 最大的理由是我对于个人自由不可剥夺的崇尚,美国人有一句话,不自由毋宁死 (Patrick Henry: "Give me Liberty, or give me Death!")。用了一段时间 netbook 我最大的心得就是她给人的自由:我可以用她来阅读、写作、工作、娱乐;用 Skype 我可以与远在中国南方老家的父母“面对面”交谈。这一切用以前的 laptop 也能做到,只是 netbook 让你更减少一点负重。

从中国回来之后,把家里的 iTalkBB 换成了 MagicJack。目前使用的时间还不长,看来效果还不错,唯一的缺点是要有一台 Windows XP PC 一直开着才能打电话。当然,我也可以要打电话的时候才开机,其余时间就让进来的电话留言好了。不过,现在有了 netbook 这也不是一个大问题,我到 eBay 上找了一台便宜的 eeePC 900,接上 MagicJack 的 USB 接口,装上里面带的软件,就成了。可惜 MagicJack 现在还不支持 Linux,不然我就可以把 Windows XP 也去掉了。再装上 Skype,家里父母要找我也随时都可以了。

没有了我的 Mini,很有些不习惯。于是又到 eBay 上搜索了一番,找到一台配置相当的 Asus eeePC 901,最后价钱加运费一共 $201.98,也与我的那台 Mini 差不多。等机器到了,要做的一件事就是装上 Ubuntu 9.04!如果能找微软把上面预装 XP 钱要回来就更理想了,不过想想算了,没时间找他们算这笔小账。

Saturday, June 20, 2009

Ubuntu 服务器安装

用了很多年的 Gentoo Linux,每次更新的时候总是有这样那样的错误,有些累了。逐渐桌面上转向 Ubuntu,服务器改用同样的系统似乎也更合乎情理一些。

家里现在的服务器一台老的 PATA 硬盘开始出现故障,昨天安装系统的一台机器是从 NewEgg 买来的一个使用 VIA C3 的套件安装的。开始安装 Ubuntu 9.04 的时候还算顺利,但是装完之后出现一些问题,不知道是否与硬盘上有一些老的系统文件有关。但是重新安装之后还是死机,想来可能还是与网上其他人发现的 ACPI 问题有关。

于是下载了 8.04,安装过程基本顺利,就是在识别硬盘上原有的 RAID 和 LVM 设置的过程没有 9.04 那么流畅,8.04 基本上得手动走过整个 RAID 和 LVM 设置的程序,其实也不用做什么,原有的 RAID 和 LVM 设置都可以保留。这也是用 LVM 的一个好处吧,后期修改存储容量比较方便。

网络地址设置


系统安装过程中好像没有手工设置网络地址一块,每次都是自动选择 DHCP。好在这块的设置不难,网上发表的资料搜一下就有。网址的设置是在 /etc/network/interfaces 文件里,把原来用 DHCP 的一行注释掉,加上静态的网址设置就成了:
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 172.16.4.88
netmask 255.255.255.0
network 172.16.4.0
broadcast 172.16.4.255
gateway 172.16.4.1

之后,还要做一下网络端口的重新启动:
sudo pkill dhcp-client
sudo /etc/init.d/networking restart

这之后,就不必人守在服务器前面了,系统管理的工作基本上都可以通过 SSH 来做。