V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
chengxuan
V2EX  ›  Linux

求助,如何把 linux 系统制作成为 img 镜像

  •  
  •   chengxuan · 2014-07-16 14:42:07 +08:00 · 8043 次点击
    这是一个创建于 3572 天前的主题,其中的信息可能已经有所发展或是发生改变。
    树莓派sd卡,如何把linux系统制作成为img镜像。感谢各位。
    8 条回复    2014-07-16 23:49:35 +08:00
    chengxuan
        1
    chengxuan  
    OP
       2014-07-16 15:16:59 +08:00
    急急急!!
    rockagen
        2
    rockagen  
       2014-07-16 15:29:36 +08:00   ❤️ 1
    wait.i tell you how to use linux kernel build a linux system


    First,you must have a installed linux system computer and compiled linux kernel.


    let's go.

    #dd if=/dev/zero of=sd.img bs=1M count=512

    #losetup /dev/loop0 sd.img

    #fdisk /dev/loop0 (create "/dev/loop0p1", "/dev/loop0p2" primary partitions,"loop0p1 is for boot partition,"loop0p2" is for root partition )

    #mkfs -t ext2 /dev/loop0p1
    #mkfs -t ext4 /dev/loop0p2

    #mount /dev/loop0p1 /mnt/boot
    #mount /dev/loop0p2 /mnt/root

    now,
    copy your compiled linux kernel (vmlinuz,system.map,initrd) files to boot partition
    create some linux files and command(busybox?) on root partition(you can copy those files from you host system)

    grub is come
    #grub
    ##device (hd0) sd.img
    ##root (hd0,0)
    ##find /vmlinuz-xxx
    ##setup (hd0)

    then create your menu.lst on /boot/grub folder

    finally,you can modify this sd.img anytime anywhere if you want fuck her.

    good luck!
    nefuer
        3
    nefuer  
       2014-07-16 15:29:47 +08:00   ❤️ 1
    win32diskimager
    tonyluj
        4
    tonyluj  
       2014-07-16 15:44:26 +08:00   ❤️ 1
    我备份系统一般是:
    sudo dd if=/dev/sda of=/mnt/backup/backup.img

    缺点是全盘备份,未使用的也写入了。

    看进度是: kill -USR1 pid
    clino
        5
    clino  
       2014-07-16 16:21:40 +08:00   ❤️ 1
    我们之前用的是 remastersys
    wangfeng3769
        6
    wangfeng3769  
       2014-07-16 16:23:12 +08:00   ❤️ 1
    @rockagen
    Are you a foreigner.
    hzqim
        7
    hzqim  
       2014-07-16 16:31:35 +08:00   ❤️ 1
    clonezilla
    我以前也有这样的问题: http://www.v2ex.com/t/101249#reply27
    sandtears
        8
    sandtears  
       2014-07-16 23:49:35 +08:00
    如果你要装系统的话,去官网下镜像就好了。
    如果你要自己做 dd if=/dev/sd<你的源磁盘> of=backup.img
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2893 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:04 · PVG 11:04 · LAX 20:04 · JFK 23:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.