Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
52bbb477
Commit
52bbb477
authored
Dec 14, 2015
by
Valery Kartel
Committed by
Natanael Copa
Dec 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-disk: fix filesystem creation and help text
parent
b60397f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
setup-disk.in
setup-disk.in
+21
-12
No files found.
setup-disk.in
View file @
52bbb477
...
...
@@ -436,16 +436,17 @@ stop_all_raid() {
# install needed programs
init_progs
()
{
local
raidpkg
=
local
raidpkg
=
fs
=
fstools
=
"e2fsprogs"
[
-n
"
$USE_RAID
"
]
&&
raidpkg
=
"mdadm"
case
$ROOTFS
in
ext
*
)
fstools
=
e2fsprogs
;
mkfs_args
=
"-q"
;;
xfs
)
fstools
=
xfsprogs
;
mkfs_args
=
"-q"
;;
# we need load btrfs module early to avoid the error message:
# 'failed to open /dev/btrfs-control'
btrfs
)
fstools
=
btrfs-progs
;
mkfs_args
=
""
;
modprobe btrfs
;;
esac
apk add
--quiet
sfdisk e2fsprogs lvm2
$raidpkg
syslinux
$fstools
$@
for
fs
in
$BOOTFS
$ROOTFS
$VARFS
;
do
case
$fs
in
xfs
)
fstools
=
"
$fstools
xfsprogs"
;
modprobe xfs
;;
# we need load btrfs module early to avoid the error message:
# 'failed to open /dev/btrfs-control'
btrfs
)
fstools
=
"
$fstools
btrfs-progs"
;
modprobe btrfs
;;
esac
done
apk add
--quiet
sfdisk lvm2
$raidpkg
syslinux
$fstools
$@
}
show_disk_info
()
{
...
...
@@ -522,7 +523,7 @@ find_lvm_partition() {
# set up optional raid and create filesystem on boot device.
setup_boot_dev
()
{
local
disk
=
bootdev
=
local
disk
=
bootdev
=
mkfs_args
=
"-q"
local
part
=
$(
for
disk
in
$@
;
do
find_boot_partition
$disk
;
done
)
set
--
$part
bootdev
=
$1
...
...
@@ -540,7 +541,8 @@ setup_boot_dev() {
--metadata
=
0.90
--quiet
--run
$@
$missing
||
return
1
bootdev
=
/dev/md0
fi
mkfs.
$BOOTFS
-q
$bootdev
[
"
$BOOTFS
"
==
"btrfs"
]
&&
mkfs_args
=
""
mkfs.
$BOOTFS
$mkfs_args
$bootdev
BOOT_DEV
=
"
$bootdev
"
}
...
...
@@ -730,7 +732,8 @@ data_only_disk_install() {
# setup
setup_root
()
{
local
root_dev
=
"
$1
"
boot_dev
=
"
$2
"
local
root_dev
=
"
$1
"
boot_dev
=
"
$2
"
mkfs_args
=
"-q"
[
"
$ROOTFS
"
==
"btrfs"
]
&&
mkfs_args
=
""
mkfs.
$ROOTFS
$mkfs_args
"
$root_dev
"
mkdir
-p
"
$SYSROOT
"
mount
-t
$ROOTFS
$root_dev
"
$SYSROOT
"
||
return
1
...
...
@@ -917,6 +920,12 @@ options:
-s Use SWAPSIZE MB instead of autodetecting swap size (Use 0 to disable swap)
-v Be more verbose about what is happening
If BOOTFS, ROOTFS, VARFS are specified, then format a partition with specified
filesystem. If not specified, the default filesystem is ext4.
Supported filesystems for
boot: ext2, ext3, ext4, btrfs
root: ext2, ext3, ext4, btrfs, xfs
var: ext2, ext3, ext4, btrfs, xfs
__EOF__
exit
1
}
...
...
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