mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
Fixes the ability to AU after running chromeos-install
Make it possible to run chromeos-install without root BUG=none TEST=Build image, chromeos-install, verify ROOT-B is full size Change-Id: Id506f1e5a6f8b8ee03ea1bdd621aaab1239bca2c Reviewed-on: https://gerrit.chromium.org/gerrit/34081 Reviewed-by: Don Garrett <dgarrett@chromium.org> Commit-Ready: Chris Masone <cmasone@chromium.org> Tested-by: Chris Masone <cmasone@chromium.org>
This commit is contained in:
parent
53fbca3fdb
commit
e61da0dff1
@ -43,7 +43,7 @@ zero_free_space() {
|
||||
create_base_image() {
|
||||
local image_name=$1
|
||||
local rootfs_verification_enabled=$2
|
||||
local image_type="base"
|
||||
local image_type="usb"
|
||||
|
||||
if [[ "${FLAGS_disk_layout}" != "default" ]]; then
|
||||
image_type="${FLAGS_disk_layout}"
|
||||
|
||||
@ -170,6 +170,10 @@ def WriteLayoutFunction(sfile, func_name, image_type, config):
|
||||
sfile.write("fi\n")
|
||||
partition["var"] = "$STATEFUL_SIZE"
|
||||
|
||||
|
||||
sfile.write("STATEFUL_SIZE=$((STATEFUL_SIZE-(STATEFUL_SIZE %% %d)))\n" %
|
||||
config["metadata"]["fs_block_size"])
|
||||
|
||||
# Pass 2: Write out all the cgpt add commands.
|
||||
for partition in partitions:
|
||||
if partition["type"] != "blank":
|
||||
|
||||
@ -78,14 +78,30 @@
|
||||
"num": 5,
|
||||
"label":"ROOT-B",
|
||||
"type":"rootfs",
|
||||
"blocks":"1"
|
||||
"blocks":"4194304",
|
||||
"fs_blocks":"217600"
|
||||
},
|
||||
{
|
||||
"num": 3,
|
||||
"label":"ROOT-A",
|
||||
"type":"rootfs",
|
||||
"blocks":"4194304",
|
||||
"fs_blocks":"217600"
|
||||
}
|
||||
],
|
||||
"usb": [
|
||||
{
|
||||
"num": 3,
|
||||
"label":"ROOT-A",
|
||||
"type":"rootfs",
|
||||
"blocks":"1757184",
|
||||
"fs_blocks":"217600"
|
||||
},
|
||||
{
|
||||
"num": 5,
|
||||
"label":"ROOT-B",
|
||||
"type":"rootfs",
|
||||
"blocks":"1"
|
||||
}
|
||||
],
|
||||
"factory_install": [
|
||||
@ -102,6 +118,12 @@
|
||||
"blocks":"860160",
|
||||
"fs_blocks":"102400"
|
||||
},
|
||||
{
|
||||
"num": 5,
|
||||
"label":"ROOT-B",
|
||||
"type":"rootfs",
|
||||
"blocks":"1"
|
||||
},
|
||||
{
|
||||
"num": 12,
|
||||
"label":"EFI-SYSTEM",
|
||||
@ -137,6 +159,19 @@
|
||||
"label":"STATE",
|
||||
"type":"data",
|
||||
"blocks":"4096"
|
||||
},
|
||||
{
|
||||
"num": 3,
|
||||
"label":"ROOT-A",
|
||||
"type":"rootfs",
|
||||
"blocks":"1757184",
|
||||
"fs_blocks":"217600"
|
||||
},
|
||||
{
|
||||
"num": 5,
|
||||
"label":"ROOT-B",
|
||||
"type":"rootfs",
|
||||
"blocks":"1"
|
||||
}
|
||||
],
|
||||
"pgo": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user