ArchLinux 2011.8 基于grub的硬盘安装简易指南

本文论述在有grub的前提下,通过grub直接载入iso映像安装archlinux的先行步骤。

参考文献:

Boot an iso via Grub2

GNU Grub2 mannual

Arch-wiki

首先,找到通过grub的ls命令找到iso文件所在分区的名字,可以先ls显示所有分区,再对每一个分区执行ls以查看文件。

假设在ls (hd0,1)下有archlinux-2011.08.19-core-i686.iso,我们利用loopback来把iso映射为loop设备,以此引导系统

loopback loop (hd0,1)/archlinux-2011.08.19-core-i686.iso
linux    (loop)/arch/boot/i686/vmlinuz archisolabel=ARCH2011_08
initrd  (loop)/arch/boot/i686/archiso.img
boot

这时应该可以进入到arch的安装界面,然后它会提示找不到安装介质waiting for device,我们要再做一次映射:

(以下摘自archwiki )

注意这里增加了参数archisolabel=archiso,archisolabel参数用于指定在引导安装环境时所选安装源的标签(label)
若是用2011.08的ISO,在启动过程中会查找/dev/disk/by-label/archiso文件,如果找不到(因为使用的硬盘ISO方式),会得到一个shell,通过这个shell可以手动使用losetup将ISO挂到某个loop设备上,最后将这个loop设备ln到/dev/disk/by-label/archiso。
注意这里的archiso即grub引导时内核参数archisolabel的值,如果在grub引导内核时未指定参数,那么这里将无法读取到光盘镜像。
#mkdir /win
#mkdir -p /dev/disk/by-label
#mount -r -t ntfs /dev/sda1 /win
#modprobe loop
#losetup /dev/loop6 /win/archlinux-2011.08-core-i686.iso
#ln -s /dev/loop6 /dev/disk/by-label/ARCH2011_08
#exit
注意:这句#mount -r -t ntfs /dev/sda1 /win中的ntfs,如果你用到的分区是fat32格式,请将其改为vfat。
使用exit(Ctrl-D)退出shell,就可以进入安装环境,剩下的安装过程基本同光盘安装一样,可以参考正式的安装向导

(假设你的iso文件在/dev/sda1下)

注意!:archlinux硬盘安装中对硬盘分区更改时请注意源grub所在分区,如果中途安装重启时如果arch的grub还没有写入系统将会面临没有引导项的窘境,此时进入的grub rescure中是无法使用loopback命令的,也就是这时你无法从硬盘载入ISO!

所以如果更改/删除原grub分区时要保证arch的grub在下一次引导系统之前写入磁盘

ArchLinux 2011.8 基于grub的硬盘安装简易指南》上有1条评论

  1. Rashad Scheets

    Hello Web Admin, I noticed that your On-Page SEO is not that great, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword….wait there’s even more Now what if i told you there was a simple WordPress plugin that does all the On-Page SEO, and automatically for you? That’s right AUTOMATICALLY, just watch this 4minute video for more information at. WordPress Seo Plugin

    回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注