Other OS

Problem booting Debian from SD Card

11 1215
mgfm99  
I have a puzzling problem which none of the information here or at 96Boards provides a solution.
I can boot the Hikey from a microSD card with the latest linaro version for kernel 3.18. If I expand the rootfs - either by using the script recommended on 96Boards, or by using gparted on a linux box - then the Hikey will no longer boot from the SD card. This is an alteration only to the rootfs, not the fat boot partition. I have had the same effect whether I am using a 4GB microsd, a 32 GB microsdhc or a 64GB microsdxc.
I don't have an operational UART so I can't report any logs about how the system is responding to the SD card once it has been extended.
Any suggestions about what I am doing wrong?
Got it,please wait,let me have a look.

Hi,  I can't use this script to expand the rootfs successful. please refer to http://wiki.lemaker.org/LeMaker_ ... ze_system_partition,it will be ok.



mgfm99  
When I said I used the recommended script, I did not mean I succeeded in running the script as such! Rather, I used the sequence of relevant commands within it. The only difference from the LeMaker instructions for the Guitar is that the 96Boards script uses gdisk to back up the partition table. Otherwise it just uses parted and resize2fs.
Incidentally, the images from 96Boards all have MBR partition tables - gdisk converts it to GPT. I've tried the process with and without the gdisk step and it makes no difference. As I said in the original message, I've also used gparted on a linux box - and presumably that is using parted and resize2fs in the background - and that too leads to an unusable disk.

I know it is not the step with resize2fs, since I tried rebooting once simply after using parted and again the boot hung. Simply changing the size of the rootfs partition seems to create a problem. Since I've reproduced this on microsd, microsdhc and microsdxc it can't be anything about size being too small or too large, or the disk type being too modern or too old.

I've also failed simply creating a boot disk from scratch, making a boot partition (FAT16 or FAT32) and a rootfs and then tar-ing the relevant files into place.

I'll try to get a working UART to give feedback on what happens during the boot sequence with a modified disk.

All v puzzling...

I will also send this script bug to Linaro developers to have a look.

mgfm99  
I've been investigating the problem a bit more:
a.) if I boot from emmc and then insert an SD card, I get the following result
i.) if the card has a single partition on it, regardless of the size of the card, the Hikey can read it, and /dev is populated with mmcblk1 and mmcblk1p1;
ii.) if the card has two partitions on it, one fat16 the other ext4, regardless of whether the partition table is MBR or GPT, the Hikey cannot read the card, /dev is populated solely with mmblk1 and no partitions are indicated; gdisk /dev/mmcblk1 leads to a hang in the system;
iii.) if the card contains an unaltered image from the 96boards site, then the system sees the two partitions.

Something seems to be wrong at a low level with the SD card reader driver.

mgfm99 replied at Jan 27, 2016 18:22
I've been investigating the problem a bit more:
a.) if I boot from emmc and then insert an SD card,  ...

Sorry for waiting a long time. Today, Linaro said: the build img format have some bugs, they will fix the bug in next releae version. think you for that.

having the SD boot issue as well...
SD boot stuck at Linux boot logo, showing the 8 Penguins for 8 cores, and cannot find the /dev/mmxblk1p2 which is SD ext4 partition.

Actually, the device cannot find the SD slot mmcblk1 at all.
It goes to initramfs prompt and "ls /dev/mm*" only shows partitions on mmcblk0 and cannot see the mmcblk1 (SD) at all!!!

sghazagh replied at Feb 02, 2016 02:57
having the SD boot issue as well...
SD boot stuck at Linux boot logo, showing the 8 Penguins for 8 c ...

Can you let me to see the log? Or you flash the SD card again and try again.

mgfm99  
Is there any update on this matter?
I've looked on the linaro developer message board and see the series of exchanges linked to the question how they make the images in the first place. The last few comments there seem to indicate that they have changed the way they produce images and the problem has gone away.
I've tried using the snapshot images produced 5 February both for Debian 3.18 and the 4.4.0 mainline rebase and with neither does the resizehelper.sh work, and any manual resizing of the rootfs continues to produce the same problem.
In the meantime I managed to get UART to work, which means that I've been able to install Arch linux onto emmc successfully (based on the debian 4.4.0 snapshot kernel).
But I would rather that the sdcard actually functioned as advertised.

You have to log in before you can reply Login | Sign Up

Points Rules