bmwhite
Posts: 6
Joined: Sun Jul 08, 2012 6:02 pm

boot hangs, how to continue?

Sat Jul 14, 2012 1:13 am

[moved to the New Linux user help section]
I changed the /etc/fstab file to add a network share. I guess I got the syntax wrong because now during boot the Pi hangs on "configuring network interfaces". I can't tell you the line I added because I can't get back to a command line to edit the fstab file.
How do I tell the Pi to ignore this error or not load that file and move on? Is there the equivalent of a Windows "safe mode" boot?

Jock in a Frock
Posts: 72
Joined: Thu Jan 12, 2012 6:39 pm

Re: boot hangs, how to continue?

Sat Jul 14, 2012 7:00 pm

Stick a new image on a spare SD card and boot from that. Then you can access your original SD card via a USB card reader plugged into your Pi. You can then edit the offending file.

bmwhite
Posts: 6
Joined: Sun Jul 08, 2012 6:02 pm

Mounting Pi SD card on a USB reader to fix issues

Sat Jul 14, 2012 10:08 pm

Thanks, that works. Note I'm new to Linux so finding out how to mount the USB reader was a challange. So here are instructions that I used for anyone else in this predicament:

The PI SD card has at least two partitions. The first one is Fat32 and can be edited in Windows. However I didn't know how to get to the second Linux partition where fstab was (and all the good stuff resides). Finally figured it out. First make a mount point:

Code: Select all

sudo mkdir /mnt/usb
(you can choose another name for 'usb')

Find out what device your SD card was assigned. Type the following, insert the SD card in a USB reader, then type the command again

Code: Select all

sudo fdisk -l
You should see a pair of new devices like SDA1 and SDA2. We want the second partition. Then mount the USB drive:

Code: Select all

sudo mount -t ext4  /dev/sda2 /mnt/usb
You can now see the second partition. For my case I needed to edit fstab on the attached SD card, not the one on my boot SD card:

Code: Select all

sudo nano /mnt/usb/etc/fstab
Then some cleanup:

Code: Select all

sudo umount /mnt/usb
sudo rmdir /mnt/usb
FYI, the command to put in fstab to auto-mount my WD My Book World Edition (which was on my network at IP address 191.168.1.6 and has a share called 'Public' is:

Code: Select all

//192.168.1.6/Public /mnt/public cifs guest,_netdev 0 0
Note before doing this you have to create another mount point from the command line like above (only need to do this once, when adding the fstab entry):

Code: Select all

sudo mkdir /mnt/public

Return to “Beginners”