[Gta04-owner] how to install stretch the letux way?

Andreas Kemnade andreas at kemnade.info
Thu Jan 4 23:01:17 CET 2018


On Thu, 4 Jan 2018 09:38:51 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> >> DEV=/dev/mmcblk0 ./makesd --debug -i -f2 -f ext4 -v
> >> 20171209-stretch-9.3-armhf -r debian -c latest -k latest -d latest
> >> -m latest
> >> 
> >> the -r option uses the previously defined -v
> >>   
> > well, the result is a kernel with a broken generic battery driver
> > leading to kernel oopses.  
> 
> That is a known bug of the "latest" kernel which is 4.14.2. Is fixed
> in 4.15 kernels but they are still in -rc phase.
> 
> So it is not something to blame makesd for.
> 
It has to recognize when I am not in the mood of dealing with kernel
problems and select a stable kernel and refuse the latest
option ;-)

But of course you are right.

> > But it is a
> > stretch.  
> 
> :)
> 
> > 
> > On the other hand it is quite hard to install it this way.  
> 
> What is hard?
> 
Well, if there is something that operates on a whole disk, I am very
paranoid. 
I will check a lot whether it will do any harm or not what I want.
Additional I am using a not so common tool (used by only a small group
of people)
in a not so common way.

And whether -f 2 -f ext4 will access only /dev/mmcblk0p3 partition is
only 90% clear at first to me.

There is some risk that  I do not understand the documentation or the
script correctly.

So I take a lot of steps to verify. to ensure proper operation.

> > So first I checked that tools for partitioning are not installed
> > and disabled the checks in makesd for them.  
> 
Well if I do not want makesd to partition anything, the safest step is
to check that it
cannot access the required tools for doing unwanted things.

> Well, it looks to me as if you are expecting a feature that does not
> exist that way.
> 
> There is the idea to just install without full
> formatting/partitioning (just repartitioning) without destroying
> unspecified partitions, but it has severe limitation by how sfdisk
> and fdisk work.
> 
> > So I have to do dry runs, analyse the script to check whether it
> > will access the right partitions (the syntax is not intuitive),  
> 
> Proposal?
> 
> > finding out that --dry is
> > not that dry, well it is not totally "wet"
> > I know I am not using it the main way it was initially designed
> > for.  
> 
> What do you exactly mean by "--dry is not that dry"? Maybe something
> is not disabled which should be. So please file a bug:
> http://projects.goldelico.com/p/gta04-makesd/issues/
> 
It still umounts and fscks stuff.

> > It would be a lot easier if one could just directly specify the
> > partition, like
> > DEV=/dev/disk/by-label/experi ./install-letux-system -v
> > 20171209-stretch-9.3-armhf -r debian -c latest -k latest -d latest
> > -m latest
> > 
> > or
> > 
> > DEV=/dev/disk/by-label/replicant ./install-letux-system -r
> > replicant  
> 
> > Well it is called makesd for a good reason, not install-a-system.  
> 
> Yes, and it is not makepartition or makerootfs.
> 
> This is a really nice idea... Maybe we can make it work. But it is
> not that easy as it looks:
> * should we be able to resize the partition or just overwrite
> existing partitions? (then it is quite similar to downloading and
> unpacking a .tbz which does not even need a new tool)

Hmm, here it is about having multiple .tbz combined together. So it is
a bit more complex. And the shortcuts are also nice. I first thought
about having a tool for just overwriting existing partitions like I did
in my call above.
But thinking about possible use cases, the other options would also be
interesting. An example would be someone has installed replicant up to
now and has also some apps with data there would like to try out
qtmoko and has no partition available for that. So besides of using
another microsd (and having the other one not available when needed or
getting lost), the only option would be to resize parts. Hmm, or btrfs.
But that will produce other problems (mess in uboot booting, kernel
loading).
I am a bit wondering whether it can be attached to something else which
does the actual partitioning. For example like installing a debian base
system feels like being attached to the partitioning tool in the debian
installer.
And how we can avoid some more reinvent-the-wheel stuff.
The more we deal with handling existing partitions the more we need to
do good error handling. If I understand it correctly (I have not
tested it yet), makesd e.g. does
not abort when umounting fails or the partition table is not reread
which would lead to unexpected results. For fresh sd cards it no big
problem.

Hmm, or having some installation/partitioning/recovery tool in NAND.
Then umount conflicts and automatic remount stuff can be avoided. would
be avoided. As a first step to do that I would propose an additional
option to makesd: --clone-tinkerphone-developer ;-) 

> * should we be able to create new partitions by this scheme?
> * how can we detect that the DEV is a partition and not the raw SD
> card?

have a separate tools for it. So you have no chances to mix things up.
Maybe you can just wrap makesd around it (by concatenating stuff
together), so you can avoid more maintenance.

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20180104/d87cf049/attachment.asc>


More information about the Gta04-owner mailing list