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
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
fb0bc52b
Commit
fb0bc52b
authored
Mar 25, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-disk: change questions asked
ask first what disk to use, and then after how to use it.
parent
95fb7d55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
26 deletions
+32
-26
setup-disk.in
setup-disk.in
+32
-26
No files found.
setup-disk.in
View file @
fb0bc52b
...
...
@@ -340,7 +340,7 @@ find_disks() {
done
}
use
all
()
{
native_disk_inst
all
()
{
local
rootdisk_dev
=
"
$1
"
local
i size
local
boot_size
=
100
boot_part_type
=
"83"
...
...
@@ -466,6 +466,10 @@ EOF
apk del
-q
syslinux
}
data_only_disk_install
()
{
echo
"TODO:
$1
"
}
usage
()
{
cat
<<
__EOF__
usage: setup-disk [-hr] [-k kernelflavor] [-o apkovl] [MOUNTPOINT]
...
...
@@ -482,27 +486,18 @@ __EOF__
exit
1
}
rootdisk
_help
()
{
diskselect
_help
()
{
cat
<<
__EOF__
The root disk is the disk where / (root) gets mounted. This is also the
boot disk. There will created a separate /boot partition on this disk.
Select 'none' if you want have / (root) in memory only, i.e diskless or
data-only disk.
TODO
__EOF__
}
d
atadisk
_help
()
{
d
iskmode
_help
()
{
cat
<<
__EOF__
With a data-only disk you will boot from your current boot media (cdrom,
USB, CF etc) and run from memory only but have a disk where your data
gets stored. By default, there will be created a single lvm managed partition
where /var gets mounted.
Select 'none' if you want run completely disk-less.
TODO
__EOF__
}
...
...
@@ -556,6 +551,7 @@ if [ -d "$1" ]; then
fi
disks
=
$(
find_disks
)
disk
=
none
# no disks so lets exit quietly.
[
-z
"
$disks
"
]
&&
exit
0
...
...
@@ -569,21 +565,31 @@ if [ $# -gt 0 ]; then
exit
1
fi
done
rootdisk_dev
=
$1
disk
=
${
1
##/dev/
}
else
ask_disk
"Which one is the root/boot disk? (or '?' for help or 'none')"
\
rootdisk_help
$disks
rootdisk
=
$answer
rootdisk_dev
=
/dev/
$answer
ask_disk
"Which disk would you like to use? (or '?' for help or 'none')"
\
diskselect_help
$disks
disk
=
$answer
fi
# native disk install
if
[
"
$rootdisk
"
!=
"none"
]
;
then
useall
$rootdisk_dev
exit
$?
diskmode
=
if
[
"
$disk
"
!=
none
]
;
then
answer
=
while
true
;
do
echon
"How would you like to use
$disk
? ('root', 'data' or '?' for help) [?] "
default_read answer
'?'
case
"
$answer
"
in
'?'
)
diskmode_help
;;
root|data
)
break
;;
esac
done
diskmode
=
"
$answer
"
fi
# data-only disk (hybrid) install
#ask_disk "Which one is the data-only disk? (or '?' for help or 'none')" \
# datadisk_help $disks
# native disk install
case
"
$diskmode
"
in
root
)
native_disk_install /dev/
$disk
;;
data
)
data_only_disk_install /dev/
$disk
;;
esac
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