Skip to contentSkip to conversation

Can't build cloud9 image

Angstrom-devel Russell Senior 2 participants 3 messages Mar 15, 2012 – Apr 2, 2012

lore
Share & tools
lore
#0 lore raw
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines

At the risk of responding to a practical joke: /etc/fstab entries need to be created with the user flag for the loop devices, the error message even includes the exact entry you need to add.

I see that, but what if I'm "Joe user" who can't (or doesn't want to)
edit /etc/fstab?

Then you can't build this image.

FWIW, I added the /etc/fstab entry provide (for /dev/loop2) but I
still get this at the end (from build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-image-1.0-r0/temp/log.do_rootfs

[...]
./media/mmc1/
./media/union/
./media/realroot/
loop: can't delete device /dev/loop1: Permission denied
loop: can't delete device /dev/loop2: Permission denied
loop: can't delete device /dev/loop3: Permission denied /dev/loop1: Permission denied

Quoted 9 lines
Quoted 2 lines

Everything else builds with no special "root" style
privileges, why does this one image need it?

Simply put: because the tools suck. A this point in time there is no tool (or tools plural) that allows creating 2 partitions (vfat and extX) and concatenating them into a valid image with an MBR. The biggest lack is something like 'genfatfs', mcopy is a step in the right direction but is too limited to work in this scenario. And genext2fs will likely OOM on a lot of buildmachines.

Are you familiar with makebootfat?

http://linux.die.net/man/1/makebootfat

Signature · 2 lines
Russell Senior, President
[email protected]
#1 lore raw
Quoted 5 lines · Russell Senior
Quoted 1 line

Then you can't build this image.

FWIW, I added the /etc/fstab entry provide (for /dev/loop2) but I
still get this at the end (from build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-image-1.0-r0/temp/log.do_rootfs

Quoted 8 lines

[...]
./media/mmc1/
./media/union/
./media/realroot/
loop: can't delete device /dev/loop1: Permission denied
loop: can't delete device /dev/loop2: Permission denied
loop: can't delete device /dev/loop3: Permission denied /dev/loop1: Permission denied

Well, mine gets further (although it's not my main focus now):

| ./bin/tinylogin
| ./boot/
| ./boot/uImage-3.2.11
| ./boot/uImage
| ./boot/uEnv.txt
| losetup: /dev/loop1: detach failed: No such device or address
| losetup: /dev/loop3: detach failed: No such device or address
| 1024+0 records in
| 1024+0 records out
| 1048576 bytes (1.0 MB) copied, 0.00349814 s, 300 MB/s
| Disk /dev/loop1 doesn't contain a valid partition table
| Checking that no-one is using this disk right now ...
| BLKRRPART: Invalid argument
| OK
| sfdisk: Disk /dev/loop1: cannot get geometry
| 
| 
| Disk /dev/loop1: 444 cylinders, 255 heads, 63 sectors/track
| 
| sfdisk: ERROR: sector 0 does not have an msdos signature
| sfdisk:  /dev/loop1: unrecognized partition table type
| 
| sfdisk: No partitions found
| 
| Old situation:
| New situation:
| Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
| 
|    Device Boot Start     End   #cyls    #blocks   Id  System
| /dev/loop1p1   *      0+      8       9-     72261    c  W95 FAT32 (LBA)
| /dev/loop1p2          9     443     435    3494137+  83  Linux
| /dev/loop1p3          0       -       0          0    0  Empty
| /dev/loop1p4          0       -       0          0    0  Empty
| Successfully wrote the new partition table
| 
| Re-reading the partition table ...
| BLKRRPART: Invalid argument
| 
| If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
| to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
| (See fdisk(8).)
| Warning: block count mismatch: found 3566398 but assuming 72261.
| mkfs.vfat 3.0.12 (29 Oct 2011)
| Loop device does not match a floppy size, using default hd params
| ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored.
| mount: /dev/loop0: can't read superblock

NOTE: package cloud9-image-1.0-r0: task do_rootfs: Failed

Quoted 6 lines
Quoted 6 lines

Simply put: because the tools suck. A this point in time there is no tool (or tools plural) that allows creating 2 partitions (vfat and extX) and concatenating them into a valid image with an MBR. The biggest lack is something like 'genfatfs', mcopy is a step in the right direction but is too limited to work in this scenario. And genext2fs will likely OOM on a lot of buildmachines.

FWIW, there's a new patchset published in OE-Core ML to address memory issues of genext2fs...

Quoted 3 lines

Are you familiar with makebootfat?

http://linux.die.net/man/1/makebootfat

Interesting... I think I looked at it before, just need time to try to integrate it, time permitting.

Signature · 1 line
Denys
#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Denys" == Denys Dmytriyenko <[email protected]> writes:

Quoted 10 lines · Russell Senior
Quoted 10 lines
Quoted 1 line

Then you can't build this image.

FWIW, I added the /etc/fstab entry provide (for /dev/loop2) but I
still get this at the end (from build/tmp-angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/cloud9-image-1.0-r0/temp/log.do_rootfs

[...] ./media/mmc1/ ./media/union/ ./media/realroot/ loop: can't delete device /dev/loop1: Permission denied loop: can't delete device /dev/loop2: Permission denied loop: can't delete device /dev/loop3: Permission denied /dev/loop1: Permission denied

Denys> Well, mine gets further (although it's not my main focus now):

Yeah, that was just because i wasn't in the 'disk' group in /etc/groups. Thank you to the interwebs for digging that one up for me.

The compile is finishing for me currently, but I still can't get it to boot, built on debian/unstable. The MLO I build doesn't seem to get recognized by my A4 beaglebone. The ROM code spits C's at me as if the microSD card wasn't there. The microSD card is okay though (an 8 gig Kingston class 10 thing), because I can /sbin/dd the online angstrom cloud9 demo image[1] on it and that boots.

[1] http://www.angstrom-distribution.org/demo/beaglebone/Angstrom-Cloud9-IDE-eglibc-ipk-v2012.02-core-beaglebone-2012.02.14.img.xz

Signature · 2 lines
Russell Senior, President
[email protected]