[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bts reassign 878722 partman-auto



On Fri, 2017-11-10 at 10:10 -0500, Lennart Sorensen wrote:
> On Tue, Nov 07, 2017 at 09:56:31PM +0100, Michael Kesper wrote:
> > Yes sure but why can't I correct it after the fact?
> > Even "rescanning disks" does not let you chose any other disks.
> > 
> > Is there a way of chosing "first internal disk" then?
> > Imagine I want to create one installation medium for laptops which only
> > differ whether they are set up with a NVM or a sata SSD.
> > I did not find any documentation helping me with this.
> 
> I can't think of any reliable way to determine what is an internal or
> external disk, and the concept of 'first' doesn't even have meaning.

This is true, but I don't think it's a good reason not to implement a
mostly-reliable heuristic.

If there are multiple disks, there are usually going to be just 2 of
them, one of which contains the installer.  In any installer build
other than netboot, it will look for its own disk in order to load
udebs.  Once it has done that, it can determine that the other disk is
the one to install on.  That's a pretty good heuristic.

Aside from that, we can also make a guess based on the bus type:

- ATA: probably internal
- NVMe: probably internal
- USB: probably external
- MMC/SD: ambiguous (eMMC must be internal, and Linux has a notion of
'non-removable' slots, but I don't think userland has this info)

If we could get more information about MMC/SD slots then we should be
able to implement an heuristic that would work for >99% of cases.

Ben.

-- 
Ben Hutchings
Who are all these weirdos? - David Bowie, reading IRC for the first
time

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: