#408641 asks user to select disk to partition, even if there's only one disk

#408641#5
Date:
2007-01-27 14:47:17 UTC
From:
To:
Partman (guided partitioning) will still ask the user to select which disk to
partition, even if there's only one disk.

Maybe the fix could be implemented in debconf/cdebconf:  when a multiselect
question only has one possible answer, it could be skipped automaticaly.

#408641#10
Date:
2007-01-27 16:21:32 UTC
From:
To:
Op 27-01-2007 om 15:47 schreef Robert Millan:
Could/would that destroy data on the disk???


In other words: Consider the risk of losing information.


Hope this Help
Geert Stappers

#408641#15
Date:
2007-01-27 17:49:39 UTC
From:
To:
personally i think its better that it asks

consider the situation where a user has two drives but the one they want to use for debian is not detected.

then they select the use entire disk option.

#408641#20
Date:
2007-01-27 19:50:25 UTC
From:
To:
reassign 408641 partman-auto
tags 408641 wontfix
thanks

I agree with others that having the disk explicitly selected has strong
advantages (explicit selection of the disk means less chance of the wrong
disk being formatted in case a second disk should not be detected).

No, the same check could be easily implemented in partman-auto if we'd
want to. Why cripple debconf for this?

#408641#27
Date:
2011-02-05 23:04:56 UTC
From:
To:
tags 408641 - wontfix
thanks

If the user has only one disk, and chooses to do guided partitioning,
then they have to choose which of their one disk they want to partition.
The very next question (for the partitioning scheme) then confirms this
by saying "Selected for partitioning:" followed by the exact name asked
for in the previous question.  The following question then confirms the
generated partitioning scheme (and displays the exact disk name again),
and the question after that confirms one more time that the user wants
to write the changes to the disk.  Thus, I think it seems entirely safe
to default to the one-and-only disk if no other disk exists, given that
the user will still get multiple chances to review and confirm their
choice.

- Josh Triplett

#408641#34
Date:
2011-02-06 18:07:32 UTC
From:
To:
Josh Triplett wrote:

FWIW, I tend to agree with this reasoning. It think it's likely that the
current situation is a historical accident. It may be a vestigial organ
from the time when partman did not include RAID and LVM setup, or from
before udev and /sys were used to determine human readable device names.

Patch attached (untested) & committed to people/joey branch.

#408641#41
Date:
2011-04-07 21:08:46 UTC
From:
To:
Hi,

tested the patch and doesn't work.
I've tried also with grep "\n" and also doesn't work.
So i have tried with "wc":

select_auto_disk() {
        local DEVS

        DEVS=$(get_auto_disks)
        [ -n "$DEVS" ] || return 1
        if [[ `echo "$DEVS" | wc -l` == "1" ]]; then
                # only one choice
                db_set partman-auto/select_disk "$DEVS"
                echo "$DEVS"
                return 0
        fi

but i get an error (please see image) which i don't understand.
I am also attaching syslog so it can be further analysed.

If this BR gets solved Debian Installer will require less 1/25 (4%) interaction to most users in standard installation.

#408641#46
Date:
2011-12-29 09:06:34 UTC
From:
To:
tags 408641 - patch
thanks

The proposed patch is reported to not be working, so I remove the
patch flag until someone report back with a tested and working patch.