免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1159 | 回复: 0
打印 上一主题 下一主题

Installing Fedora 12 LiveCD to Hard Disk [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-10 14:26 |只看该作者 |倒序浏览
Installing Fedora 12 LiveCD to Hard Disk
Chinese title: 将Fedora 12 LiveCD安装到硬盘上

By beta-song, 2009-10-10

Keyword: Fedora 12, LiveCD, Hard disk

LiveCD maybe the fastest way for end users to experience new systems, almost every linux distribution supplys such a thing. But LiveCD got its limitations: you need a CD/DVD drive populated in your computer, you run into extreamly slow perforance issues, you can not install any software, you can not save anything you changed to the new system, ……, etc. When I tried "Fedora 12 snap3" LiveCD in my laptop, I even found out that the mouse cursor could not locate things correctly, there was more than one inch offset to the right position!

This tutorial describes how to install Fedora 12 LiveCD to harddisk. I don't issue any guarantee that this will work for you.

1 Preliminary note
I use Fedora 12 snapshot 3 LiveCD, you can find the download address in the last part of this article. The image name is F12-Snap3-x86_64-Live.iso.

2 Have a look at the layout of the image
[root@beta-song mnt]# mkdir livecd squashfs ext3fs
[root@beta-song mnt]# mount -o loop F12-Snap3-x86_64-Live.iso livecd
[root@beta-song mnt]# ls livecd
EFI  GPL  isolinux  LiveOS  README
[root@beta-song mnt]# ls livecd/LiveOS/ -l
total 649461
-r-xr-xr-x 1 root root     21364 Sep 18 07:12 livecd-iso-to-disk
-r-xr-xr-x 1 root root      8192 Sep 18 07:13 osmin.img
-r-xr-xr-x 1 root root 665018368 Sep 18 07:15 squashfs.img
[root@beta-song mnt]# mount -o loop livecd/LiveOS/squashfs.img squashfs
[root@beta-song mnt]# ls squashfs
ext3fs.img
[root@beta-song mnt]# mount -o loop squashfs/ext3fs.img ext3fs

Now see what we got, there they are:
[root@beta-song mnt]# ls ext3fs/
bin  boot  dev  etc  home  lib  lib64  lost+found  media mnt  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var

3 Install the system to harddisk
Prepare a new Ext3/Ext4 partition, let's say /dev/sda2.
[root@beta-song mnt]# mkfs.ext4 /dev/sda2

Copy all the stuff under directory ext3fs/ to the partition.
[root@beta-song mnt]# mkdir sda2
[root@beta-song mnt]# mount /dev/sda2 sda2
[root@beta-song mnt]# cp -dpR ext3fs/* sda2/

Modify the first line of /etc/fstab to make it right for our case:
[root@localhost mnt]# cat sda2/etc/fstab
/dev/root  /         ext4    defaults,noatime 0 0
devpts     /dev/pts  devpts  gid=5,mode=620   0 0
tmpfs      /dev/shm  tmpfs   defaults         0 0
proc       /proc     proc    defaults         0 0
sysfs      /sys      sysfs   defaults         0 0

Change "/dev/root" to "/dev/sda2" as our case, then add new grub entry for this system. we are done!

4 Links
* This article:
http://blog.chinaunix.net/u/8754/showart_2067083.html
* Beta-song' blog:
http://sxg.cublog.cn
* Fedora-12-snap3:
http://torrent.fedoraproject.org/torrents/



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8754/showart_2067083.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP