Bug#301668: partman fails to create a prep partition, and falsely complains it is a ext3 partition.
On Sun, Mar 27, 2005 at 05:36:31PM +0200, Sven Luther wrote:
>
> The partman interface correctly marks the partition i created as prep, and
> also correctly sets the prep flag on the partition table, but it complains
> that the partition is an ext3 partition and has no mount point,
There are two possibilities for a package like this. First, to provide
partman only with a method but not with an imaginary file system and
Second, to provide partman with both.
Partman-newworld implements properly the second approach. If you want
to use it then the script choose_method/prep should be changed
appropriately (see the partman-newworld package).
The first approach is simpler in my opinion but Colin Watson disliked it
(I don't remember why). Try the patch attached (the directory
valid_filesystems can also be removed).
Anton Zinoviev
diff -Naur partman-prep/README /tmp/partman-prep/README
--- partman-prep/README Tue Jan 25 19:20:23 2005
+++ /tmp/partman-prep/README Sat Apr 16 19:06:48 2005
@@ -1,4 +1,2 @@
This udeb provides partman with new method "prep" (Use the partition
-as a PPC PReP boot partition). It also provides an imaginary file
-system called also "prep" that is automatically selected for all
-partitions used with method prep.
+as a PPC PReP boot partition).
diff -Naur partman-prep/choose_method/prep/do_option /tmp/partman-prep/choose_method/prep/do_option
--- partman-prep/choose_method/prep/do_option Tue Jan 25 19:20:22 2005
+++ /tmp/partman-prep/choose_method/prep/do_option Sat Apr 16 18:57:16 2005
@@ -8,7 +8,10 @@
[ -d $dev/$id ] || mkdir $dev/$id
echo prep >$dev/$id/method
+if [ -f $dev/$id/use_filesystem ]; then
+ rm $dev/$id/use_filesystem
+fi
if [ -f $dev/$id/format ]; then
rm $dev/$id/format
fi
-
+
\ No newline at end of file
diff -Naur partman-prep/debian/rules /tmp/partman-prep/debian/rules
--- partman-prep/debian/rules Tue Jan 25 19:20:23 2005
+++ /tmp/partman-prep/debian/rules Sat Apr 16 19:07:17 2005
@@ -32,7 +32,6 @@
debian/install-rc finish.d
debian/install-rc init.d
debian/install-rc update.d
- debian/install-rc valid_filesystems
dh_install parted_names lib/partman
rm -rf `find debian/$(PACKAGE) -name CVS`
rm -rf `find debian/$(PACKAGE) -name .svn`
diff -Naur partman-prep/update.d/prep /tmp/partman-prep/update.d/prep
--- partman-prep/update.d/prep Tue Jan 25 19:20:23 2005
+++ /tmp/partman-prep/update.d/prep Sat Apr 16 19:05:42 2005
@@ -41,7 +41,15 @@
done
close_dialog
-if [ "$method" = prep -a "$has_prep" = no ]; then
+if [ "$method" = '' -a "$has_prep" = yes ]; then
+ echo prep >$dev/$id/method
+ if [ -f $dev/$id/use_filesystem ]; then
+ rm $dev/$id/use_filesystem
+ fi
+ if [ -f $dev/$id/format ]; then
+ rm $dev/$id/format
+ fi
+elif [ "$method" = prep -a "$has_prep" = no ]; then
open_dialog SET_FLAGS $id
write_line "$flags"
write_line prep-boot
@@ -52,20 +60,5 @@
write_line "$flags"
write_line NO_MORE
close_dialog
-fi
-
-
-# The following is a hack and will be removed in future versions of
-# partman. It ensures that the prep partition can not be used for
-# some regular file system.
-if [ "$method" = prep ]; then
- if [ -f $id/format ]; then
- # we want to use the existing file system in the partition
- rm $id/format
- fi
- if [ -f $id/detected_filesystem ]; then
- # however no existing file system is detected :-)
- rm $id/detected_filesystem
- fi
fi
Reply to: