1

I'm attempting to debug the below error I get during boot of raspbian-ua-netinst on a Pi 3 Model B v1.2:

Copying boot files... mounting /dev/mmcblk0p1 on /boot failed: No such file or directory

Oh noes, something went wrong!
mount: mounting /dev/mmcblk0p1 on /boot failed: No such file or directory`
unmount: can't unmount /boot: Invalid argument

I'm then given an option to activate a console;

Busybox v1.22.1 (Raspbian 1:1.22.0-9+deb8u1) built in shell (ash)

the /boot directory contains one empty file:

raspbian-ua-netinst-197000101T000002.log

the /dev directory contains a file mmcblk0 but not mmcblk0p1

Looking at the source code it appears that the fail() function in init.d/rcS is entered:

fail()
{
    echo
    echo "Oh noes, something went wrong!"
    echo "You have 10 seconds to hit ENTER to get a shell..."

    # copy logfile to /boot/ partition to preserve it.
    # test whether the sd card is still mounted on /boot and if not, mount it.
    if [ ! -f /boot/bootcode.bin ] ; then
        mount $bootpartition /boot
        fail_boot_mounted=true
    fi
    cp $LOGFILE /boot/raspbian-ua-netinst-`date +%Y%m%dT%H%M%S`.log
    sync

    # if we mounted /boot in the fail command, unmount it.
    if [ "$fail_boot_mounted" = true ] ; then
        umount /boot
    fi

    read -t 10 || reboot && exit
    sh
}

The is bootpartition is set to /dev/mmcblk0p1 (the file referenced in the error) in the preceding lines:

# these shouldn't really be changed unless auto-detection fails
bootdev=/dev/mmcblk0
bootpartition=/dev/mmcblk0p1
rootdev=/dev/mmcblk0
rootpartition=

What is going on here?

What steps should I take to debug this problem?

Note. This question seems to be addressing a similar problem.

EDIT:

It is a similar issue to the one reported here.

This implies that it is a problem (no specific details) with the SD card resulting in an auto-detection failure.

EDIT 2:

A photo of the monitor output:

enter image description here

EDIT 3:

running fdisk /dev/mmcblk0 and selecting p "print the partition table" gives:

Disk /dev/mmcblk0: 62.5GB, 62537072640 bytes
4 heads, 16 sectors/track, 1908480 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

    Device Boot    Start    End    Blocks    Id System

Selecting v "verify the partion table" gives:

122142719 unallocated sectors

This is all bar 1 of the sectors; I take this to mean that there are no recognised partitions on the disk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.