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
bd0a7da4
Commit
bd0a7da4
authored
Mar 19, 2004
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around the sfdisk problem (where it trashes the BSD partition bootblock)
parent
87a21949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
tmcd/linux/mkextrafs.pl
tmcd/linux/mkextrafs.pl
+17
-3
No files found.
tmcd/linux/mkextrafs.pl
View file @
bd0a7da4
...
...
@@ -107,9 +107,23 @@ if (!$forceit) {
}
#
# Set the partition type to Linux
#
mysystem
("
sfdisk
$diskdev
-c
$slice
83
");
# Set the partition type to Linux if not already set.
#
# XXX sfdisk appears to stomp on partition one's bootblock, at least if it
# is BSD. It zeros bytes in the block 0x200-0x400, I suspect it is attempting
# to invalidate any BSD disklabel. While we could just use a scripted fdisk
# sequence here instead, sfdisk is so much more to-the-point. So, we just
# save off the bootblock, run sfdisk and put the bootblock back.
#
# Would it seek out and destroy other BSD partitions? Don't know.
# I cannot find the source for sfdisk.
#
if
(
$stype
!=
131
)
{
mysystem
("
dd if=/dev/hda1 of=/var/tmp/part1.bb bs=8192 count=1
");
mysystem
("
sfdisk --change-id
$diskdev
$slice
83
");
mysystem
("
dd if=/var/tmp/part1.bb of=/dev/hda1 bs=8192 count=1
");
mysystem
("
rm -f /var/tmp/part1.bb
");
}
mysystem
("
mkfs
$fsdevice
");
mysystem
("
echo
\"
$fsdevice
$mountpoint
ext2 defaults 0 0
\"
>> /etc/fstab
");
...
...
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