When loopfiles are used mkfs has to target the file and not the containing device
Bug #177868 reported by
Agostino Russo
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Wubi |
Fix Released
|
Low
|
Unassigned | ||
partman-ext3 (Ubuntu) |
Fix Released
|
Undecided
|
Evan |
Bug Description
Binary package hint: partman-ext3
When loopfiles are used, mkfs has to target the file and not the containing device. Preliminary patch is provided. Similar patches should also be applied to other commit.d/*format_* scripts.
loopfile=$(losetup $device 2>/dev/null|cut -f 3 -d ' ')
loopfile=
loopfile=
if [ -n "$loopfile" ]; then
if log-output -t partman --pass-stdout mkfs.ext3 -F "$loopfile" >/dev/null; then
sync
status=OK
else
fi
else
#run mkfs as usual
fi
Related branches
lp:~ago/partman-auto-loop/lupin-support
- No reviews requested
description: | updated |
Changed in wubi: | |
importance: | Undecided → Low |
status: | New → Fix Committed |
Changed in wubi: | |
status: | Fix Committed → Fix Released |
Changed in wubi: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
To make it even safer one might also check for the existance of /var/lib/ partman/ devices/ $dev/loop
loopfile=$(losetup $device 2>/dev/null|cut -f 3 -d ' ') ${loopfile# \(} ${loopfile% \)}
status= failed
loopfile=
loopfile=
[ -z "$loopfile" ] && [ -f loop ] && loopfile=$(cat loop)
if [ -n "$loopfile" ]; then
if log-output -t partman --pass-stdout mkfs.ext3 -F "$loopfile" >/dev/null; then
sync
status=OK
else
fi
else
#run mkfs as usual
fi