Differenze tra le versioni di "Installazione Raspberry Pi"

Da Caos per caso.
Jump to navigation Jump to search
imported>Giorgio
(Created page with " cd /boot touch ssh # per abilitare SSH sudo raspi-config # per entrare nel tool di configurazione # Elenco delle schede SD montate sudo fdisk -l # Installazione scheda...")
 
imported>Giorgio
Riga 17: Riga 17:
 
  # ...and restore it
 
  # ...and restore it
 
  sudo gzip -dc image.gz | dd bs=4M of=/dev/sdb status=progress
 
  sudo gzip -dc image.gz | dd bs=4M of=/dev/sdb status=progress
 +
 +
== Motare un file img ==
 +
fdisk -l /path/to/image
 +
Mostra:
 +
Disk Stick.img: 3984 MB, 3984588800 bytes
 +
249 heads, 6 sectors/track, 5209 cylinders, total 7782400 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: 0x0004bfaa
 +
 +
    Device Boot      Start        End      Blocks  Id  System
 +
Stick.img1  *        128    8015999    4007936    b  W95 FAT32
 +
 +
So I have a block-size of 512 bytes and the start-block is 128. The offset is 512 * 128 = 65536.
 +
So the mount command would be
 +
 +
Code:
 +
mount -o loop,offset=65536 Stick.img /mnt/tmp

Versione delle 13:57, 16 mar 2018

cd /boot
touch ssh # per abilitare SSH
sudo raspi-config # per entrare nel tool di configurazione
# Elenco delle schede SD montate
sudo fdisk -l
# Installazione scheda SD
sudo dd bs=4M if=raspbian-stretch.img of=/dev/sdb status=progress conv=fsync
# Backup scheda SD
sudo dd bs=4M if=/dev/sdb of=image-`date +%Y%m%d`.img status=progress
# Create a smaller image of the SD...
sudo dd bs=4M status=progress if=/dev/sdb | gzip > image-`date +%Y%m%d`.gz
# ...and restore it
sudo gzip -dc image.gz | dd bs=4M of=/dev/sdb status=progress

Motare un file img

fdisk -l /path/to/image

Mostra:

Disk Stick.img: 3984 MB, 3984588800 bytes
249 heads, 6 sectors/track, 5209 cylinders, total 7782400 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: 0x0004bfaa
   Device Boot      Start         End      Blocks   Id  System
Stick.img1   *         128     8015999     4007936    b  W95 FAT32

So I have a block-size of 512 bytes and the start-block is 128. The offset is 512 * 128 = 65536. So the mount command would be

Code:

mount -o loop,offset=65536 Stick.img /mnt/tmp