Linux - ISO-Image bearbeiten (RPI): Unterschied zwischen den Versionen

Aus Nicki Wiki
Zur Navigation springen Zur Suche springen
Zeile 6: Zeile 6:


Ausgabe:
Ausgabe:
  Device        Boot Start    End  Blocks  Size Id System
  Device        Boot Start    End  Blocks  Size Id System
  raspbian.img1       '''8192'''  532479  '''524288'''  256M  c W95 FAT32 (LBA)
  raspbian.img1       '''8192'''  532479  '''524288'''  256M  c W95 FAT32 (LBA)
  raspbian.img2     '''532480''' 3661823 '''3129344'''  1,5G 83 Linux
  raspbian.img2     '''532480''' 3661823 '''3129344'''  1,5G 83 Linux


= Partitionen einhängen (mount) =
= Partitionen einhängen (mount) =

Version vom 9. Juni 2021, 12:48 Uhr

Einbinden und bearbeiten von Disk-Images (img) wie z.B. Rapberry OS - raspbian.

Partitionen

Auflistung der Partitionen des Disk-Images (raspian.img).

fdisk -l raspian.img

Ausgabe:

Device        Boot  Start     End  Blocks  Size Id System
raspbian.img1        8192  532479  524288  256M  c W95 FAT32 (LBA)
raspbian.img2      532480 3661823 3129344  1,5G 83 Linux

Partitionen einhängen (mount)

Anlegen der mount-Ordner.

sudo mkdir /mnt/img1 /mnt/img2

Einbinden der Partitionen.

sudo mount -o loop,offset=$((512 * 8192)),sizelimit=$((512 * 524288)) raspbian.img /mnt/img1/
sudo mount -o loop,offset=$((512 * 122880)),sizelimit=$((512 * 3129344)) raspbian.img /mnt/img2/

Danach kann in /mnt/img1/ oder /mnt/img2/ Dateien bearbeitet werden.

Partitionen aushängen (umount)

umount /mnt/img1/
umount /mnt/img2/