Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
120e52bc
Commit
120e52bc
authored
Dec 02, 2014
by
Mike Hibler
Browse files
It has only been a week and we are up to GPT version 2!
parent
5a6735b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux-ms/mfs/rc.frisbee
View file @
120e52bc
...
...
@@ -99,6 +99,20 @@ getvar() {
# 2 1052672 234441614 111.3 GiB 8300
# 15 2048 4095 1024.0 KiB EF02
#
# MBR version 102 (aka GPT version 2):
#
# Disk /dev/sda: 234441648 sectors, 111.8 GiB
# Logical sector size: 512 bytes
# Disk identifier (GUID): 8639755F-23E6-487A-8740-D464BA75AAD7
# Partition table holds up to 128 entries
# First usable sector is 34, last usable sector is 234441614
# Partitions will be aligned on 2048-sector boundaries
# Total free space is 2014 sectors (1007.0 KiB)
#
# Number Start (sector) End (sector) Size Code Name
# 1 4096 234441614 111.8 GiB 8300 Linux filesystem
# 15 2048 4095 1024.0 KiB EF02
#
tweakgpt
()
{
_DSK
=
$1
_NEW
=
$2
...
...
@@ -114,6 +128,9 @@ tweakgpt() {
1048576s
)
_CUR
=
101
;;
234437519s
)
_CUR
=
102
;;
*
)
if
[
$_ALWAYS
-eq
1
]
;
then
echo
"WARNING: overwriting unknown GPT on
$_DSK
"
...
...
@@ -463,6 +480,18 @@ fixone() {
export
SLICEFIX_BIOSDISK
=
`
getvar BIOSDISK
"
$iline
"
`
export
SLICEFIX_DOM0MEM
=
`
getvar DOM0MEM
"
$iline
"
unknown
`
export
SLICEFIX_TRIM
=
`
getvar TRIM
"
$iline
"
0
`
MBRVERS
=
`
getvar MBRVERS
"
$iline
"
101
`
case
$MBRVERS
in
101
)
RPART
=
2
;;
102
)
RPART
=
1
;;
esac
export
SLICEFIX_RPART
=
${
RPART
:-
'0'
}
$BINDIR
/slicefix
$_PART
$_DISK
return
$?
}
...
...
@@ -623,6 +652,8 @@ fi
# some reason.
#
if
[
$reboot
-eq
1
]
;
then
# XXX let serial output drain
sleep
1
$BINDIR
/tmcc state RELOADDONEV2
echo
"
`
date
`
: Waiting for server to reboot us ..."
sleep
30
...
...
clientside/tmcc/linux-ms/mfs/slicefix
View file @
120e52bc
...
...
@@ -30,6 +30,11 @@ else
ETCDIR
=
/etc/emulab
fi
MFS_DEBUG
=
${
MFS_DEBUG
:-
'n'
}
if
[
"
$MFS_DEBUG
"
=
"y"
]
;
then
set
-x
fi
disk
=
"sda"
case
$#
in
...
...
@@ -45,11 +50,6 @@ case $# in
exit
1
esac
MFS_DEBUG
=
${
MFS_DEBUG
:-
'n'
}
if
[
"
$MFS_DEBUG
"
=
"y"
]
;
then
set
-x
fi
#
# Handle pseudo arguments in the environment.
#
...
...
@@ -92,6 +92,9 @@ case $TRIM in
;;
esac
# XXX hack to determine the root FS partition
RPART
=
$SLICEFIX_RPART
# Indicates the MFS has been properly localized and we can copy stuff
# into the image.
LOCALIZED1
=
"/.localized"
...
...
@@ -120,8 +123,7 @@ getloadervar() {
dolinux
()
{
isroot
=
0
# XXX assume part 2 is root right now
if
[
$part
-eq
2
]
;
then
if
[
$part
-eq
$RPART
]
;
then
isroot
=
1
fi
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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