LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't boot partition in /dev/loop (https://www.linuxquestions.org/questions/linux-newbie-8/can%27t-boot-partition-in-dev-loop-4175518440/)

mierdatuti 09-13-2014 02:38 AM

can't boot partition in /dev/loop
 
Hi,
I'm trying to mount a partition of dd imagen on /dev/loop but it says me that is not ext4 partition. The code is:
Code:

root@ubuntu:/home/david# fdisk -lu /media/david/afb9a509-9e6c-4327-a87b-2d75f6b96a76/image220814

Disk /media/david/afb9a509-9e6c-4327-a87b-2d75f6b96a76/image220814: 8022 MB, 8022654976 bytes
255 heads, 63 sectors/track, 975 cylinders, total 15669248 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
Disk identifier: 0x000981cb

                                                        Device Boot      Start        End      Blocks  Id  System
/media/david/afb9a509-9e6c-4327-a87b-2d75f6b96a76/image220814p1            8192      122879      57344    c  W95 FAT32 (LBA)
/media/david/afb9a509-9e6c-4327-a87b-2d75f6b96a76/image220814p2          122880    5785599    2831360  83  Linux
root@ubuntu:/home/david# mount -o loop,offset=$((122880 * 512)) -t ext4 /media/david/afb9a509-9e6c-4327-a87b-2d75f6b96a76/image220814 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

root@ubuntu:/home/david# dmesg | tail
[  706.507079] EXT4-fs (sdb1): recovery complete
[  706.507476] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[  745.136640] systemd-hostnamed[3724]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[  966.486443] EXT3-fs (loop1): error: can't find ext3 filesystem on dev loop1.
[  966.486567] EXT4-fs (loop1): VFS: Can't find ext4 filesystem
[  966.486650] FAT-fs (loop1): invalid media value (0x74)
[  966.486653] FAT-fs (loop1): Can't find a valid FAT filesystem
[  992.967606] EXT4-fs (loop1): VFS: Can't find ext4 filesystem
[ 1064.403533] EXT4-fs (loop1): VFS: Can't find ext4 filesystem
[ 1187.739669] EXT4-fs (loop1): VFS: Can't find ext4 filesystem

Could you help me please?
Thanks and sorry for my English!

pan64 09-13-2014 04:04 AM

You can try to mount that partition directly:
mount -o loop -t ext4 /media/david/afb9a509-9e6c-4327-a87b-2d75f6b96a76/image220814p2 /mnt
does it work? You can also run with -t auto (in case it is not ext4 but something else)

michaelk 09-13-2014 06:38 AM

At first glance I can not find anything obviously wrong. Are you sure it is an ext4 partition? image...p2 is just a name that fdisk creates. It can not be used directly.

A utility that also might help is kpartx.


All times are GMT -5. The time now is 08:08 PM.