How to Create Fedora 21 Image

From XApple
Jump to: navigation, search

Contents

Step 1 Download Fedora 21 image release for ARM

    #wget https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/Fedora-Xfce-armhfp-21-5-sda.raw.xz
     others (https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/)

Step 2 Decompress image

    #xz –d  Fedora-Xfce-armhfp-21-5-sda.raw.xz

Step 3 Show partition table and mount root file system

    #fdisk -l Fedora-Xfce-armhfp-21-5-sda.raw 
     Disk Fedora-Xfce-armhfp-21-5-sda.raw: 4219 MB, 4219469824 bytes
     255 heads, 63 sectors/track, 512 cylinders, total 8241152 sectors
     Units = sectors of 1 * 512 = 512 bytes
     Sector size (logical/physical): 512 bytes / 512 bytes
     I/O size (minimum/optimal): 512 bytes / 512 bytes
     Disk identifier: 0xef090a32
     Device Boot                      Start    End     Blocks   Id System
     Fedora-Xfce-armhfp-21-5-sda.raw1 2048     1001471 499712   83 Linux
     Fedora-Xfce-armhfp-21-5-sda.raw2 1001472  2001953 500241   83 Linux
     Fedora-Xfce-armhfp-21-5-sda.raw3 2001954  7861328 2929687+ 83 Linux
    #mount   –o   loop,offset=$((2001954*512))   Fedora-Xfce-armhfp-21-5-sda.raw   /mnt

Step 4 Get Fedora 21 root file system to tarball

   #cd   /mnt ; tar –Jcvf   ~/rootfs.tar.xz   *
   #umount /mnt

Step 5 Mount your System partition from SD Card

   #mount /dev/sdb2 /mnt

Step 6 Decompress rootfs.tar.xz to System partition

   #tar –Jxvf ~/rootfs.tar.gz –C /mnt

Step 7 edit /mnt/etc/fstab

   #echo “/dev/mmcblk0p2	/	ext4		defaults,noatime	0 0”  >  / mnt/etc/fstab

Step 8 Edit /mnt/etc/shadow , delete root password

  #sed -i 's/^root.*$/root::16299:0:99999:7:::/g' /mnt/etc/shadow

Step 9 Setting auto loading Ethernet driver

  #echo “ethernet” >/etc/modprobe.d/ethernet.conf

Step 10 Install your kernel modules

  #cd <sdk_root>/kernel
  #make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=../owl/out/s500_linux_bubble_gum_sd/kernel INSTALL_MOD_PATH=/mnt modules_install
  #umount /mnt
Personal tools
Namespaces

Variants
Actions
Navigation
Tools