Resizing, adding partitions to the internal system drive of ChromiumOs

401 views
Skip to first unread message

CqN on ChromiumOS v78

unread,
Jan 9, 2020, 6:43:44 PM1/9/20
to Chromium OS Discussion
I could not get any hit on any recent discussions on this.  Security processes have been changing.


1.  Internal boot Disk.  Is it possible to resize the hardisk partitions in Dev Mode, without the boot operation failing.  My goal is to reduce the size of the usually large last partition of user space and create an independent new partition for data.  I can now get part of this functionality by using an external disk.

It is ok if this process is done while running an os, ideally chromiumos itself, booted from an external (usb) disk.

2.  External USB boot disk. Usually ChromiumOs is installed on a usb disk (the standard builds openly available such as ArnoldTheBat, Cloudready), have specific partition layouts/sizes different from that of the internal (hard) disk installation.  Can these partition layouts be minimally changed, say to increase the sizes of ROOT-B, KERN-B to be the same as those of -A ones, so that I experiment with possible version updates as done on disk installs?

The basic question is, if the partition layout  is modified even minimally, will the boot malfunction?

Mike Frysinger

unread,
Jan 25, 2020, 8:56:11 AM1/25/20
to chacko...@gmail.com, Chromium OS Discussion
the partition offsets/sizes are encoded in /usr/sbin/write_gpt.sh.  but that is only used when installing the image on the fly.  if you're just booting & running it, that shouldn't matter off the top of my head.

so ignoring that, partition layouts can be changed & CrOS won't care.  of course, you're responsible for actually moving the data (filesystems/kernels/etc...) around on the disk, and if you're executing out of those partitions, it can be pretty tricky.

the easiest answer is more likely to rerun build_image with the updated disk layout yourself.
-mike

--
--
Chromium OS Discussion mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-discuss

CqN on ChromiumOS v78

unread,
Jan 28, 2020, 12:36:07 AM1/28/20
to Chromium OS Discussion
Mike, thank you.

I have shrunk the full sized home partition from a hard disk install (yes with resize2fs to moving the sectors down) and it worked fine, with an added my own additional partition.

I have also expanded a usb installed home partition successfully.

Mike, Another question. From the same source chromium image install, the disk install to the usb results in minimum size home partition, but to a fixed disk makes a maximum size home partition.  Are there two gpt profile files provided one for install to a usb, and the other to the hard disk? Or somehow this is parametrized?  If so, which ones should I modify for install to which disk?  I need to know this before I can do the above experiment.

Mike Frysinger

unread,
Jan 28, 2020, 7:37:41 AM1/28/20
to chacko...@gmail.com, Chromium OS Discussion
the stateful partition is designed to grow to fill the space because that's where all the user's data lives.  there is no hard min or max size, but the smaller you make it, the less you'll be able to have at runtime (for your Chrome profile, program settings, download files, etc...).
-mike

CqN on ChromiumOS v78

unread,
Jan 28, 2020, 5:04:43 PM1/28/20
to Chromium OS Discussion
Mike Frysinger,

I see the gpt layout in /usr/sbin/write_gpt.sh in two functions.
  load_base_vars()
  load_partition_vars()
Do I make a simple text file (without the function) with all those defines in the function, and use that file path xxx for
chromeos-install --gpt_layout xxx ?

My goal is do an install on to a usb disk, with ROOT-B partition the same as ROOT-A to see if can update the version on chromiumos running on the usb stick.

Thank you, Mike!


On Thursday, January 9, 2020 at 3:43:44 PM UTC-8, CqN on ChromiumOS v78 wrote:

Mike Frysinger

unread,
Jan 28, 2020, 6:16:41 PM1/28/20
to chacko...@gmail.com, Chromium OS Discussion
sorry, but we don't really support manually editing that file.  it's generated by the disk layout json source inputs which build_image uses.

maybe your hacks will work, but i've never thought about it, and i'm not about to start since that's a purely generated file :).
-mike

CqN on ChromiumOS v78

unread,
Jan 28, 2020, 9:02:14 PM1/28/20
to Chromium OS Discussion
Mike, Thank you for the suggestions.

The json file you mentioned available on the final built image I use, or is that part of the build process?  I wish to avoid hacks, but modify properly. I cannot build the chromiumos image from source.

Perhaps this is not something I would be able to do.


On Thursday, January 9, 2020 at 3:43:44 PM UTC-8, CqN on ChromiumOS v78 wrote:

CqN on ChromiumOS v78

unread,
Jan 29, 2020, 12:25:01 PM1/29/20
to Chromium OS Discussion
On looking back, my original plan all along was not to do any hacking.  I was wishing to use chromeos-install, the normal install utility.  It has a parameter --gpt-layout.  I wanted to know the format of the file input with --gpt-layout.  Is this possibly documented anywhere?  Thank you very much for any possible leads.
Reply all
Reply to author
Forward
0 new messages