detect size of rootfs
This commit is contained in:
parent
057b7a86ad
commit
e3736b8aee
14
README.md
14
README.md
|
@ -5,6 +5,14 @@ This is a set of scripts for patching a Chrome OS RMA shim to serve as a bootloa
|
|||
## Current Development Roadmap:
|
||||
- ~~build the image automatically~~
|
||||
- ~~boot to a shell~~
|
||||
- switch_root into an actual rootfs
|
||||
- start X11 in the actual rootfs
|
||||
- ui improvements in the bootloader
|
||||
- ~~switch_root into an actual rootfs~~
|
||||
- ~~start X11 in the actual rootfs~~
|
||||
- ~~ui improvements in the bootloader~~
|
||||
- load all needed drivers
|
||||
- autostart X11
|
||||
|
||||
## Usage:
|
||||
1. Grab a Chrome OS RMA Shim from somewhere. Most of them have already been leaked and aren't too difficult to find.
|
||||
2. Download a Devuan live ISO. Run it inside a VM and install it to a disk image. Mount the disk image in the host.
|
||||
3. Run `sudo DEBUG=1 ./build.sh`. The `rootfs_dir` argument should point to where you mounted the rootfs in part 2.
|
||||
4. Flash the generated image to a USB drive or SD card.
|
6
build.sh
6
build.sh
|
@ -88,7 +88,11 @@ echo "patching initramfs"
|
|||
patch_initramfs $initramfs_dir
|
||||
|
||||
echo "creating disk image"
|
||||
create_image $output_path 20 1200
|
||||
rootfs_size=$(du -sm $rootfs_dir | cut -f 1)
|
||||
rootfs_part_size=$(($rootfs_size * 11 / 10 + 10))
|
||||
#create a 20mb bootloader partition
|
||||
#rootfs partition is 10% larger than its contents
|
||||
create_image $output_path 20 $rootfs_part_size
|
||||
|
||||
echo "creating loop device for the image"
|
||||
image_loop=$(create_loop ${output_path})
|
||||
|
|
Loading…
Reference in New Issue