0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【メモ】ディスクイメージのマウント

Last updated at Posted at 2019-08-21

ディスクイメージのマウント

E.BC4 に設置した Raspberry Pi の SD カードをバックアップした。内容を確認するためにマウントした際のメモ。

パーティションの確認。

$ parted RPi_EBC4.img unit B print
警告: 管理者権限がありません。パーミッションに注意してください。
モデル:  (file)
ディスク /mnt/raid1/tmp/RPi_EBC4.img: 8068792320B
セクタサイズ (論理/物理): 512B/512B
パーティションテーブル: msdos
ディスクフラグ:

番号  開始       終了         サイズ       タイプ   ファイルシステム  フラグ
 1    4194304B   47185919B    42991616B    primary  fat32             lba
 2    47185920B  8068792319B  8021606400B  primary  ext4

2番目のパーティションをマウント。


$ sudo mount -o loop,offset=47185920,sizelimit=8021606400 RPi_EBC4.img /mnt/usbstick/

マウント後の確認、アンマウント。


$ ls /mnt/usbstick/
bin   dev  home  lost+found  mnt  proc  run   srv  tmp  var
boot  etc  lib   media       opt  root  sbin  sys  usr
$ ls /mnt/usbstick/home/pi/
Arduino                        bmp280robust.py  index.html  png             tplog.txt
arduino-1.8.2                  data             mkdata.sh   thplog.1.txt    vpneri.sh
arduino-1.8.2-linuxarm.tar.xz  hub-ctrl         mkplot.plt  thplog.txt
bme280robust.py                hub-ctrl.c       nohup.out   thplog.txt.org
$ sudo umount /mnt/usbstick
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?