2020년 2월 8일 토요일

라즈베리 파이 : CM3 파티션 <참조>

sudo ./rpiboot
Waiting for BCM2835/6/7
Sending bootcode.bin
Successful read 4 bytes
Waiting for BCM2835/6/7
Second stage boot server
File read: start.elf
Second stage boot server done


lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 29.1G  0 disk
tqsda1        8:1    1  256M  0 part /media/pi/boot
mqsda2        8:2    1 28.9G  0 part /media/pi/rootfs
mmcblk0     179:0    0 14.9G  0 disk
tqmmcblk0p1 179:1    0  256M  0 part /boot
mqmmcblk0p2 179:2    0 14.6G  0 part /


----------------------------------------------------------------------
sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): m

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table


Command (m for help):

----------------------------------------------------------------------
Command (m for help): p
Disk /dev/sda: 29.1 GiB, 31268536320 bytes, 61071360 sectors
Disk model: 0001
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd9b3f436

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         8192   532479   524288  256M  c W95 FAT32 (LBA)
/dev/sda2       532480 61071359 60538880 28.9G 83 Linux

Command (m for help): i
Partition number (1,2, default 2):

         Device: /dev/sda2
          Start: 532480
            End: 61071359
        Sectors: 60538880
      Cylinders: 29561
           Size: 28.9G
             Id: 83
           Type: Linux
    Start-C/H/S: 1023/3/32
      End-C/H/S: 1023/63/32

Command (m for help): i
Partition number (1,2, default 2): 1

         Device: /dev/sda1
          Start: 8192
            End: 532479
        Sectors: 524288
      Cylinders: 257
           Size: 256M
             Id: c
           Type: W95 FAT32 (LBA)
    Start-C/H/S: 64/0/1
      End-C/H/S: 1023/3/32

Command (m for help):

==============================================================================
[참조]
parted -s /dev/mmcblk1 mklabel msdos
parted -s /dev/mmcblk1  unit cyl mkpart primary fat32 -- 0 9
parted -s /dev/mmcblk1  set 1 boot on
parted -s /dev/mmcblk1 unit cyl mkpart primary ext2 -- 9 -2

fdisk -l /dev/mmcblk1
mkfs.vfat -F 32 -n "boot" /dev/mmcblk1p1
mkfs.ext3 -L "rootfs" /dev/mmcblk1p2

==============================================================================

dd if=/dev/sda of=~/CM3/usbboot/nfs_share/back_up.img bs=512 count=60538880


----------------------------------------------------------------------



댓글 없음:

댓글 쓰기