← Back to team overview

ubuntu-phone team mailing list archive

Re: No loop mount option

 

On Wed, Nov 13, 2013 at 7:16 PM, Dmitrijs Ledkovs <xnox@xxxxxxxxxx> wrote:
> Dear all,
>
> I've raised a merge proposal below, to allow initramfs to mount system
> partition direct as an ubuntu rootfs.
> At the moment this is a fallback, as apart from the emulator, it's not
> possible to have a large enough system partition to hold ubuntu
> rootfs.
>
> A matching patch for build/ android project is attached as a file.
>
> The patch for the emulator package changes the behaviour slightly:
> * sdcard.img is dropped
> * ubuntu-system.img & ubuntu-userdata.img are generated
> * if no options specified: ubuntu-system.img is embedded inside
> ubuntu-userdata.img & normal (loop) based mount is performed
>
> * if "-no-loop" is specified to the build script, ubuntu-system.img is
> not embedded.
>
> ubuntu-system.img is provisioned as the system.img (/dev/mtdblock0)
> and ubuntu-userdata.img is provisioned as userdata.img
> (/dev/mtdblock1).
>
> Once booted without loop both / and /userdata are normal partitions
> (this is in RW mode)
> /dev/mtdblock1 on /userdata type ext4 (rw,relatime,data=ordered)
> /dev/mtdblock0 on / type ext4 (rw,relatime,data=ordered)

I just don't yet understand why we want to support this path, as we
already support cdimage based images ("flipped" model), and
system-image (ro and rw).

If lack of disk space is the only issue, you could just boot using the
"flipped" model instead (but there's also a partition size limit as
well, as it's mtd).

If you want to just use system-image model, without changing much, you
could simply increase the sdcard image size (as it's a "real" mmc
device).

Now if you say you want to support the repartition model we discussed
before implementing the system-image loop-based format, I'd first like
to discuss how our partitioning scheme would look like :-) (e.g. do we
want more than one partition?)

> Note that android container is still launched from a loop-mounted
> .img. I will check if it would be possible to supported unpacked
> android container under /var/lib/lxc/android/rootfs

Should be, but why would we want that?

> Also at the moment emulator is still using MTD partitions, instead of
> GPT formatted MMC device. That's also a TODO.

Ideally we would just use the MMC device instead, which is kind of
what we're doing atm anyway (we're not using the system and userdata
partitions atm).

Cheers,
-- 
Ricardo Salveti de Araujo


Follow ups

References