[Bug 195608] Re: [Feature Request] enhance recipe format to allow specifying an existing partition
Christopher Townsend
christopher.townsend at canonical.com
Wed Oct 24 19:59:47 UTC 2012
I have a use case in which I'm trying to use a fully automated install
using oem-config. I've taken Colin's branch and applied it to the
latest version of partman-auto in Precise and built a test version of
Ubiquity and have included it in a build.
The disk-recipe is written such that /home should be it's own partition.
The intention is that if the partition does not exist, then a new one
should be created. If the partition already exists, then it should be
kept and left untouched.
However, using the diff from Colin's branch, I have run into a few
issues and shortcomings.
1. When installing, Ubiquity would spin at the point that it starts to partition disks. After much investigation, I found this is due to error at this line in the diff:
partno="$(echo "$*" | sed '\''s/.*\$partno{ \([0-9][0-9]*\) }.*/\1/'\'')"
I ended up addressing this by changing it to:
partno="$(echo "$*" | sed 's/.*\$partno{ \([0-9][0-9]*\) }.*/\1/')"
I'm not sure if this really correct, but it seems to have fixed that
problem.
2. The next issue I ran into is if I set the $partno{ x } directive and the partition does not exist, it goes into an infinite loop. I found the following code block to be the culprit:
if [ -z "$partid" ]; then
logger -t partman-auto \
"Partition number $partno in recipe not found; creating new partition instead"
continue
fi
I then fixed this loop by changing this block to this:
if [ -z "$partid" ]; then
logger -t partman-auto \
"Partition number $partno in recipe not found; creating new partition instead"
scheme="$scheme_rest"
continue
fi
3. With the last change in place, the next issue I ran into is that if
the partition does not exist, then a new one will not be created.
4. Lastly, If I leave the $partno directive out and let partman-auto
create the partition and then add the $partno directive back in when the
partition exists, then the partition will be preserved, but it is not
added to /etc/fstab and so the partition is not automatically mounted
and used by the install and the running system.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to partman-auto in Ubuntu.
https://bugs.launchpad.net/bugs/195608
Title:
[Feature Request] enhance recipe format to allow specifying an
existing partition
Status in The Dell Project:
Invalid
Status in “partman-auto” package in Ubuntu:
Triaged
Status in “partman-auto” source package in Hardy:
Invalid
Bug description:
Binary package hint: partman-auto
Fundamental problem for Dell install is that we would like to be able
to let the user re-install their system, but keep the contents of
their /home directory intact.
One potential way to solve this would be to put /home on a separate
partition and not format it during the install, but since partman does
not allow this level of specification in the preseed file, this will
not work.
(Conceptually) What we need in order for this to work is something like:
Partition /home /dev/disk/by-id/edd-int13_dev80_part5 --noformat
Partition / use-free-space --automatic --format
Partition swap use-free-space --automatic --format
Any other way to keep /home during a re-install would also be acceptable. Currently, the disk partitioning looks like:
/dev/sda1 --> Dell Utility Partition
/dev/sda2 --> Dell Reinstallation Partition
/dev/sda3 --> /
/dev/sda4 --> extended
/dev/sda5 --> swap
To manage notifications about this bug go to:
https://bugs.launchpad.net/dell/+bug/195608/+subscriptions
More information about the foundations-bugs
mailing list