forked from Mirror/pmbootstrap
Parted often succeeds, but then returns a non-zero exit code, because it can not inform the kernel of the changes. In most cases this is not even necessary, so it really should not fail there. When the error was fatal, pmbootstrap will crash shortly afterwards when it tried to mount or run mkfs on the partition anyway.
This commit is contained in:
parent
1b387a00cf
commit
c33db6315e
1 changed files with 5 additions and 2 deletions
|
@ -59,7 +59,10 @@ def partition(args, size_boot):
|
|||
logging.info("(native) partition /dev/install (boot: " + mb_boot +
|
||||
", root: the rest)")
|
||||
|
||||
# Actual partitioning with 'parted'
|
||||
# Actual partitioning with 'parted'. Using check=False, because parted
|
||||
# sometimes "fails to inform the kernel". In case it really failed with
|
||||
# partitioning, the follow-up mounting/formatting will not work, so it
|
||||
# will stop there (see #463).
|
||||
commands = [
|
||||
["mktable", "msdos"],
|
||||
["mkpart", "primary", "ext2", "2048s", mb_boot],
|
||||
|
@ -68,7 +71,7 @@ def partition(args, size_boot):
|
|||
]
|
||||
for command in commands:
|
||||
pmb.chroot.root(args, ["parted", "-s", "/dev/install"] +
|
||||
command)
|
||||
command, check=False)
|
||||
|
||||
# Mount new partitions
|
||||
partitions_mount(args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue