1

I tried running sudo fdisk -l, but I get

sudo: unable to resolve host (none): Connection refused fdisk: cannot open /proc/partitions: No such file of directory found

I also tried running mount and I get

mount: failed to read mtab: No such file or directory

How can I fix this? The microSD works fine, I have used it on multiple devices, and tried fresh OS installs but it won't boot up. I have a RPI 3

To run those I put, init=/bin/sh in cmdline.txt

  • The title of your questions is, "My RPi 3 doesn't boot up" ??? – Seamus Aug 4 '18 at 15:05
  • Yes that is the title – trixonet Aug 4 '18 at 15:20
  • If it does not boot , what are you "reading"? Does SD green LED shows any activity ? Since you used SD on other devices – did you verify they you have bookable OS installed on it? I know that is a stupid question to ask - but as the old saying goes "it works better if you plug it in ( software) “ still applies here. – Jan Hus Aug 4 '18 at 15:22
  • I should say, it wont boot to desktop – trixonet Aug 4 '18 at 15:22
  • Ahhh! That's an entirely different thing you see. Booting comes first; once that process is finished, then the desktop environment is started. – Seamus Aug 4 '18 at 15:25
2

Let's look step by step where the error could be. You are booting into a shell without any graphics. In the shell maybe you can mount the pseudo filesystems from the kernel (/proc, /dev, /sys). But it will not help you. There is nothing else. You can only edit config files.

You try to boot into the graphics system that is the systemd graphical.target. That get stuck. Next step before is the multi-user.target. That is the system without graphics as you get it with Raspbian Stretch Light. Try to boot into this. If it works we have a running system Stretch Light and we know that the problem is the graphics part. You can boot into it by appending this to cmdline.txt:

systemd.unit=multi-user.target

If it runs we know the problem is the graphic system. You can enable journaling so we may see error messages. Enable it with:

rpi: ~# sudo mkdir -p /var/log/journal
rpi: ~# sudo systemd-tmpfiles --create --prefix /var/log/journal

Now boot into the graphic system until it get stuck wait a little and poweroff. Boot into the multi-user.target and look at the boot messages from the boot before with:

rpi ~$ journalctl --boot=-1

If you cannot boot into multi-user.target then you can get the next step back with appending this to cmdline.txt:

systemd.unit=rescue.target

Here you have a basic system including system mounts. Next step back is by appending to cmdline.txt:

systemd.unit=emergency.target

Here you have a bare system nearly to boot with init=/bin/sh. This should always do if you can boot with /bin/sh.

troubleshooting:
from the infos in your comments: it is possible to boot into multi-user.target but with read only filesystem. sudo cannot resolve host because there is no network connection with name resolution and for local name resolution there is no entry 127.0.1.1 raspberrypi (resp. your hostname) in the /etc/hosts I guess. Put it into /etc/hosts if not present.

On boot you get the error:

Timed out waiting for device dev/partuuid-fb3ed1c9\x2d01.device.

This shows that the device PARTUUID=fb3ed1c9-01 cannot be found. Postfix -01 shows it is the first partition, means the boot partition. It is possible that the partuuid has changed, for example by using a partitioner on a Raspberry installation. I suggest to change the device names in cmdline.txt and in etc/fstab. Put the SD Card in the card reader of your pc, mount its partitions and in cmdline.txt change the root entry to:

root=/dev/mmcblk0p2

etc/fstab change to similar like this:

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1

If mmcblk0 is not the right device name for your SD Card you can boot into multi-user.target and look in /dev what it is.

  • I tried enabling journaling, but I get the error sudo: unable to revolve host (none): Connection refused. mkdir: cannot create directory /var/log/journal: Read-only file system – trixonet Aug 5 '18 at 13:49
  • I just tried booting with default cmdline.txt and get these imgur.com/a/eRw9waW – trixonet Aug 5 '18 at 14:42
  • @trixonet I have updated my answer with a section troubleshooting. – Ingo Aug 5 '18 at 16:34
  • where do I find the name in /dev? Also 127.0.1.1 raspberrypi is on /etc/hosts – trixonet Aug 6 '18 at 0:03
  • Nevermind, it started to work after a couple of reboots? I have successfully booted to desktop – trixonet Aug 6 '18 at 2:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.