This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dc3e7f
commit 9c187f6
Showing
2 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# partable.m4 - Partitioning table for Cuteloader | ||
|
||
# the device name which Cuteloader will be installed | ||
define(`device_name', `/dev/sdb')dnl | ||
|
||
# the record label for the disk | ||
define(`reclabel_type', `mbr')dnl | ||
|
||
# the stage1 bootloader partition | ||
define(`STAGE1_START', `2048')dnl | ||
define(`STAGE1_SIZE', `1469440')dnl | ||
define(`STAGE1_TYPE', `0C')dnl | ||
|
||
# the stage2 bootloader (and ramdisk images) partition | ||
define(`STAGE2_START', `1471488')dnl | ||
define(`STAGE2_SIZE', `1469440')dnl | ||
define(`STAGE2_TYPE', `83')dnl | ||
|
||
# Run fdisk to get the device size and capture the output | ||
define(`FDISK_OUTPUT', `esyscmd(`fdisk -l `device_name)')dnl | ||
|
||
# Extract the line containing the device size information using grep | ||
define(`SIZE_LINE', `regexp(FDISK_OUTPUT, `^Disk `device_name)': ')dnl | ||
|
||
# Extract the total device size in sectors using awk | ||
define(`DEVICE_SIZE', `regexp(SIZE_LINE, ` ([0-9]+) sectors', ` \1')')dnl | ||
|
||
# Calculate the start and size of the third partition | ||
define(`PART3_START', `STAGE2_START + STAGE2_SIZE')dnl | ||
define(`PART3_SIZE', `DEVICE_SIZE - PART3_START')dnl | ||
|
||
# the third partition (freely available space) | ||
define(`PART3_TYPE', `83')dnl |