Error mounting RPi root filesystem



  • @SGaist is it necessary for me to enter in root mode as i get this : only root can do that


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Usually yes, it's needed to mount something. Unless there's an fstab entry that allows user to mount a certain mount point.



  • @SGaist while mounting image using this command :-mount -v -o offset=62914560 -t ext4 /home/iamsps/opt/rasberry.img/mnt/rasp-pi-rootfs

    i am getting this

    mount: wrong fs type, bad option, bad superblock on /dev/loop0,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so[link text](```


  • Lifetime Qt Champion

    I've moved your questions to it's own thread since they weren't related to the other thread directly.

    Are you sure that your image uses ext4 as its root file system ?



  • @SGaist hi,

    well sir i am not sure about that: but when i tried following command :-----
    mount -v -o offset=62914560 -t auto /home/iamsps/opt/2015-11-21-raspbian-jessie.img /mnt/rasp-pi-rootfs

    i get the following result:-

    mount: enabling autoclear loopdev flag
    mount: going to use the loop device /dev/loop0
    mount: you didn't specify a filesystem type for /dev/loop0
    I will try all types mentioned in /etc/filesystems or /proc/filesystems
    Trying ext3
    Trying ext2
    Trying ext4
    Trying vfat
    Trying fuseblk
    mount: you must specify the filesystem type

    root@pheonix:/home/iamsps/opt#
    **


  • Lifetime Qt Champion

    You should check with your running RPi, you'll be able to see which FS is used. Otherwise you can also use sshfs to mount the RPi's root filesystem but that requires to have the Pi running as well.



  • hi, @SGaist
    i check the file system using command cat /etc/fstab on pi2 terminal it is ext4.

    still whwn i use this command :- **mount -v -o offset=62914560 -t ext4 /home/iamsps/opt/2015-11-21-raspbian-jessie.img/mnt/rasp-pi-rootfs
    **
    *************i get the same error :-
    mount: enabling autoclear loopdev flag
    mount: going to use the loop device /dev/loop3
    mount: wrong fs type, bad option, bad superblock on /dev/loop3,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so


    what me be the possible causes of this and what i should do to solve this problem???????



  • hi @SGaist ,

    when i run this command on my system :-
    **dmesg | tail **

    it shows:

    JBD2: Error -5 detected when updating journal superblock for sdb2-8.
    [87079.359285] Aborting journal on device sdb2-8.
    [87079.359288] JBD2: Error -5 detected when updating journal superblock for sdb2-8.
    [87079.359301] EXT4-fs error (device sdb2): ext4_put_super:788: Couldn't clean up the journal
    [87079.359304] EXT4-fs (sdb2): Remounting filesystem read-only
    [87079.359306] EXT4-fs (sdb2): previous I/O error to superblock detected
    [87079.373998] sdb: detected capacity change from 31439454208 to 0
    [87081.501477] usb 1-7: USB disconnect, device number 4
    [89600.380314] EXT4-fs (loop3): VFS: Can't find ext4 filesystem

    i am not sure i think this is causing error ?????



  • first check the starting point of image using fdisk -l raspberry.img

    you will get:

    ****iamsps@pheonix:~/opt$ fdisk -l raspberry.img
    **
    Disk raspberry.img: 4127 MB, 4127195136 bytes
    255 heads, 63 sectors/track, 501 cylinders, total 8060928 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: 0x3e7fd08e

        **Device Boot      Start         End      Blocks   Id  System
    

    raspberry.img1 8192 131071 61440 c W95 FAT32 (LBA)
    raspberry.img2 131072 8060927 3964928 83 Linux**
    **

    now set the offset value: 512*131072= 67108864 and use command:

    mount -v -o offset=67108864 -t ext4 /home/iamsps/opt/raspberry.img/mnt/rasp-pi-rootfs.



  • @SGaist

    thanks sir for help.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.