forked from Mirror/pmbootstrap
* The system image size is now calculated as: root size - home size. * New function in `pmb/helpers/other.py`: `folder_size()`, with a testcase. * Instead of copying everything to the system image folder, and deleting the home folder afterwards, do not copy the home folder in the first place. * Added `pmbootstrap -s` to skip generating the initramfs for faster debugging. * Set the default value in the "are you sure, that your partition has at least..." to "y", so we can run `yes '' | pmbootstrap install` to make it run through the whole installation process. * Increase full size to 120%, boot partition gets 15 MB free space now
This commit is contained in:
parent
2de2bd5bee
commit
1c13ca4fd9
8 changed files with 152 additions and 48 deletions
|
@ -51,14 +51,19 @@ def partitions_mount(args):
|
|||
def partition(args, size_boot):
|
||||
"""
|
||||
Partition /dev/install and create /dev/install{p1,p2}
|
||||
"""
|
||||
|
||||
logging.info("(native) partition /dev/install (boot: " + size_boot +
|
||||
size_boot: size of the boot partition in bytes.
|
||||
"""
|
||||
# Convert to MB and print info
|
||||
mb_boot = str(round(size_boot / 1024 / 1024)) + "M"
|
||||
logging.info("(native) partition /dev/install (boot: " + mb_boot +
|
||||
", root: the rest)")
|
||||
|
||||
# Actual partitioning with 'parted'
|
||||
commands = [
|
||||
["mktable", "msdos"],
|
||||
["mkpart", "primary", "ext2", "2048s", size_boot],
|
||||
["mkpart", "primary", size_boot, "100%"],
|
||||
["mkpart", "primary", "ext2", "2048s", mb_boot],
|
||||
["mkpart", "primary", mb_boot, "100%"],
|
||||
["set", "1", "boot", "on"]
|
||||
]
|
||||
for command in commands:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue