[FZH] 请教怎么克隆Fedora系统?dump/clonezilla/dd/tar均可,求步骤

Yuan Yijun bbbush.yuan at gmail.com
Thu Dec 6 15:08:34 UTC 2012


猜测: tar 不保留 selinux label,所以需要 touch /.autorelabel && reboot


2012/12/6 Johnny Tao <johnnybeijing在gmail.com>

> 我遇到的plymouthd问题类似这个:https://bugzilla.redhat.com/show_bug.cgi?id=830568
>
>
> 2012/12/6 Johnny Tao <johnnybeijing在gmail.com>
>
> > 今天使用tar来备份和还原系统问题多多,现在grub2已经过了,卡在了接下来启动画面的plymouthd位置
> >
> > chroot后执行了systemctl mask plymouth-start.service 也没有帮助,请教大家一下呢
> >
> >
> >
> > 说下我备份/还原的大体步骤
> >
> > 1. 首先我依次备份了/ 和 /boot系统,解压到新的ssd磁盘分区中;
> >
> > #/
> > tar cvpzf backup.tgz / --exclude=/proc --exclude=/sys
> > --exclude=/lost+found --exclude=/media --exclude=/mnt
> --exclude=backup.tgz
> > --exclude=/home --exclude=/boot --exclude=/run
> >
> > #boot
> > tar cvpzf boot.tgz /boot
> >
> > 2. 分别更新的UUID对应到新的分区/etc/fsta和/etc/grub2/grub.cfg
> >
> >
> >
> >
> >
> >
> > On Wed, Dec 5, 2012 at 1:54 PM, Johnny Tao <johnnybeijing在gmail.com
> >wrote:
> >
> >> @Tommy He,谢谢回复~
> >> 看了下当前的分区表为msdos,一共就120G的SSD好像没有必要玩UEFI了意义可能不大;
> >> 我的这台X230i的BIOS里面也好像有UEFI的选项
> >>
> >> [jtao在johnny-laptop Downloads]$ sudo parted /dev/sda print
> >> Model: ATA ST320LT007-9ZV14 (scsi)
> >> Disk /dev/sda: 320GB
> >> Sector size (logical/physical): 512B/4096B
> >> Partition Table: msdos
> >> Disk Flags:
> >>
> >> Number  Start   End     Size    Type      File system     Flags
> >>  1      1049kB  525MB   524MB   primary   ext4            boot
> >>  2      525MB   54.2GB  53.7GB  primary   ext4
> >>  3      54.2GB  60.2GB  6006MB  primary   linux-swap(v1)
> >>  4      60.2GB  320GB   260GB   extended
> >>  5      60.2GB  320GB   260GB   logical   ext4
> >>
> >>
> >>
> >>
> >> On Wed, Dec 5, 2012 at 1:34 PM, Tommy He <lovenemesis在fedoraproject.org
> >wrote:
> >>
> >>> 题外话:其实吧,我觉得这个好机会转向使用 GPT 分区表,未来升级 UEFI 的机子也方便……
> >>>
> >>> On Wed, Dec 5, 2012 at 12:01 PM, Johnny Tao <johnnybeijing在gmail.com>
> >>> wrote:
> >>> > 不好意思前面邮件没说清楚;sda为现在正在使用的320g的机械硬盘装有Fedora17
> >>> >
> >>>
> 64bit,sdb作为目标ssd磁盘尚未分区,使用USB盒子连到我的笔记本电脑,我想到的步骤是,不知道是否有更简单的方法?麻烦大家帮忙看下,是否tar/dump会更简单?
> >>> >
> >>> > 1. 使用fdisk/cfdisk
> >>> > 为sdb分区分别为500M(/boot),20G(/),4G(swap,现在内存升级到10g这个区也可不要),剩余给(/home)
> >>> > 2.
> 使用clonezilla把sda现有的分区依次克隆到sdb的每个分区中(不保护swap),这里可能要查一下跳过目标磁盘大于源磁盘的参数
> >>> > 3. 使用sdb作为启动盘,修复grub2的启动项,版本2的步骤还不清楚,回头查下文档。
> >>> >
> >>> >
> >>> > 这里是sda的fstab
> >>> >
> >>> > [jtao在johnny-laptop ~]$ cat /etc/fstab
> >>> >
> >>> > #
> >>> > # /etc/fstab
> >>> > # Created by anaconda on Thu Nov 29 10:28:58 2012
> >>> > #
> >>> > # Accessible filesystems, by reference, are maintained under
> >>> '/dev/disk'
> >>> > # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for
> more
> >>> info
> >>> > #
> >>> > UUID=97481eda-a608-4bee-ace8-faa0d59ad677 /
> ext4
> >>> > defaults        1 1
> >>> > UUID=a615302b-eae4-4bad-a553-1e7c473b7223 /boot
> ext4
> >>> > defaults        1 2
> >>> > UUID=098f62c4-4f33-4c0d-82a9-98d203be4a1f /home
> ext4
> >>> > defaults        1 2
> >>> > UUID=cec9ee8e-7893-478c-afc2-2c440a7c3579 swap
>  swap
> >>> > defaults        0 0
> >>> >
> >>> >
> >>> >
> >>> > On Tue, Dec 4, 2012 at 4:11 PM, Christopher Meng <cickumqt在gmail.com
> >
> >>> wrote:
> >>> >
> >>> >> 每个设备文件代表什么?哪个是Fedora的?
> >>> >>
> >>> >>
> >>> >>
> >>> >> *Yours sincerely,*
> >>> >> *Christopher Meng*
> >>> >>
> >>> >> Ambassador/Contributor of Fedora Project and many others.
> >>> >> http://cicku.me
> >>> >> http://mirrors.cicku.me
> >>> >>
> >>> >>
> >>> >>
> >>> >> On Tue, Dec 4, 2012 at 4:01 PM, Johnny Tao <johnnybeijing在gmail.com
> >
> >>> >> wrote:
> >>> >>
> >>> >> > 想省事直接克隆过去,麻烦大家给点建议,谢谢
> >>> >> >
> >>> >> > target:120g SSD
> >>> >> > source:320g 机械硬盘,分区如下
> >>> >> >
> >>> >> > [jtao在johnny-laptop Scripts]$ sudo fdisk -l /dev/sda
> >>> >> >
> >>> >> > Disk /dev/sda: 320.1 GB, 320072933376 bytes
> >>> >> > 255 heads, 63 sectors/track, 38913 cylinders, total 625142448
> >>> sectors
> >>> >> > Units = sectors of 1 * 512 = 512 bytes
> >>> >> > Sector size (logical/physical): 512 bytes / 4096 bytes
> >>> >> > I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> >>> >> > Disk identifier: 0x00077a05
> >>> >> >
> >>> >> >    Device Boot      Start         End      Blocks   Id  System
> >>> >> > /dev/sda1   *        2048     1026047      512000   83  Linux
> >>> >> > /dev/sda2         1026048   105883647    52428800   83  Linux
> >>> >> > /dev/sda3       105883648   117614591     5865472   82  Linux
> swap /
> >>> >> > Solaris
> >>> >> > /dev/sda4       117614592   625142447   253763928    5  Extended
> >>> >> > /dev/sda5       117616640   625141759   253762560   83  Linux
> >>> >> > --
> >>> >> > Fedora中文郵件列表:
> >>> https://admin.fedoraproject.org/mailman/listinfo/chinese
> >>> >> >
> >>> >>
> >>> >> --
> >>> >> Fedora中文郵件列表:
> https://admin.fedoraproject.org/mailman/listinfo/chinese
> >>> >>
> >>> >>
> >>> >
> >>> > --
> >>> > Fedora中文郵件列表:
> https://admin.fedoraproject.org/mailman/listinfo/chinese
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Take a Deep Breath out of Windows
> >>>
> >>> https://fedoraproject.org/wiki/User:Lovenemesis
> >>> --
> >>> Fedora中文郵件列表:https://admin.fedoraproject.org/mailman/listinfo/chinese
> >>>
> >>
> >>
> >
>
> --
> Fedora中文郵件列表:https://admin.fedoraproject.org/mailman/listinfo/chinese
>
>


-- 
bbbush ^_^


More information about the Chinese mailing list