Problem
I am attempting to install the drivers for this Waveshare 4inch LCD (A) touchscreen; however, after I have installed the drivers and reboot I receive the error (displayed in the HDMI monitor, not the touchscreen):
PANIC: VFS: Unable to mount root fs on unknown-block(179,2)
I am using the latest version of Raspbian (have had to reinstall three times) on Raspberry Pi 2 B.
Guide 1
At first I followed the guide on the Waveshare wiki (I used Method 1 as I did not want to install the disk image supplied on the DVD), in summary:
1) Configure RPi to auto login 2) Download and extract the driver:
wget http://www.waveshare.com/w/upload/4/4b/LCD-show-161112.tar.gz
tar xvf LCD-show-161112.tar.gz
3) Set the RPi to use the LCD display:
./LCD4-show
The system then reboots, however I get the following error message (displayed on the HDMI monitor plugged into the RPi:
PANIC: VFS: Unable to mount root fs on unknown-block(179,2)
I followed this answer on StackExchange editing the cmd.txt file but the problem persists (still boots up with the same error).
Guide 2
My only option was to reinstall Raspbian. I then used this answer on StackExchange which directed me to a guide to install a different set of drivers as follows:
1) Make the RPi to output the display to the SPI bus by editing the 99-turbo.conf file, changing /dev/fb0 to /dev/fb1:
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
2) Enable SPI automatic loading under advanced options in raspi-config, then reboot.
3) Download and install the drivers and reboot:
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
4) After reboot configure the /etc/modules and add the following:
spi-bcm2708
fbtft_device name=waveshare32b gpios=dc:22,reset:27 speed=48000000
waveshare32b width=320 height=240 buswidth=8 init=-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0XC1,0X30,-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,0x03,0X12,0X81,-1,0xF7,0x20,-1,0xC0,0x23,-1,0xC1,0x10,-1,0xC5,0x3e,0x28,-1,0xC7,0x86,-1,0x36,0x28,-1,0x3A,0x55,-1,0xB1,0x00,0x18,-1,0xB6,0x08,0x82,0x27,-1,0xF2,0x00,-1,0x26,0x01,-1,0xE0,0x0F,0x31,0x2B,0x0C,0x0E,0x08,0x4E,0xF1,0x37,0x07,0x10,0x03,0x0E,0x09,0x00,-1,0XE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,0x08,0x0F,0x0C,0x31,0x36,0x0F,-1,0x11,-2,120,-1,0x29,-1,0x2c,-3
ads7846_device model=7846 cs=1 gpio_pendown=17 speed=1000000 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900
At this point I will note that there isn't a specific driver for the Waveshare 4inch LCD screen on here; however, the user who link the aforementioned guide stated he got his screen to work using the driver for flexfb.
In the above text I change waveshare32b with flexfb.
5) Next I edit the /boot/cmdline.txt file (I comment out the current cmdline text) and add:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbtft_device.custom fbtft_device.name=waveshare32b fbtft_device.gpios=dc:22,reset:27 fbtft_device.bgr=1 fbtft_device.speed=48000000 fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo dma.dmachans=0x7f35 console=tty1 consoleblank=0 fbtft_device.fps=50 fbtft_device.rotate=0
Also, I swap waveshare32b for flexfb.
6) Finally, I set the RPi to load startx to boot automatically to the GUI with sudo nano /etc/rc.local and adding:
su -l pi -c startx
I then set raspi-config to automatically login to the desktop.
After all of this the RPi boots up but the HDMI monitor gives exactly the same error message:
PANIC: VFS: Unable to mount root fs on unknown-block(179,2)
Which is not healed by fixing the cmdline.txt file in recovery.
Questions
What am I doing something wrong? Does anyone have any suggestions for installing drivers to avoid this error? Or suggestions to fix the problem behind this error?
Any assistance is greatly appreciated!