Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
e177121d
Commit
e177121d
authored
Mar 20, 2014
by
Gleb Fotengauer-Malinovskiy
Committed by
Michael Shigorin
Mar 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tar2vm: use UUID, prepare for virtio as well
Forward-port of b84182c5cb684afbd30ed1f9e5b6f89f55b4b53f commit extended to handle /boot as well.
parent
b0df2032
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
tar2fs
bin/tar2fs
+15
-1
No files found.
bin/tar2fs
View file @
e177121d
...
@@ -167,6 +167,20 @@ if [ -n "$BOOTPART" ]; then
...
@@ -167,6 +167,20 @@ if [ -n "$BOOTPART" ]; then
mkfs.
"
$BOOTFSTYPE
"
"
$LOOPBOOT
"
mkfs.
"
$BOOTFSTYPE
"
"
$LOOPBOOT
"
fi
fi
ROOTUUID
=
"
$(
blkid
-s
UUID
-o
value
-c
/dev/null
"
$LOOPROOT
"
)
"
if
[
-n
"
$ROOTUUID
"
]
;
then
ROOTDEV
=
"UUID=
$ROOTUUID
"
else
ROOTDEV
=
"
$LOOPROOT
"
fi
if
[
-n
"
$BOOTPART
"
]
;
then
BOOTUUID
=
"
$(
blkid
-s
UUID
-o
value
-c
/dev/null
"
$LOOPBOOT
"
)
"
if
[
-n
"
$ROOTUUID
"
]
;
then
BOOTDEV
=
"UUID=
$BOOTUUID
"
fi
fi
# mount and populate it
# mount and populate it
mkdir
-pm755
"
$ROOTFS
"
mkdir
-pm755
"
$ROOTFS
"
mount
"
$LOOPROOT
"
"
$ROOTFS
"
mount
"
$LOOPROOT
"
"
$ROOTFS
"
...
@@ -180,7 +194,7 @@ tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
...
@@ -180,7 +194,7 @@ tar -C "$ROOTFS" --numeric-owner -xf "$TAR"
for
i
in
/dev /proc /sys
;
do
mount
--bind
"
$i
"
"
$ROOTFS$i
"
;
done
for
i
in
/dev /proc /sys
;
do
mount
--bind
"
$i
"
"
$ROOTFS$i
"
;
done
# loop device so lilo could work...
# loop device so lilo could work...
echo
"
$
LOOPROOT
/
$ROOTFSTYPE
relatime 1 1"
>>
"
$ROOTFS
/etc/fstab"
echo
"
$
ROOTDEV
/
$ROOTFSTYPE
relatime 1 1"
>>
"
$ROOTFS
/etc/fstab"
# target device at once
# target device at once
if
[
-n
"
$BOOTPART
"
]
;
then
if
[
-n
"
$BOOTPART
"
]
;
then
...
...
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