1.

Solve : Ubuntu, Raspberry Pi B+: Problem with corrupted SD partition?

Answer»

Hello,
I am new in Ubuntu, Raspberry Pi and PanStamp. So, I found a “tutorial” to help me understand how can I work with them. I found this:
https://code.google.com/p/panstamp/wiki/RaspberryPi


The steps seem easy.
1. Download the latest image here: http://www.panstamp.org/lagarto_imag...pi_0.8_2gb.zip
2. Unzip and write the image to the SD card (at least 2 GB) according to the Raspberry Pi Wiki:
For Windows, use Win32 Disk Imager
For Linux, use dd if=lagarto_rpi_xyz.img of=/dev/sdc
3. Insert the SD card in your Raspberry Pi and boot it up.
4. By default, Raspbian comes with with DHCP enabled so you need to get the IP-address from your DHCP server.
5. Once started, you should be able to access:
http://ip-address:8001 for Lagarto-SWAP
http://ip-address:8002 for Lagarto-MAX
6. You can SSH to the Raspberry and login using username "pi" and password "raspberry"


My first target is to write the Lagarto Server into the SD Card. My SD Card has already Raspbian and has 3 partitions. The 3 partitions are:
1)file system FAT32, with size 1,43GB (SETTINGS)
2) file system FAT32, with size 60MB (BOOT)
3) file system ext4, with size 5,68GB (root)


So I try to write the image in the 3rd partition, because Lagarto demands 2GB. The 3rd partition was /dev/sdb6. I EDIT the command above, as: if=lagarto_rpi_xyz.img of=/dev/sdb6
I waited enough time but no error was showed. So, I supposed that the procedure was fine.


Then, I put out the SD card from the LAPTOP and carefully, I put it in the Raspberry Pi B+.
But, it shows me problem.
“ No filesystem could mount root, TRIED: ext4”
“kernet panic – not syncing: VFS: Unable to mount root FS on unknown -block (179,6)”


So, I turn off the Raspberry and I put the SD card again to the laptop.
I run Gparted and I noticed that “/dev/sdb6” has problem.
“File system is damaged”, “file system is unknown to Gparted”, “The device entry /dev/sdb6 is missing”.

Obviously, I have stuck in Step 2.
What should I do now, so I can continue my work?
How can I un-done the command “if=lagarto...” or I repair the “damaged” partition?
I imagine that image wants to take up the whole drive, not just one partition. Therefore you would dd it to /dev/sdb - This will totally remove raspbian and replace it with your new image.Quote from: camerongray on October 14, 2014, 03:17:14 AM

I imagine that image wants to take up the whole drive, not just one partition. Therefore you would dd it to /dev/sdb - This will totally remove raspbian and replace it with your new image.
I suppose that the command "dd" have to work with the whole SD card not with one partition. I try to make it work with one partition sdb6 and that`s why now i have a corrupted SD card.

The weird thing in this procedure is that, the image i try to copy to the partition of my SD has Raspbian and the Lagarto Server. It should work but it did not. Raspberry Pis are not designed to run multiple OSs off of a single SD card, each image needs the whole drive to itself.With NOOBS I managed to re-install Raspbian.
Now, if i write again "dd if=lagarto_rpi_0.8_2gb.img of=/dev/sdc" but this time to write the img to SD and not to a partition, it will work? Or i have to install all the parts of Lagarto (pyserial, ZeroMQ with the Python bindings and Barrel), so to be sure?If you write the image to the entire drive you should be fine.I WROTE the img to entire SD but now the Raspberry does not boot. Only black screen... Did not boot either raspbian or noobs ...
What may was wrong?I brought back the correct image of the SD. And I try to install Lagarto step by step by this link https://github.com/panStamp/panstamp/wiki/lagarto#installation. I did the procedure twice, but it did not work. I can find where is the server files and i cannot run the servers. As camerongray stated, your should try the ISO on a blank SD card.
If that works, you have a working solution.



Discussion

No Comment Found