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

Aus Nicki Wiki
Zur Navigation springen Zur Suche springen
 
(24 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 6: Zeile 6:


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


= Partitionen einhängen (mount) =
= Partitionen einhängen (mount) =
Anlegen der mount-Ordner.
Anlegen der mount-Ordner.
  mkdir /mnt/img1 /mnt/img2
  sudo mkdir /mnt/img1 /mnt/img2


Einbinden der Partitionen.
Einbinden der Partitionen.
  mount -o loop,offset=$((512 * 8192)) raspbian.img /mnt/img1/
  sudo mount -o loop,offset=$((512 * '''8192''')),sizelimit=$((512 * '''524288''')) raspbian.img /mnt/img1/
  mount -o loop,offset=$((512 * 122880)) raspbian.img /mnt/img2/
  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.
Danach kann in /mnt/img1/ oder /mnt/img2/ Dateien bearbeitet werden.


= Partitionen aushängen (umount) =
= Partitionen aushängen (umount) =
  umount /mnt/img1/
  sudo umount /mnt/img1/
  umount /mnt/img2/
  sudo umount /mnt/img2/

Aktuelle Version vom 9. Juni 2021, 12:49 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)

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