Note about s2mem and s2disk under Linux

October 5th, 2008 firenet Posted in linux No Comments »

With the help of thinkwiki, s2mem cost a little time to work fine. If your computer resume immediately after s2mem, you should try:

modprobe -r uhci_hcd
 
modprobe -r ehci_hcd

This remove the modules which would awake the computer aumatically. Surely, after your computer resume, you must load these modules for your USB devices.

S2mem is easy and S2disk is not.

First, I got a error “write error: no such device” and i didn’t understand it . Which device is needed? Once I reboot the computer and found a message “Unable find swap signature”. Oh , I havn’t allocate swap space.

Such a stupid error. So

mkswap /dev/sda7
 
swapon -v /dev/sda7

OK, let me try

echo disk > /sys/power/state

Now, my computer can suspend. But when I press the power button to resume, it boot as like it never suspend. Why?”Unable find swap signature” reminds me. I should modify /etc/initramfs-tools/conf.d/resume. It should be like this: RESUME=/dev/sda7. Then

update-initramfs -u

OK, after these, my computer suspend and resume fine.^_^

AddThis Social Bookmark Button

Got my first notebook thinkpad x61!

September 27th, 2008 firenet Posted in linux No Comments »

Yestaday,  I got my first notebook thinkpad x61. It has a T8100 CPU, 2GB memory and 250GB HD. (You can find more detail at here. The first one is my type.) 9:25a.m, I got to the Harbin’ Branch of Digital China. There are two nice boys and they help me finish the process for getting the computer. Nearly one hour later, I got back to my school with the thinkpad.

After lunch, I started to deal with the system: Windows Vista is there but I don’t like it. I prefer to linux, whick i am more familiar with. I use Debian lenny at usual time and you know I spend much time to configure it as I wish. So I want to move the whole system on my PC to the thinkpad. For that, I follow these steps:

  1. First of all, I pack the system as a file, a big file. Use this command: tar cvpzf backup.tgz –exclude=’/proc/*’ –exclude=/lost+found –exclude=/ba
    ckup.tgz –exclude=’/mnt/*’ –exclude=’/sys/*’ / . It would create a file named backup.tgz at the root directory.  Wait a while^_^.
  2. Then copy the file to the partition which I got ready for linux root directory at the X61. I used Acronis software to split the partition and size it 50GB and format it to ext3 fs. After the preparation, I copy the file to the partition. How to copy? you have many choices. i.e. , under Windows Vista you can use usb device or LAN to copy the file to NTFS fs partition(fat32 is not supposed because 4G filesize limit is end~), then use ext2ifs or other software to move the file to the ext3 partition. But I didn’t do it like that. I use a use disk whick is bootable. I installed slax over the usb disk. After booting from the usb disk, mount the ext3 fs, copy the file to it. Very easy.
  3. The last step, even easier! Pack the big file, and you can guess it will cost some time. Use the command: tar xvpfz backup.tgz -C /. After that you should fix the grub. Everyone can do it!. Get to the directories which you packed and find the command–grub. Run it and get into the grub command interface. Then “root (hd0, 5)” and “setup (hd0)”, at last “reboot”.Notice : here I supposed the ext3 fs locate on /dev/*da6.

Finish the three steps and you can boot linux at your X61~Even better, the system is configured as you wish!Of cource, some drivers are different between your X61 and PC.That’s next……

AddThis Social Bookmark Button

ntfs-3g的效率如何?

September 16th, 2008 firenet Posted in linux No Comments »

还是virtualbox崩溃引来的破事儿,重新安装了virtualbox 2.0非OSE版,接着就是安装windows 2003。随手抓了一张03的安装光盘,安装成功后再安装Office 2k3,令人郁闷的事情发生了:virtualbox提示文件大小超出限制~刚开始还没有反应过来,以前都是这么安装的呀?后来突然想到,我把虚拟机文件放到了fat 32分区,查看文件大小,确实4G了。以前安装成功,估计是那个版本的windows 2003精简过~无奈,格式化为ntfs,考虑到还需要在windows下访问这个分区。用ntfs-3g挂载分区后,开始安装。不知道是不是ntfs-3g的效率问题,CPU占用很高,速度还很慢,copy文件后的配置,平时20分钟就能完成,这次40分钟也搞不定。尝试了好几次,没办法,绕过这个问题吧,搞成ext3。如此这般,5次安装2003后,终于成功了。

AddThis Social Bookmark Button