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
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
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
b89d96cb
Commit
b89d96cb
authored
May 23, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-disk: write mbr to correct devices when use raid
and strip trailing / from mounted partition
parent
b92c930d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
setup-disk.in
setup-disk.in
+9
-3
No files found.
setup-disk.in
View file @
b89d96cb
...
...
@@ -3,6 +3,7 @@
PREFIX
=
.
"
$PREFIX
/lib/libalpine.sh"
MBR
=
${
MBR
:-
"/usr/share/syslinux/mbr.bin"
}
in_list
()
{
local
i
=
"
$1
"
...
...
@@ -55,7 +56,9 @@ install_mounted_root() {
# get a list of slaves
rootdisk
=
for
i
in
/sys/block/
$md
/slaves/
*
;
do
rootdisk
=
"
$rootdisk
/dev/
${
i
##*/
}
"
j
=
${
i
##*/
}
i
=
${
j
%[0-9]*
}
rootdisk
=
"
$rootdisk
/dev/
${
i
}
"
done
fi
chroot
"
$mnt
"
/sbin/mkinitfs
-F
"
$features
"
$kernel
...
...
@@ -74,7 +77,10 @@ install_mounted_root() {
# fix mbr for all disk devices
for
i
in
$rootdisk
;
do
dd
if
=
/usr/share/syslinux/mbr.bin
of
=
$i
local
errmsg
echo
"Writing MBR to
$i
"
errmsg
=
$(
dd
if
=
"
$MBR
"
of
=
$i
2>&1
)
\
||
echo
"
$errmsg
"
done
echo
""
echo
"Installation is done. Please reboot."
...
...
@@ -108,7 +114,7 @@ useall() {
if
[
-d
"
$1
"
]
;
then
# install to given mounted root
install_mounted_root
"
$
1
"
install_mounted_root
"
$
{
1
%/
}
"
exit
$?
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