V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
chengxuan
V2EX  ›  Linux

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

  •  
  •   chengxuan · Jul 16, 2014 · 8951 views
    This topic created in 4313 days ago, the information mentioned may be changed or developed.
    树莓派sd卡,如何把linux系统制作成为img镜像。感谢各位。
    8 replies    2014-07-16 23:49:35 +08:00
    chengxuan
        1
    chengxuan  
    OP
       Jul 16, 2014
    急急急!!
    rockagen
        2
    rockagen  
       Jul 16, 2014   ❤️ 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  
       Jul 16, 2014   ❤️ 1
    win32diskimager
    tonyluj
        4
    tonyluj  
       Jul 16, 2014   ❤️ 1
    我备份系统一般是:
    sudo dd if=/dev/sda of=/mnt/backup/backup.img

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

    看进度是: kill -USR1 pid
    clino
        5
    clino  
       Jul 16, 2014   ❤️ 1
    我们之前用的是 remastersys
    wangfeng3769
        6
    wangfeng3769  
       Jul 16, 2014   ❤️ 1
    @rockagen
    Are you a foreigner.
    hzqim
        7
    hzqim  
       Jul 16, 2014   ❤️ 1
    clonezilla
    我以前也有这样的问题: http://www.v2ex.com/t/101249#reply27
    sandtears
        8
    sandtears  
       Jul 16, 2014
    如果你要装系统的话,去官网下镜像就好了。
    如果你要自己做 dd if=/dev/sd<你的源磁盘> of=backup.img
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   963 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 22:20 · PVG 06:20 · LAX 15:20 · JFK 18:20
    ♥ Do have faith in what you're doing.