Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fuzzykiller/6c4ceec944e1743c86bf15323fd41fd8 to your computer and use it in GitHub Desktop.
Save fuzzykiller/6c4ceec944e1743c86bf15323fd41fd8 to your computer and use it in GitHub Desktop.
Loop-mounting ISOHYBRID
[root@db-nb-08 fuzzy]# losetup -P loop0 debian-8.5.0-i386-netinst.iso
[root@db-nb-08 fuzzy]# losetup -P loop1 slacko-6.3.0.iso
[root@db-nb-08 fuzzy]# mount /dev/loop0p1 /mnt/bla
mount: /dev/loop0p1 is write-protected, mounting read-only
[root@db-nb-08 fuzzy]# ls -l /mnt/bla
total 981
-r--r--r-- 1 root root 146 Jun 4 16:08 autorun.inf
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 boot
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 css
lr-xr-xr-x 1 root root 1 Jun 4 16:08 debian -> .
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 dists
dr-xr-xr-x 1 root root 4096 Jun 4 16:08 doc
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 efi
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 firmware
-r--r--r-- 1 root root 180335 Jun 2 12:20 g2ldr
-r--r--r-- 1 root root 8192 Jun 2 12:20 g2ldr.mbr
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 install
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 install.386
dr-xr-xr-x 1 root root 4096 Jun 4 16:08 isolinux
-r--r--r-- 1 root root 113329 Jun 4 16:10 md5sum.txt
dr-xr-xr-x 1 root root 4096 Jun 4 16:08 pics
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 pool
-r--r--r-- 1 root root 8869 Jun 4 16:10 README.html
-r--r--r-- 1 root root 185525 Jun 1 09:52 README.mirrors.html
-r--r--r-- 1 root root 100349 Jun 1 09:52 README.mirrors.txt
-r--r--r-- 1 root root 461 Jun 4 16:08 README.source
-r--r--r-- 1 root root 5481 Jun 4 16:10 README.txt
-r--r--r-- 1 root root 368480 Jun 2 12:20 setup.exe
dr-xr-xr-x 1 root root 2048 Jun 4 16:08 tools
-r--r--r-- 1 root root 228 Jun 4 16:08 win32-loader.ini
[root@db-nb-08 fuzzy]# mount | grep /mnt/bla
/dev/loop0p1 on /mnt/bla type iso9660 (ro,relatime)
[root@db-nb-08 fuzzy]# umount /mnt/bla
[root@db-nb-08 fuzzy]# mount /dev/loop0p2 /mnt/bla
[root@db-nb-08 fuzzy]# mount | grep /mnt/bla
/dev/loop0p2 on /mnt/bla type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
[root@db-nb-08 fuzzy]# fdisk -l /dev/loop0
Disk /dev/loop0: 316 MiB, 331350016 bytes, 647168 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
Disklabel type: dos
Disk identifier: 0x12841e4a
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 0 647167 647168 316M 0 Empty
/dev/loop0p2 4020 4627 608 304K ef EFI (FAT-12/16/32)
[root@db-nb-08 fuzzy]# umount /mnt/bla
[root@db-nb-08 fuzzy]# mount /dev/loop1p1 /mnt/bla/
mount: /dev/loop1p1 is write-protected, mounting read-only
[root@db-nb-08 fuzzy]# mount | grep /mnt/bla
/dev/loop1p1 on /mnt/bla type iso9660 (ro,relatime)
[root@db-nb-08 fuzzy]# fdisk -l /dev/loop1
Disk /dev/loop1: 208 MiB, 218103808 bytes, 425984 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
Disklabel type: dos
Disk identifier: 0x60c1c4af
Device Boot Start End Sectors Size Id Type
/dev/loop1p1 * 0 425983 425984 208M 17 Hidden HPFS/NTFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment