sahandKashani / SoC-FPGA-Design-Guide

Tutorial for using the DE1-SoC/DE0-Nano-SoC boards for bare-metal and linux programming
The Unlicense
64 stars 17 forks source link

getting "The disk drive for / is not ready yet or not present." at boot #12

Closed Satris404 closed 6 years ago

Satris404 commented 6 years ago

Hi, I followed your tutorial, except I used the kernel 3.17 and no NIOS II. It fails near the end and I'm trying to find what's wrong. I see you have the booting process line:

[ 1.652114] EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 subsystem

when I got:

[    1.854884] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[    1.868126] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[    1.881192] EXT4-fs (mmcblk0p2): Filesystem with huge files cannot be mounted RDWR without CONFIG_LBDAF
[    1.899270] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[    1.912302] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[    1.955514] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)

But I'm not sure if it's the source of the problem. Do you have any idea of what I could have done wrong? I attached the rest of the booting log.txt.

Let me know if you need the sd card image.

Samuel

sahandKashani commented 6 years ago

Hi, Unfortunately I've never had that error before. Are you sure your mmcblk0p2 is an ext3 partition? Could you print the partition table of your sdcard with fdisk and show the output here?

The logs you provided show that you're running linux 4.0.0-03843-gbb0fd7a though, not 3.17.

Satris404 commented 6 years ago

Hi, thank you for your fast reply.

I downloaded the Ubuntu image from the Atlera Intel website. I wrote it on an sd card and then deleted all his data in order to keep the same partitions. I then rewrote all of my files the same way you do in the tutorial. The EXT partition is EXT4.

Device     Boot   Start      End Sectors   Size Id Type
/dev/sdb1       2121728  3799447 1677720 819.2M  b W95 FAT32
/dev/sdb2       3801088 12189695 8388608     4G 83 Linux
/dev/sdb3          2048     4095    2048     1M a2 unknown

And about the linux kernel version, that's weird. I checked out the soc-fpga 3.17 branch from this repo: https://github.com/mohammadiahmad/linux-socfpga. Maybe it didn't worked... I'll retry. Nevertheless, version 4.0.0 should work too.

sahandKashani commented 6 years ago

I tried ext4 once and I couldn't get the device to boot either (only ext3 worked for me out of the box). I'm guessing the kernel needs to have some additional module configured to boot from an ext4 partition. Can you try with ext3?

Or is the problem that you can't create a custom sdcard? There are instructions in the tutorial for how to do that through fdisk.

Satris404 commented 6 years ago

I've already tried reformatting the EXT4 into EXT3 with gparted but the HPS couldn't read at all the data from that partition when booting. I'll try with fdisk, maybe it will work.

Satris404 commented 6 years ago

Got it working ! First, I tried to format the whole sd card the same way you do in your tutorial with fdisk. The OS couldn't boot at all. Seems like the preloader in the raw partition could not be read, nothing happened when I turned on the DE1-SoC. So what I did is get the same partition as the Ubuntu image from Altera's website (as I previously did), but reformatting the EXT4 in EXT3 with fdisk. And voilà!

Thank you,

Sam

sahandKashani commented 6 years ago

Glad it was resolved. Good luck with the FPGA hacking :)