2

I followed this tutorial http://geeks.noeit.com/mount-an-smb-network-drive-on-raspberry-pi/ to try and get a SMB share mounted on boot. Now my pi won't stop rebooting. Without doing a total system wipe, is there a way for me to fix this?

EDIT: Oh, and I can get into recovery mode just fine, but I can't seem to find the command line there.

3
  • 1
    Do you get an error?
    – Jacobm001
    Commented Nov 24, 2015 at 21:59
  • @Jacobm001, no error that I can see, but the screen spits out messages too fast. I should take a video, and maybe figure out the final message.
    – PBG
    Commented Nov 24, 2015 at 22:15
  • 1
    Alternatively, you could put the memory card in another computer and read the logs.
    – Jacobm001
    Commented Nov 24, 2015 at 22:17

1 Answer 1

4

I'm assuming you have full-size personal computer to work on, otherwise where would your share be connected to! So..., can you mount and read the SDHC card from the Pi on that PC? If you think you might be able to, the read on:

My Debian Linux machine automatically mounts and attaches all the partitions it can find on the card from my Pi if I insert it into the card read/writer it has and then it would be fairly easy to edit the file /etc/fstab on partition that gets the label root and which gets mounted to /media/root on the PC. I would just then comment out the bad line in fstab with a leading # (to mark the rest of that line as a comment which gets ignored) and then correctly flush and unmount any partitions that got automagically mounted before removing from the PC. I'd imagine most reasonably modern Linux distributions would allow the same - though as the file concerned is typically read only except for root you will probably have to use sudo on the PC to get to write to the file, which, in my case would be, remember, at /media/root/etc/fstab on the PC, don't touch the PC's own fstab at /etc/fstab!

If your PC is a Mac then I guess the procedure would be broadly similar.

If your PC is a Windows one then it can be a bit tricky, however the ext2fs "Ext2 File System Driver for Windows" may be helpful to be able to read and write to that root file-system, I'd exercise caution in using it for editing/writing data to a Ext4 file-system (use it just to mount the file-system just so you can comment out that one line in fstab with say a safe text editor). Be careful NOT to screw that very important file up with a Windows based text editor that does not use the right End-Of-Line characters {just Line-Feed characters - a.k.a. Unix EOL} for "unix" type files...! I do not know how good the support in ext2fs is for more exotic features of Ext4 filesystems, though I've never had any trouble with 2 or 3 with this Windows FOSS. Driver and you are not likely, IMHO, to run into them on a flash card at today's few 10's of GByte max sizes.

As for getting into recovery mode - if it was the older Wheezy Debian based Raspian I'd expect you to have an apparent bash shell asking you for the root password before allowing you to proceed further into a system maintenance shell which means you could use vim-tiny (probably aliased to vi) as root to edit /etc/fstab directly (though there might be other editors like nano available). As the default for Pis is not to have a root password I'm not sure how it would progress - I guess it would leave you at a bash super-user prompt (the one ending in # not $). Trouble is the new-fangled systemd is the default in the current Jessie Debian based Raspian now and the start-up process is very different from sysv-init that I have grow to know and sometimes sigh about - and I, personally, am in the don't touch it with a barge-pole camp on systemd and am looking to uninstall it on the Pis I had for a week (I've been a Linux user for many years though) to avoid having to find out the differences when things go pear-shaped on start up like they have for yourself... 8-(

2
  • I was able to mount the card under an ubuntu VM, modified the fstab file on the card, but it's still in the bootoop. However, I need to do some more experimentation.
    – PBG
    Commented Nov 24, 2015 at 20:32
  • 1
    You might be able to get some information then by looking through the /var/log/ area of the SDHC card on your ubuntu VM, the messages file in particular, though decoding what each line means and whether it is related to your problems may take a while - though it should be possible to note down what is happening around the point at which the "looping" occurs, it might be even be a systemd gitch. >8-P
    – SlySven
    Commented Nov 25, 2015 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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