Hi Thomas,

It's not entirely clear that what I was trying to express was
understood. Then in short:

1) A file 
./src/build/images/kukui/R94-14125.0.2021_08_05_1510-a1/chromiumos_base_image.bin
is created

2) It seems that commands use a variable called GCLIENT_ROOT and it's
value is set to /mnt/host/src

3) When trying to create the loopback device the script tries to use a
path 
/mnt/host/src/rc/build/images/kukui/R94-14125.0.2021_08_05_1510-a1/chromiumos_base_image.bin
which does not exist

4) I'm stuck trying to figure out why GCLIENT_ROOT can't be set to the
actual mounted filesystem path so that the image can be found and the
loopback device created, etc.

Then I assume I could create a block device use losetup with the
correct path. So I'm debugging the script. There may be some details
related to chroot and GCLIENT_ROOT that I don't understand. Let me
know if I need to re-read your email.

Best Regards

On Sat, Aug 7, 2021 at 12:43 AM Thomas Schmitt <scdbac...@gmx.net> wrote:
>
> Hi,
>
> Colin Williams wrote:
> > http://ix.io/3v3i
>
> At least this shows an impressive partition table.
> (Among them 5 partitions of size 512 bytes.)
>
>
> > http://ix.io/3v6K
>
> (Best to be downloaded and viewed in a text editor.)
>
>
> > I believe the issues arise in
> > https://github.com/drocsid/cros-scripts/blob/main/common.sh
> > [...]
> > +++ sudo losetup --show -f
> > /mnt/host/source/src/build/images/kukui/R94-14125.0.2021_08_05_1510-a1/chrom
> > iumos_base_image.bin
> > losetup: cannot find an unused loop device
>
> According to the man page this aims for acquiring an existing but unused
> loop device. But in my local experiments it also creates a new loop device
> if all existing ones are occupied.
> So this should work if new loop devices can be created at all.
>
>
> > 10) The path
> > /mnt/host/source/src/build/images/kukui/R94-14125.0.2021_08_05_1510-a1/chromiumos_base_image.bin
> > does not exist
>
> But
>
>   sudo losetup --show -f non_existing_file_name
>
> yields
>
>   losetup: non_existing_file_name: failed to set up loop device: No such file 
> or directory
>
> and not "cannot find an unused loop device".
>
>
> So currently i think that at your point 10 your investigation left the road
> to the loop device problem.
>
> You should in any case look how many loop devices are occupied before
> your script run:
>
>   losetup -l -a
>
> If this does not show a lot of devices, then you will have execute this
> command at various places in the script in order to see how the list of
> used loop devices evolves during the script run.
>
>
> Have a nice day :)
>
> Thomas
>

Reply via email to