Bug#249755: doesn't detect ext2 revision 0 file system
- To: 249755@bugs.debian.org
- Cc: Anton Zinoviev <anton@lml.bas.bg>
- Subject: Bug#249755: doesn't detect ext2 revision 0 file system
- From: Martin Michlmayr <tbm@cyrius.com>
- Date: Fri, 13 Jan 2006 12:12:17 +0000
- Message-id: <[🔎] 20060113121217.GA17736@derision.cyrius.com>
- Reply-to: Martin Michlmayr <tbm@cyrius.com>, 249755@bugs.debian.org
- In-reply-to: <20051103200203.GA31454@deprecation.cyrius.com> <20051104123248.GA24751@derision.cyrius.com>
- References: <20040519011416.GA5438@deprecation.cyrius.com> <20051103200203.GA31454@deprecation.cyrius.com> <20040519011416.GA5438@deprecation.cyrius.com> <20051103200203.GA31454@deprecation.cyrius.com> <20051104123248.GA24751@derision.cyrius.com>
* Martin Michlmayr <tbm@cyrius.com> [2005-11-03 20:02]:
> * Martin Michlmayr <tbm@cyrius.com> [2004-05-19 02:14]:
> > partman doesn't recognize ext2 revision 0 as ext2r0 but shows it as
> > ext2. Ideally, what it should do is this: if it finds an ext2 file
> > system, it should run "tune2fs -l" over the partition.
>
> Is the patch below acceptable?
>
> Comments:
> - I'm not if testing for a file belonging to partman-ext2r0 is the
> best way to check if it is available. Maybe valid_filesystems/ext2r0
> should be called? But I don't know.
Anton, do you have a more elegant way or is it okay to apply the patch
I proposed?
> Index: partman-base/update.d/detected_filesystem
> ===================================================================
> --- partman-base/update.d/detected_filesystem (revision 31824)
> +++ partman-base/update.d/detected_filesystem (working copy)
> @@ -28,6 +28,11 @@
> rm -f $id/detected_filesystem
> else
> [ -d $id ] || mkdir $id
> + if [ "$filesystem" = "ext2" -a -f /lib/partman/parted_names/ext2r0 ]; then
> + if $(tune2fs -l $path | grep -q "^Filesystem revision #: \+0 (original)$"); then
> + filesystem=ext2r0
> + fi
> + fi
> echo "$filesystem" >$id/detected_filesystem
> fi
> fi
--
Martin Michlmayr
http://www.cyrius.com/
Reply to: