0

I'm trying to get my new raspberry pi 3 to boot with raspbian but i'm having issues.

Currently I have the latest version of raspbian on a SD card and when I plug in the pi I ultimately get the message Unable to mount root fs on uknown-block(179,2)

From my readings on the net it was a bad install on the SD card so I put it in a card reader connected to my mac and ran these commands:

$ sudo diskutil unmountDisk /dev/disk6s1
Unmount of all volumes on disk6 was successful

$ sudo dd bs=1m if=/Users/tomcaflisch/Downloads/2016-03-18-raspbian-jessie.img of=/dev/rdisk6

Once that was complete I ran this command (Which i found on the net trying to trouble shoot this issue)

$ sudo fsck_hfs -f /dev/disk6s1
ERROR: volume /Volumes/boot is mounted with write access. Re-run with (-l) to freeze volume.

$ sudo fsck_hfs -fl /dev/disk6s1
ERROR: could not freeze volume (Inappropriate ioctl for device)

Any ideas on what is going on here and how to resolve this issue so I can play with my pi?

Catfish
  • 193
  • 8

3 Answers3

1

fsck_hfs

HFS is an OSX native filesystem type. There are no HFS filesystems involved in a Rasbian image. The image will contain two partitions, one small initial VFAT one (~60 MB) which holds the bootloader, firmware, kernel, and related little things, and one larger (2-4 GB) ext4 partition, which contains the root filesystem for the OS.

Ext4 is a native linux filesystem. I do not think OSX is equipped to deal with it by default but there are tools available to do so.

Running fsck_hfs probably did not do any harm if it gave up right away because it could not find a filesystem, but it cannot possibly do any good, either.

Unable to mount root fs on uknown-block(179,2)

Is a message from the linux kernel, so this indicates it has loaded but has a problem with the root filesystem.

goldilocks
  • 56,430
  • 17
  • 109
  • 217
  • So is this suggesting that my image of raspbian is bad? Or any suggestions on where to go from here? – Catfish May 13 '16 at 20:22
  • You *can* examine the image directly ([see here](http://raspberrypi.stackexchange.com/q/13137/5538)) although I do not know how easy or possible it is to do on a Mac. You can do the same thing with the card itself. There is a brief description of the structure of above, and a much more detailed one in that link. The standard tool for checking ext4 filesystems would be `fsck.ext4` (aka. `e2fsck`); there are various ones for vfat (including `fsck.vfat`). The card/image uses a standard DOS style MBR. – goldilocks May 13 '16 at 20:30
1

Maybe you have a defective card. Did you try it other cards? Try dd-ing it back to your machine and comparing the image with what you put on it.

If that passes, you can always bring up a linux VM under VirtualBox or VMWare (there are free versions of both for the mac), and try to mount the file systems to see what's on them. As @goldilocks pointed out, these are not hfs filesystems, so the mac can't check them (maybe it can check the vfat, but it can definitely not check ext[234]fs. There may also be a standalone ext[234] fsck for the mac, check brew or whatever package manager you are using.

I run the same image on my 3 with no problems at all.

JayEye
  • 1,848
  • 10
  • 18
1

If you are using the SD Cards indicted in your link they will not work as they are 4GB cards.

I am surprised you did not get an error with the dd command. AFAIK the image is slightly over 4GB - although the latest may have been shrunk to make this possible.

Even if you did manage to get it to work (which is possible) you would be unable to do anything useful. You need at least a 8GB card.

Milliways
  • 54,718
  • 26
  • 92
  • 182
  • You sure about that? B/c i had a pi 2 with this https://www.adafruit.com/products/1121 and it worked just fine til I accidently shorted the pi out... – Catfish May 14 '16 at 03:57
  • Actually you may be right. I downloaded raspbian jesse lite and it seems to allow my pi to boot up now. – Catfish May 14 '16 at 04:15