Grub4dos 安装配置
从sourceforge 下载 grub4dos,发现google上 chenall修改的有问题,启动时会报NTFS5错误。
在C:放置
grldr、grldr.mbr、menu.lst三个文件,编辑 menu.lst ,增加如下条目
title install Arch Linux find --set-root /archlinux-2013.01.04-dual.iso map --mem --heads=0 --sectors-per-track=0 /archlinux-2013.01.04-dual.iso (0xff) map --hook chainloader (0xff) boot
接下来配置 bcdedit,启动命令行,
bcdedit /create /d "Grub4dos" /application bootsector
记下返回的全局符号。
bcdedit /set {GUID} device partition=c:
bcdedit /set {GUID} path \grldr.mbr
bcdedit /displayorder {GUID} /addlast
完成。
也可以编辑 boot.ini,可以参考 http://www.kisa747.com/windows7-grub4dos.html 这个博客。
重启,启动菜单选择 grub4dos,就有Arch界面了。选择 X64 或者 X32,加载光盘会有问题,
返回到 drop shell ,做如下处理
mkdir iso mount -t ntfs -o ro /dev/sda3 iso modprobe loop losetup /dev/loop2 iso/archlinux-2013.01.04-dual.iso ln -s /dev/loop2 /dev/disk/by-label/ARCH_201301
exit
如果报 /dev/disk/by-label/ARCH_201301,则先移除 rm /dev/disk/by-label/ARCH_201301,再创建软链接。
exit 后会自动启动安装。参考wiki处理即可。
network-manager 连接 vpn
默认vpn设置打不开,安装 networkmanager-pptp vpn设置可以设置上,但是连接按钮点了没效果。
需要再安装 networkmanager-vpnc 才可以。
pacman 获取源代码
1.安装 abs
pacman -S abs
2.编辑 abs.conf
As root, edit /etc/abs.conf to include your desired repositories: vim /etc/abs.conf
or: nano /etc/abs.conf
. Remove the ! in front of the appropriate repos, e.g.: REPOS=(core extra community !testing)
3.下载ABS树
Download the ABS tree As root, run:
[gaohu@vb-arch ~]$ sudo abs
Your ABS tree is now created under /var/abs. The above step is done once for all (run abs
from time to time to update the source tree though). Next,say if you want the source code of the linux command find
find out which package the command find
belongs to:
pacman -Qo `which find`
-Q表示查询, -o 表示查询所有者
pacman -Qi coreutils
-i 查询所在的组。
The result is "/usr/bin/find is owned by findutils 4.4.2-4".
cp -r /var/abs/core/findutils /home/gaohu/t_src cd /home/gaohu/t_src
Then run makepkg
:
-
if you only want to get the sources and don't want to build the package you can run
makepkg -od
-
otherwise run
makepkg -s
which will then handle all the package's dependencies automatically
If you want to install the package you've built, run
pacman -U name-of-package.xz
virtualbox 的网卡
virutalbox的网卡vboxnet0不受 networkmanager 管理,每次开机查看,都是 down 的状态,导致虚拟机使用是老是访问不到主机,调整如下:
sudo ip addr add 192.168.56.1/24 dev vboxnet0
sudo ip link set vboxnet0 up
查看状态
ip addr 或者 ip link 命令正常了,
PS: 调整网关的命令:
ip route add default via 192.168.56.1
bash set locale 报错
一次升级后,在登录以及su切换时,报如下错误:
[tigertall@arch-g ~]$ su - root Password: -bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory -bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory -bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory -bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory -bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
在 rc.conf 中指定的是 en_US.UTF-8,检查 /etc/locale.gen 发现,所有的 locale 都被注释掉了。
重新打开需要的条目,执行命令生成 locale:
[root@arch-g ~]# locale-gen
Generating locales...
en_US.UTF-8... done
zh_CN.UTF-8... done
zh_CN.GB2312... done
Generation complete.
查看可用的locale:
[root@arch-g ~]# locale -a C en_US.utf8 POSIX zh_CN zh_CN.gb2312 zh_CN.utf8
- virtualbox 启动时报
[tiger@tg-arch ~]$ virtualbox
Qt WARNING: QGtkStyle was unable to detect the current GTK+ theme.
能正常启动,但是界面会比较丑陋,安装如下包解决
pacman -S libgnomeui
-
科学计算器,不是 gcalctool,而是
galculator - 显示菜单的配置 /usr/share/applications/,后面 .desktop 后缀的就是菜单项;也可以通过 gmenu-simple-editor 、或者 alacarte 编辑。