定制并硬盘安装ArchLinux 20120804版

系统初步启动后-1.硬盘安装模块准备以下文件:grldrmenu.lstarchlinux-2012.08.04-dual.iso

内容:#cat menu.lstroot (hd0,0)kernel /arch/vmlinuz archisolabel=archisoinitrd /arch/archiso.imgboot

加载ISO#mkdir udisk#mount /dev/sdb1 /udisk#modprobe loop#losetup /dev/loop6 /udisk/arch/archlinux-2012.08.04-dual.iso#ln -s /dev/loop6 /dev/disk/by-label/archiso#exit

0.设置IP地址注意此IP是手动设置,故意不能联网,仅与另一台登陆机器相联通ifconfig eth0 192.168.0.95 netmask 255.255.255.0

1.更改密码passwd2.开启sshd服务rc.d start sshd3.查看系统IP地址ifconfig eth0 | grep netmask4.远程访问当前系统ssh root@192.168.0.95下面便可以在远程访问的系统中,通过复制粘贴来批量处理命令了,这样即提高了命令输入的速度也减少了输入错误。5.分区fdisk /dev/sda

格式化分区/dev/sda2为ext4格式mkfs.ext4 /dev/sda1mkfs.ext4 /dev/sda2mkswap /dev/sda5 && swapon /dev/sda5mount /dev/sda1 /mnt若需要挂载其它的分区如下:mount /dev/sda1 /mntmkdir /mnt/home && mount /dev/sda3 /mnt/home

6.添加网易源#vi /etc/pacman.d/mirrorlistServer = $repo/os/$arch

7.安装基本系统# pacstrap /mnt base base-devel

8.写 fstab# genfstab -p /mnt >> /mnt/etc/fstab

9.安装 grubpacstrap /mnt grub-bios

10. chroot#arch-chroot /mntmkinitcpio -p linuxgrub-install –recheck /dev/sdarc.conf文件需要添加新的行如下:LOCALE=”zh_CN.UTF-8″

/etc/locale.gen把下列行取消注释:

#en_US ISO-8859-1 #en_US.UTF-8 UTF-8 zh_CN.GB18030 GB18030 zh_CN.GBK GBK zh_CN.UTF-8 UTF-8 zh_CN GB2312 11.基本配置#echo ‘archlinux’ >> /etc/hostname#ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

12.设置密码#passwd

13.时间配置# date MMDDhhmmYYYY# hwclock –systohc# exit

14.更新系统pacman -Syu使语言设置生效:

locale-gen

15.添加用户, 配置sudopacman -S sudovisudo

16.为该用户添加sudo权限

USER_NAME ALL=(ALL) ALL%wheel ALL=(ALL) ALL

17.然后添加管理员用户useradd -m -g users -G audio,games,log,lp,optical,power,scanner,storage,video,wheel -s /bin/bash [username]

18.安装yaourt (Yet AnOther User Repository Tool)修改 /etc/pacman.conf 文件, 添加[archlinuxfr]Server = $archpacman -S yaourt

19.同步并安装,pacman -Syu openssh net-tools netcfg sshfspacman -S firefox firefox-i18n-zh-cn flashplugin fcitx leafpad audacious smplayer qtwebkit zip unrar unzip file-roller xscreensaver stardictxscreensaver安装并配置后,xfce4的锁屏按钮便可用了。

pacman -S net-tools netcfg sshfs firefox firefox-i18n-zh-cn flashplugin fcitx leafpad audacious smplayer qtwebkit zip unrar unzip file-roller xscreensaver stardict xorg-server xorg-xinit xorg-server-utils mesa dbus xfce4 xfce4-goodies lxdm

$ yaourt -S stardict将./词典文件.rar 词典文件复制到目录:/usr/share/stardict/dic

注意到, 由此开始, 可以通过命令 yaourt -S 替代 pacman -S 进行包的安装

20.安装 X Windows System, 显卡等

pacman -S xorg-server xorg-xinit xorg-server-utilspacman -S mesapacman -S xf86-video-vesapacman -S xorg-twm xorg-xclock xterm [可以省略]

测试显卡:查看显卡类型:输入命令:lspci |grep VGA 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10)根据查到的信息搜索软件包:pacman -Ss xf86-video|grep intel以下是结果extra/xf86-video-intel 2.20.6-1 (xorg-drivers xorg)最后,安装对应的显卡驱动包pacman -S xf86-video-intel

21.安装配置xfce4, slim以下关于slim的废除,代之的是lxdm---同样轻量且易操作的引导器。pacman -S dbusrc.d start dbuspacman -S xfce4 xfce4-goodies[比较大,要耐心][废除]pacman -S slim pacman -S lxdmpacman -S ttf-dejavu

配置登陆管理器:通过inittab 方式:编辑 /etc/inittab 找到如下这一行:id:3:initdefault:为了启动X11需要把’3’修改成’5’:id:5:initdefault:修改默认显示管理器编辑 /etc/inittab 找到类似如下这一行(在接近文件尾部)x:5:respawn:/usr/bin/xdm -nodaemon根据你的不同情况修改:GDM:x:5:respawn:/usr/sbin/gdm -nodaemonKDM:x:5:respawn:/usr/bin/kdm -nodaemonSLiMx:5:respawn:/usr/bin/slim >/dev/null 2>&1LXDM:x:5:respawn:/usr/sbin/lxdm >& /dev/nullLightDM:x:5:respawn:/usr/sbin/lightdm >& /dev/null下一次重启,你选择的显示管理器就会运行了。

cp /etc/skel/.xinitrc ~chmod +x ~/.xinitrcecho ‘exec startxfce4’ >>~/.xinitrc

22.修改 /etc/rc.conf 配置DAEMONS

DAEMONS=(syslogd network crond dbus slim sshd)

23.配置用户目录下 .xinitrc 文件

cp /etc/skel/.xinitrc ~chmod +x ~/.xinitrcecho ‘exec startxfce4’ >>~/.xinitrc并添加 exec startxfce4

24.使得xfce4的关机按钮可用

user hostname=NOPASSWD:/usr/lib/xfce4/xfsm-shutdown-helpershenzhi archlinuxz=NOPASSWD:/usr/lib/xfce4/xfsm-shutdown-helper

25.安装windows模拟器wine[不对外]pacman -S wine wine_gecko

26.安装PPS与QQ要使用普通用户来执行$ yaourt -S ppstream$ yaourt -S linuxqq

27.安装永中Office2012个人版下载页面:

字体显示-有锯齿字体安装由于字体有锯齿,界面很不好看,所以需要安装字体。这里首先安装永中宋体,下载页面为:# 下载后,复制到/usr/local/Yozosoft/Yozo_Office/Jre/lib/fonts,重启永中Office即可。

该字体主要解决界面的字体问题,如果需要正确显示公式,目前还是要使用Windows字体

使用Windows字体

如果电脑中装有Windows,让永中Office使用Windows字体做界面字体或许是最简便的办法:将Windows字体文件夹中的所有文件(\Windows\Fonts\)复制(或创建符号链接)到永中Office的JRE的字体夹/usr/local/Yozosoft/Yozo_Office/Jre/lib/fonts/s即可。

再打开永中Office,会发现界面会自动采用宋体。

安装Windows字体公式字体

公式显示不正确的问题目前只有通过安装Windows中的相应字体解决了。请从Windows中复制如下字体:symbol.ttf、mtextra.ttf、wingding.ttf、WINGDNG2.TTF、WINGDNG3.TTF、monotypesorts.ttf到/usr/share/fonts中的适当文件夹内,再fc-cache。

我的执行过程:[shenzhi@shenzhi fonts]$ sudo su -密码:[root@shenzhi ~]# cd /home/shenzhi/fonts/[root@shenzhi fonts]# mkdir /usr/share/fonts/msfonts[root@shenzhi fonts]# cp ./* /usr/share/fonts/msfonts/[root@shenzhi fonts]# cd /usr/share/fonts/[root@shenzhi fonts]# fc-cache[root@shenzhi fonts]#

个人版增强插件下载网页:

28.美化系统系统变一个模样,也是一件很有意思的事情。这里我仅简要说明下:外观:将对应文件复制到~/.themes,便可在“设置管理器”-“外观”-“样式”中看到。图标:将对应文件复制到~/.icons,便可在“设置管理器”-“外观”-“图标”中看到。光标:将对应文件复制到~/.icons,便可在“设置管理器”-“鼠标和触摸板”-“主题”中看到。

29.让回收站可用pacman -S gvfs dbus且在/etc/rc.conf中开启dbus服务

30.安装再生龙pacman -S coreutils ntfsprogs partimage pigz手动安装:drbl partclone clonezilla只需一条命令:yaourt -S clonezilla全部搞定以下作废:*************现在是在Grub2中的设置,clonezilla文件夹位于/dev/sda1下的/boot文件夹下。menuentry “Clonezilla For Shenzhi” { set root=(hd0,0) linux /boot/clonezilla/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\”ocs-live-general\” ocs_live_extra_param=\”\” ocs_live_keymap=\”\” ocs_live_batch=\”no\” ocs_lang=\”\” vga=788 ip=frommedia nosplash live-media-path=/boot/clonezilla/live bootfrom=/dev/sda1 toram=filesystem.squashfs initrd /boot/clonezilla/live/initrd.img }*************

31.使用再生龙值得注意的是,在虚拟机VirtualBox中所测试的结果是,可以安装成功,也可以运行,但是却无法看到当前系统下的分区信息致使安装失败。[shenzhi@archlinuxz root]$ clonezilla

[shenzhi] You need to run this script “clonezilla” as root.[root@archlinuxz ~]# clonezilla NCHC自由软件实验室 – 台湾 ┌───────────────────────────────┤ Clonezilla ├────────────────────────────────┐│ *再生龙是自由(GPL)软件,但是完全没有任何保证,请自行评估风险后使用* ││ ///提示! ││ 往后如果有复选的选项让您选择,您必须使用空白键来标示您的选择,被标示选到的部 ││ 分会出现星号(*)/// ││ 两种模式可以使用,您可以选择 ││ (1) 硬盘/分区存成镜像文件或者镜像文件还原到硬盘/分区, ││ (2) 硬盘对拷或者分区对拷. ││ ││ device-image 硬盘/分区[存到/来自]镜像文件 ││ device-device 硬盘/分区复制到硬盘/分区 ││ ││ ││ <确定> <取消> ││ │└──────────────────────────────────────────────────────────────────────────────┘ 32.安装Docky安装完成后,所有的动态效果全部都有了。pacman -S docky

目标 (15): dbus-sharp-0.7.0-4 dbus-sharp-glib-0.5.0-4 gconf-3.2.5-2 gconf-sharp-2.24.2-2 gnome-desktop2-2.32.1-2 gnome-keyring-sharp-1.0.2-4 gtk-sharp-2-2.12.11-1 libgdiplus-2.10-2 libgnome-desktop-sharp-2.26.0-8 mono-2.10.8-1 mono-addins-0.6.2-2 notify-sharp-0.4.0.3032-2 rsvg2-sharp-2.26.0-8 wnck-sharp-2.26.0-8 docky-2.1.4-1

全部下载大小:36.68 MiB

33.安装桌面壁纸pacman -S archlinux-wallpaper壁纸安装后目录:/usr/share/archlinux/wallpaper

34.安装VirtualBoxpacman -S virtualbox目标 (3): libvncserver-0.9.9-1 virtualbox-modules-4.1.20-3 virtualbox-4.1.20-2===> You must load vboxdrv module before starting VirtualBox:===> # modprobe vboxdrv

35.安装图形化分区工具pacman -S gpartedgparted 的可选依赖 dosfstools: for FAT16 and FAT32 partitions jfsutils: for jfs partitions ntfsprogs: for ntfs partitions reiserfsprogs: for reiser partitions xfsprogs: for xfs partitions nilfs-utils: for nilfs2 support polkit: to run gparted directly from menu gpart: for recovering corrupt partition tables mtools安装依赖:pacman -S dosfstools jfsutils ntfsprogs

36.寻找丢失的分区通过gparted无法找回,DiskGenius依然无果,无奈中看到了testdisk。安装后尝试,分区回归!!!安装testdisk:pacman -S testdisk目标 (2): progsreiserfs-0.3.0.5-7 testdisk-6.13-2[root@zllinux ~]# testdisk选择Create,开始进行分析。Use arrow keys to select, then press Enter key:>[ Create ] Create a new log file[ Append ] Append information to log file[ No Log ] Don’t record anything

选择对应磁盘,因我的只有一个,故不用选择,直接ProceedSelect a media (use Arrow keys, then press Enter):>Disk /dev/sda – 250 GB / 232 GiB – ST3250318AS

>[Proceed ] [ Quit ]

显示关于当前磁盘的详细信息,ContinueDisk /dev/sda – 250 GB / 232 GiB – ST3250318AS

Hidden sectors are present.

size 488395055 sectorsuser_max 488395055 sectorsnative_max 488397168 sectorsdco 488397168 sectorsHost Protected Area (HPA) present.

>[ Continue ] Continue even if there are hidden data

如果和我的一样为普通PC机,,选择Intel,若是苹果机选择MAC,其它自行思考Please select the partition table type, press Enter when done.>[Intel ] Intel/PC partition[EFI GPT] EFI GPT partition map (Mac i386, some x86_64…)[Humax ] Humax partition table[Mac ] Apple partition map[None ] Non partitioned media[Sun ] Sun Solaris partition[XBox ] XBox partition[Return ] Return to disk selection

选择Analyse,开始搜索分区>[ Analyse ] Analyse current partition structure and search for lost partitions[ Advanced ] Filesystem Utils[ Geometry ] Change disk geometry[ Options ] Modify options[ MBR Code ] Write TestDisk MBR code to first sector[ Delete ] Delete all data in the partition table[ Quit ] Return to disk selection

显示搜索前,即当前磁盘信息,选择Quick SearchCurrent partition structure: Partition Start End Size in sectors

1 * HPFS – NTFS 0 1 1 130 254 63 2104452Invalid FAT boot sector2 P FAT32 LBA 131 0 1 1213 254 63 173983952 P FAT32 LBA 131 0 1 1213 254 63 173983953 P Linux Swap 1214 0 1 1298 254 63 13655253 P Linux Swap 1214 0 1 1298 254 63 13655254 E extended 1299 74 57 30401 42 41 467521599*=Primary bootable P=Primary L=Logical E=Extended D=Deleted>[Quick Search] [ Backup ]

询问磁盘中的分区是否是在Windows系统下划分,如果不知道则可选择Y无妨,这里我选择YShould TestDisk search for partition created under Vista or later ? [Y/N](answer Yes if unsure)

Disk /dev/sda – 250 GB / 232 GiB – CHS 30402 255 63 Partition Start End Size in sectors* HPFS – NTFS 0 1 1 130 254 63 2104452P Linux 131 0 1 1213 254 60 17398392>P Linux 1299 75 57 30401 42 41 467521536 [vmos]

Structure: Ok. Use Up/Down Arrow keys to select partition.Use Left/Right Arrow keys to CHANGE partition characteristics:*=Primary bootable P=Primary L=Logical E=Extended D=DeletedKeys A: add partition, L: load backup, T: change type, P: list files, Enter: to continue

选中>P Linux 1299 75 57 30401 42 41 467521536 [vmos]行选择Enter键,继续。选择Write保存Disk /dev/sda – 250 GB / 232 GiB – CHS 30402 255 63

Partition Start End Size in sectors

1 * HPFS – NTFS 0 1 1 130 254 63 21044522 P Linux 131 0 1 1213 254 60 173983923 P Linux 1299 75 57 30401 42 41 467521536 [vmos]

[ Quit ] [Deeper Search] >[ Write ]

再次确定保存分区的更改。输入YWrite partition table, confirm ? (Y/N)

需要重启系统才可生效You will have to reboot for the change to take effect.

TestDisk 6.13, Data Recovery Utility, November 2011Christophe GRENIER <grenier@cgsecurity.org>TestDisk exited normally.You have to reboot for the change to take effect.

37.远程登录Windows桌面pacman -S rdesktoprdesktop -u administrator -p [password] -g 1024*768 [ip]rdesktop -u administrator -p tcyhljc -g 1024*768 192.168.0.102

38.安装下载工具pacman -S uget aria2

走走停停,不要害怕错过什么,

定制并硬盘安装ArchLinux 20120804版

相关文章:

你感兴趣的文章:

标签云: