Chinaunix首页 | 论坛 | 博客
  • 博客访问: 898983
  • 博文数量: 194
  • 博客积分: 7991
  • 博客等级: 少将
  • 技术积分: 2067
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-09 22:03
文章分类

全部博文(194)

文章存档

2010年(8)

2009年(71)

2008年(109)

2007年(6)

我的朋友

分类: LINUX

2009-10-10 14:26:02

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:
 
阅读(2231) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-10-10 19:39:09

When booted into f12 from LiveCD, you can find "Install system to harddisk" menu or something like that. Use it if you dont like my way.