On Wed, Jul 23, 2008 at 11:24:49AM +0200, Karel Zak wrote:> On Wed, Jul 23, 2008 at 04:43:30AM -0400, Christoph Hellwig wrote: > > On Wed, Jul 23, 2008 at 10:39:38AM +0200, maximilian attems wrote: > > > klibc mount has only short options thus uses the following syntax > > Frankly, it seems like a klibc problem...well not directly, but right klibc-utils should have proper syntax. initramfs-tools currently uses belows syntax. before we unmounted and remounted, which is much uglier. or even better have the util-linux-ng mount compiled against klibc, haven't looked into that project yet. a hook script (live-initramfs) seems to add util-linux-ng mount for cifs support and thus belows error came to sight.> > > to move a mounted tree: > > > mount -o move /sys /root/sys > > > > > > this generates the following error on util-linux-ng mount: > > > mount: you must specify the filesystem type > > > > > > belows patch is enough to add an alternative to > > > mount --move /olddir /newdir > > > > Please don't. Overloading -o for bind mounts initially was a really bad > > idea already. -o should be reserved to filesystem options. > > Right. Unfortunately, we already have more exceptions ;-( > > -o {remount,bind,rbind,owner,noowner,groups,nogroups,_netdev, > comment,loop}so they are all getting deprecated? -- maks
Hi Maximilian, On Wed, Jul 23, 2008 at 11:39:39AM +0200, maximilian attems wrote:> On Wed, Jul 23, 2008 at 11:24:49AM +0200, Karel Zak wrote: > > On Wed, Jul 23, 2008 at 04:43:30AM -0400, Christoph Hellwig wrote: > > > On Wed, Jul 23, 2008 at 10:39:38AM +0200, maximilian attems wrote: > > > > klibc mount has only short options thus uses the following syntax > > > > Frankly, it seems like a klibc problem... > > well not directly, but right klibc-utils should have proper syntax. > initramfs-tools currently uses belows syntax. before we unmounted > and remounted, which is much uglier. > > or even better have the util-linux-ng mount compiled against klibc,this is the best solution and it's in our TODO for more than one year. But nobody works on that... If you create some restricted and incompatible environment (e.g. "only short options") you shouldn't expect that standard system utils are ready to blindly follow this your decision. BTW, I don't understand what is bad on long options. Any idea?> a hook script (live-initramfs) seems to add util-linux-ng mount > for cifs support and thus belows error came to sight. > > > > > to move a mounted tree: > > > > mount -o move /sys /root/sys > > > > > > > > this generates the following error on util-linux-ng mount: > > > > mount: you must specify the filesystem type > > > > > > > > belows patch is enough to add an alternative to > > > > mount --move /olddir /newdir > > > > > > Please don't. Overloading -o for bind mounts initially was a really bad > > > idea already. -o should be reserved to filesystem options. > > > > Right. Unfortunately, we already have more exceptions ;-( > > > > -o {remount,bind,rbind,owner,noowner,groups,nogroups,_netdev, > > comment,loop} > > so they are all getting deprecated?No. The reason why we support these options is /etc/fstab (the "-o" is a command line alternative to /etc/fstab mount options). The "move" is unsupported in /etc/fstab. -- Karel Zak <kzak at redhat.com>
hello karel, On Wed, Jul 23, 2008 at 12:16:27PM +0200, Karel Zak wrote:> On Wed, Jul 23, 2008 at 11:39:39AM +0200, maximilian attems wrote: > > On Wed, Jul 23, 2008 at 11:24:49AM +0200, Karel Zak wrote:<snipp>> > > > well not directly, but right klibc-utils should have proper syntax. > > initramfs-tools currently uses belows syntax. before we unmounted > > and remounted, which is much uglier. > > > > or even better have the util-linux-ng mount compiled against klibc, > > this is the best solution and it's in our TODO for more than one > year. But nobody works on that...it is quite easy, on a debian box you only need to install libklibc-dev, pass ./configure CC=klcc --without-ncurses cd mount make by the way i'm getting this warning on such a configure run: configure: WARNING: sys/io.h: present but cannot be compiled configure: WARNING: sys/io.h: check for missing prerequisite headers? configure: WARNING: sys/io.h: see the Autoconf documentation configure: WARNING: sys/io.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/io.h: proceeding with the preprocessor's result configure: WARNING: sys/io.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------ ## configure: WARNING: ## Report this to kzak at redhat.com ## configure: WARNING: ## ------------------------------ ## lomount errors on: lomount.c:253: error: ???versionsort??? undeclared (first use in this function) hmm i see no, scandir on klibc side. hehe seems also you got some small patches for klibc support ;)> If you create some restricted and incompatible environment (e.g. > "only short options") you shouldn't expect that standard system utils > are ready to blindly follow this your decision. > > BTW, I don't understand what is bad on long options. Any idea?mount in klibc-utils is far from feature complete, can't even print out current mount status. guess it was just done q&d and thus.. size may play a role, for most purposes in initramfs it is enough for us.> > > -o {remount,bind,rbind,owner,noowner,groups,nogroups,_netdev, > > > comment,loop} > > > > so they are all getting deprecated? > > No. The reason why we support these options is /etc/fstab (the "-o" > is a command line alternative to /etc/fstab mount options). > > The "move" is unsupported in /etc/fstab.i see thanks for explanation. -- maks
On Wed, 23 Jul 2008, Karel Zak wrote:> No. The reason why we support these options is /etc/fstab (the "-o" > is a command line alternative to /etc/fstab mount options). > > The "move" is unsupported in /etc/fstab.i see busybox had implemented it too as overloaded flag, as we agree that this is bad. could --move gain the short option -m ? then i could implement it in klibc mount, tell busybox dev vda about it. -- maks