Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
37dce2b2
Commit
37dce2b2
authored
Jun 19, 2023
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tar2fs: create /boot partition with ext4, if extlinux.conf and '/' is not ext4
parent
cf1e1664
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
tar2fs
bin/tar2fs
+25
-6
No files found.
bin/tar2fs
View file @
37dce2b2
...
...
@@ -80,6 +80,21 @@ if [ "$BOOTLOADER" == grub-efi -o "$BOOTTYPE" == EFI ]; then
ROOTPART
=
"2"
fi
# tested to work: ext[234], jfs
# NB: xfs doesn't have a spare sector for the bootloader
ROOTFSTYPE
=
"
${
4
:-
ext4
}
"
if
[
-f
"
$ROOTFS
/boot/extlinux/extlinux.conf"
]
&&
[
"
$ROOTFSTYPE
"
!=
ext4
]
;
then
if
[
-n
"
$EFIPART
"
]
;
then
BOOTPART
=
"2"
ROOTPART
=
"3"
else
BOOTPART
=
"1"
ROOTPART
=
"2"
fi
BOOTFSTYPE
=
"ext4"
fi
PARTTABLE
=
"
$7
"
if
[
-z
"
$PARTTABLE
"
]
;
then
if
[
"
$BOOTLOADER
"
==
grub-efi
]
;
then
...
...
@@ -148,10 +163,6 @@ ROOTSIZE="$((${ROOTSIZE:-$DEFSIZE} + $MB - 1))" # for ceil rounding to MB
ROOTSIZEM
=
"
$((
$ROOTSIZE
/
$MB
))
"
BOOTSIZEM
=
"
$((
(
$SIZE_FACTOR
*
$BOOT_SIZE_FACTOR
*
$BOOTSIZE
+
$MB
-
1
)
/
$MB
))
"
# tested to work: ext[234], jfs
# NB: xfs doesn't have a spare sector for the bootloader
ROOTFSTYPE
=
"
${
4
:-
ext4
}
"
# single root partition hardwired so far,
# add another image for home/data/swap if needed
ROOTDEV
=
"
$BLOCKDEV$ROOTPART
"
...
...
@@ -369,10 +380,18 @@ popd
if
[
-f
"
$ROOTFS
/boot/extlinux/extlinux.conf"
]
;
then
sed
-i
"s/LABEL=ROOT/
$ROOTDEV
/g"
"
$ROOTFS
/boot/extlinux/extlinux.conf"
if
[
"
$PARTTABLE
"
==
gpt
]
;
then
parting
set
"
$ROOTPART
"
legacy_boot on
if
[
-n
"
$BOOTPART
"
]
;
then
parting
set
"
$BOOTPART
"
legacy_boot on
else
parting
set
"
$ROOTPART
"
legacy_boot on
fi
fi
if
[
"
$PARTTABLE
"
==
msdos
]
;
then
parting
set
"
$ROOTPART
"
boot on
if
[
-n
"
$BOOTPART
"
]
;
then
parting
set
"
$BOOTPART
"
boot on
else
parting
set
"
$ROOTPART
"
boot on
fi
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment