On Thu, Jun 8, 2017 at 9:33 AM, Kurt Van Dijck
<
kurt.van....@gmail.com> wrote:
>> On Thu, Jun 8, 2017 at 7:05 AM, <
kurt.van....@gmail.com> wrote:
>> > Hey,
>> >
>> > When I download sdcard images for the BBB, I verify that the sum is correct.
>> > after xzcat, I only find 1 partition in the image, which I cannot mount.
>> >
>> > Does this sound familiar.
>> > I cannot believe all images are bad, so it must be something wrong on my
>> > computer.
>> > I fail to imagine how xz can be wrong.
>>
>> It's best to use losetup/kpartx to mount it:
>
> Well, I used nbd with 'qemu-nbd -c /dev/nbd0 bone....img.
> that should work the same.
>
>>
>> $ unxz bone-debian-stretch-iot-armhf-2017-06-04-4gb.img.xz
>>
>> $ sudo fdisk -l bone-debian-stretch-iot-armhf-2017-06-04-4gb.img
>> Disk bone-debian-stretch-iot-armhf-2017-06-04-4gb.img: 3.3 GiB,
>> 3565158400 bytes, 6963200 sectors
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> Disklabel type: dos
>> Disk identifier: 0xd12441de
>>
>> Device Boot Start End
>> Sectors Size Id Type
>> bone-debian-stretch-iot-armhf-2017-06-04-4gb.img1 * 8192 6963199
>> 6955008 3.3G 83 Linux
>
> Ok, 1 partition. I supposed I needed a FAT :-)
yeah, we've been using 1 partition by default for a couple years now..
>
>>
>> Grab a Loop device:
>>
>> $ sudo losetup -f
>> /dev/loop0
>>
>> $ sudo losetup /dev/loop0 bone-debian-stretch-iot-armhf-2017-06-04-4gb.img
>>
>> $ sudo kpartx -av /dev/loop0
>>
>> $ ls /dev/mapper/
>> control loop0p1
>>
>> $ mkdir disk
>> $ sudo mount /dev/mapper/loop0p1 disk/
>
> This fails at my side.
> I now wrote the sd card, and it boots, if I boot directly from sdcard (bypassing my old eMMC u-boot).
> I may have forgotten to include an obscure ext4 option in my local kernel?
>
> Am I right that the SoC can boot directly of an ext4? or is U-Boot
> hidden in the first free blocks?
The bootrom, supports raw boot, so u-boot's stored inside the first
1MB of the drive.