Hello to everyone.
I would like to mount the FreeBSD 13.2 img file for arm v7 on Linux using the loop devices. I wrote a litte script to do that,but it does not work. In origin I've got the img file here :
https://download.freebsd.org/releas...eeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img.xz
but later I've resized the space that it offered using the truncate command. Actually I'm on Linux and I want to extract the files that are inside the img file. This is the script that I wrote to do it :
Unfortunately it does not work,probably because the file system used by the image is not ufs2 :
How to fix it ?
I would like to mount the FreeBSD 13.2 img file for arm v7 on Linux using the loop devices. I wrote a litte script to do that,but it does not work. In origin I've got the img file here :
https://download.freebsd.org/releas...eeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img.xz
but later I've resized the space that it offered using the truncate command. Actually I'm on Linux and I want to extract the files that are inside the img file. This is the script that I wrote to do it :
Code:
nano mount-freebsd-img-on-linux.sh :
losetup -fP FreeBSD-13.2-RELEASE-armv7.img
losetup -a
fdisk -l /dev/loop0 mount -r -t ufs -o ufstype=ufs2 /dev/loop0p2 FreeBSD-13.2-
RELEASE-armv7
Unfortunately it does not work,probably because the file system used by the image is not ufs2 :
Code:
./mount-freebsd-img-on-linux.sh
/dev/loop0: (/mnt/zroot2/zroot2/OS/Chromebook/FreeBSD-guestOS/FreeBSD-13.2-
RELEASE-armv7.img)
Disk /dev/loop0: 100 GiB, 107374182400 bytes, 209715200
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: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 2048 104447 102400 50M c W95 FAT32 (LBA)
/dev/loop0p2 104448 209715199 209610752 100G a5 FreeBSD
mount: /mnt/zroot2/zroot2/OS/Chromebook/FreeBSD-guestOS/FreeBSD-13.2-RELEASE-
armv7: unknown filesystem type 'ufs'.
dmesg(1) may have more information after failed mount system call.
The partition has code ID = a5. It's not UFS. It is some kind of DOS fs. I tried vfat,but it hasn't been accepted.
The error message seems to indicate my system doesn't recognize UFS2 as a filesystem type. BUT it's not true because I have several disks on my PC that have UFS2 as a fs,and they can be mounted :
[CODE]
Disk /dev/sdc: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: WDC WD3200AAJS-0
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: gpt
Disk identifier: 1765E314-F3CF-11EC-8C52-E0D55EE21F22
Device Start End Sectors Size Type
/dev/sdc1 40 532519 532480 260M EFI System
/dev/sdc2 532520 616562727 616030208 293.7G FreeBSD UFS
/dev/sdc3 616562728 624951335 8388608 4G FreeBSD swap
# mount -r -t ufs -o ufstype=ufs2 /dev/sdc2 /mnt/sdc2
ok