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
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
227ea88b
Commit
227ea88b
authored
May 08, 2008
by
David Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support booting an arbitrary disk-based mfs via dongle partitions.
parent
49e4ef6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
tmcd/freebsd/cdboot/rc.cdboot
tmcd/freebsd/cdboot/rc.cdboot
+25
-0
No files found.
tmcd/freebsd/cdboot/rc.cdboot
View file @
227ea88b
...
...
@@ -353,6 +353,31 @@ sub doboot()
elsif
(
$mfs
=~
/^freebsd.*$/
)
{
goto
mfs
;
}
elsif
(
$bootwhat
=~
/^mfs:localhost:partition:(\d+)$/
||
$bootwhat
=~
/^mfs:127\.0\.0\.1:partition:(\d+)$/
)
{
#
# In this case, we boot from an "alternate" mfs on the Nth
# partition of the default boot media. One mfs per partition.
#
my
$part
=
$
1
+
0
;
if
(
$part
<
1
||
$part
>
4
)
{
print
("
Invalid local mfs partition
$part
;
"
.
"
falling back to default MFS boot
\n
");
goto
mfs
;
}
# Boot from the bootloader device, and the specified partition
system
("
tbbootconfig -d -b 0xfe -k
$part
-c 0 -m 1
$bootdev
");
if
(
$?
)
{
print
("
Error running tbbootconfig;
"
.
"
falling back to default MFS boot
\n
");
goto
mfs
;
}
system
("
sync
");
BootNotify
(
0
,"
Bootinfo said to boot local partition
"
.
"
$part
on default boot device; rebooting.
");
system
("
reboot
");
sleep
(
10000
);
}
else
{
# Default to FreeBSD MFS.
goto
mfs
;
...
...
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