fstab mounting is borked in v5.25

Please post any bugs you have found
Message
Author
Bruce B

#21 Post by Bruce B »

Karl Godt,

You can theorize and speculate.

I'm doing hands on testing.

There is a huge difference in procedure. Do you want it to work in theory or in reality?

In terms of this specific bug request (turned help request), MikeF can test your theories. He can test my actual results.

If MikeF is willing to use his keyboard, and I suppose it will be, let him report results from my tests and your theories.

Unless you have a better idea

Bruce

~

Bruce B

#22 Post by Bruce B »

Karl Godt

The code you posted below, doesn't apply to the topic title or MikeF's complaint. Or the bug I validated.

Code: Select all

mount-FULL -n -o ro /dev/sda4 /mnt/sda4
What is in discussion is fstab mounting particular to ntfs and the bug.

Bruce

~

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#23 Post by Karl Godt »

The OP posted :
BTW I just discovered that mount from the command line will not mount NTFS partitions r/o - it ignores that option and mounts them r/w anyway. Sigh.
Can't imagine anything else than an old , dying HD .
In 2009 someone reported (version unknown) that attempting to mount an NTFS partition resulted in an 'unknown option -n' error.
The link would be fine also .

Bruce posted :
mount is probably a script. open it and see if you can see where the odd -n option error is originating from and how it originates
The '-n' option should not do anything because it has something to do with /etc/mtab and not with /etc/fstab . "mount-FULL -n -a" should mount ntfs correctly , as "busybox mount -n -a"

FSTAB entry 1 :
/dev/sda4 /mnt/sda4 ntfs ro 0 1

mount-FULL -n -a : OK and ro
busybox mount -n -a : OK and ro
mount : OK and ro

FSTAB entry 2 :
/dev/sda4 /mnt/sda4 ntfs-3g ro 0 1

mount-FULL -n -a : ntfs-3g: Unknown option '-n'.
busybox mount -n -a : OK , but rw
mount : ntfs-3g: Unknown option '-n'.

So it seems , that mount-FULL uses the ntfs-3g binary if fs is ntfs-3g in fstab , as Bruce suggests , simply ntfs does not call for ntfs-3g by mount-FULL .

FSTAB entry 3 :
/dev/sda4 /mnt/sda4 auto ro 0 1

mount-FULL -n -a : OK , and ro
busybox mount -n -a : OK , and ro
mount : OK , and ro

Other fs=vfat|msdos gave mount error .

Mike posted :
/dev/sda7 /temp ntfs ro 0 0
normally it should work , I can also imagine a typo '?/temp:/tmp' , maybe the directory /temp does not exists or should exist as /mnt/temp
/dev/sr0 /cd auto ro,noauto 0 0
Also, the optical drive mount is a null action - nothing happens.
When I use pmount or the mount command line, everything works fine.
Here also : fresh install , forgotten to create the dir /cd but fixed fstab or no medium inserted .
Because I don't know where the "mount -a" command starts from ( possibilities : /etc/rc.d/rc.sysinit.local || /root/Startup ) I would suggest something like

Code: Select all

mount -a 2>/tmp/mount_a.err
to get more information . If you start "mount -a" from the Startup folder , take a look into /tmp/xerrs.log .

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#24 Post by Karl Godt »

And make sure , that the fuse module is loaded

Code: Select all

lsmod | grep fuse
It appears , that there is a 'cuse.ko' in luci_254.sfs/lib/modules/2.6.33.2/kernel/fs/fuse/ folder but no fuse.ko

CONFIG_CUSE:
This FUSE extension allows character devices to be
implemented in userspace.

CONFIG_FUSE_FS:
With FUSE it is possible to implement a fully functional filesystem
in a userspace program.

grep -i -E 'fuse|cuse|ntfs|vfat|msdos' /mnt/+mnt++mnt+sda9+ISOs+puppy5+luci-254.iso+luci_254.sfs/etc/modules/DOTconfig-k2.6.33.2-27MAY2010-LUPU-SMP-TICKLESS
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_NTFS_FS=y
# CONFIG_NTFS_DEBUG is not set
CONFIG_NTFS_RW=y
CONFIG_AUFS_BR_FUSE=y
CONFIG_MSDOS_PARTITION=y

cuse.ko had not been part of the standard puppy 4series but fuse.ko is and both modules are in 511 but while trying to trim the .iso down to 128MB some "exotic" drivers had been taken out of /lib/modules in 52 .

Bruce B

#25 Post by Bruce B »

Karl Godt,

Your ideas and theories serve to show your ideas and theories are silly.

You have not shown a sound testing method.

It is easy to test, why haven't you?

Bruce

~

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#26 Post by Karl Godt »

With all respect , but now you become kind of "to be stuck up" to say in kind words .

About the fuse module :
or the FUSE kernel driver must be upgraded to a safe version which is also included in the FUSE package for Linux kernel version 2.6.9 and later.
from the FAQ page of ntfs-3g .
New: Built-in FUSE support by using a stripped down, integrated FUSE library. Linux uses this by default which means NTFS-3G doesn’t require the installation of the FUSE package, only FUSE kernel support.
http://www.tuxera.com/community/release-history/
You have not shown a sound testing method.
No comment !

Bruce B

#27 Post by Bruce B »

Karl,
With all respect , but now you become kind of "to be stuck up" to say in kind words
Not stuck up. I am no longer willing to humor you.

The bug is validated exactly as described by MikeF. I've raised the bar on you by attaching a screen shot, a picture of the bug in action. You can see it in the same post I validated the bug

Click Here For Picture


Bruce

~

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#28 Post by Karl Godt »

I am guessing you have ntfs-3g set as fs and not ntfs ??

Without the fstab entry the screen shot is worthless !

Bruce B

#29 Post by Bruce B »

Karl Godt wrote:I am guessing you have ntfs-3g set as fs and not ntfs ??

Without the fstab entry the screen shot is worthless !
Post after post and you have not demonstrated enough technical expertise to isolate it, identify it or validate it. You haven't come close.

Why refute it?

~

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#30 Post by Karl Godt »

Fresch frugal install of
Lucid Puppy 254 PUPMODE=5

the fuse.ko is inside the initrd.gz and should be cp to full installs by
grep -n '/initrd' `which puppyinstaller`
1366: if [ -d /lib/modules/$KERNELVER/initrd ];then
1368: cp -af /lib/modules/$KERNELVER/initrd/* $DESTMNTPT/lib/modules/$KERNELVER/

it is loaded automatically here .

these fstab entries don't work for me :
#/dev/sda4 /mnt/sda4 ntfs ro 0 1
#/dev/sda4 /mnt/sda4 ntfs-3g ro 0 1

mount-FULL calling ntfs-3g with the -n option
busybox_v1.16.2 busybox mount -: no such device , though /dev/sda4 seems to be correct :
brw-r--r-- 1 root root 8, 4 2001-02-13 21:43 /dev/sda4

but this does :
/dev/sda4 /mnt/sda4 auto ro 0 1

to mount -n -a , mount-FULL -n -a , mount /dev/sda4 , mount /mnt/sda4 , busybox mount -n -a
sucessfully the ntfs partition .

And because of wrong '/bin/df' /tmp/xerrs.log gets spammed by 'pup_event_frontend_d' with
"ash: 713: unknown operand" , which stands for availabble tmpfs of 713MB , so
the df-script is also essential for frugal installs to reduce the output of grep '/' to only one line .

The df thing seems not to affect the mount script at all though it is used by the
'icon_mounted_func' .

At all it seems to be a simply 'auto' for the fs in fstab and perhaps delete the 'noauto' from the cd line .

Bruce B

#31 Post by Bruce B »

Karl Godt,

Please tell me what you want. I ask, because I'm actually not sure.

Discuss for the sake of discussion technical discussion? Learn? Teach? Refute? Something else?


Bruce

~

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#32 Post by Karl Godt »

Finally I think I found the thread the OP mentioned , and I am astonished ,
that a sophisticated and experienced member started it :
Puppy's fstab + ntfs-3g = error
The thread ended unsolved ....

The unfortunately orphaned
Issue 19: fstab + ntfs-3g = error
pointed me to it .
This bug declaration mentioned this fstab issue also not working on
Puppy 430 and Puppy 431 , but on my full installations of
Macpup Foxy 3 based upon Puppy 430 and
Macpup Opera 2 based upon Puppy 431
the fstab works contrary to the bug submitter.

I also had put the statically ntfs-3g and mount-FULL from 511 into luci-254 and moved the ntfs-3g-libs in /usr/lib and /lib out of their directories
and must confirm , that for whatever cause ,
ntfs-3g gets passed the '-n' option there .

This is unbelieveable to me , though it seems ,
that while development woof DL libs that may create a linux environment , where some things do not work anymore as expected or usual .

I guess many have experienced , that while a script in the terminal works , it may not work with the same syntax in a script .

For anyone interested , this puzzled me in so far :

Code: Select all

##echo 'Part -a begin'
if [[ "`echo "$@" | grep -w -E '\-[a-z]*a[a-z]*|\-a[a-z]*|\-[a-z]*a|\-a'`" != "" ]] ; then
### option -a given
##echo 'if #1'
if [ -n `readlink -f /etc/fstab` ] ; then
##echo 'if #2'
FSTAB=`cat $(readlink -f /etc/fstab) | grep '^/dev/' | grep -v 'noauto' | tr '\t' ' ' | tr -s ' '`
MOUNTDIRS=`echo "$FSTAB" | cut -f 2 -d ' '`
for i in $MOUNTDIRS ; do
[ ! -d $i ] && echo 'if #3' && mkdir -p $i
done

for i in $MOUNTDIRS ; do
DEVICE=`echo "$FSTAB" | grep "$i" | cut -f 1 -d ' '`
FSTYPE=`echo "$FSTAB" | grep "$i" | cut -f 3 -d ' '`
OPTION=`echo "$FSTAB" | grep "$i" | cut -f 4 -d ' '`
mount-FULL "$DEVICE" "$i" -t "$FSTYPE" -o "$OPTION"
done
else
echo -e "\\033[0;31m""Error , option '-a' given but fstab does not exists""\\033[0;39m"
exit
fi
else
##echo 'if #1 else'
#v2.12 discovered difference between $@ and $*. Replaced all $@ with $* in this script...

Bruce B

#33 Post by Bruce B »

Karl Godt wrote:I also had put the statically ntfs-3g and mount-FULL from 511 into luci-254 and moved the ntfs-3g-libs in /usr/lib and /lib out of their directories and must confirm , that for whatever cause ,
ntfs-3g gets passed the '-n' option there
Right. I hope this means you concur there is a bug. I'm not going to debug it unless asked.

My interest is making sure the bug report stays open. If you agree, then we can find something else to argue about :)

~

Mmmm
Posts: 22
Joined: Tue 15 Jun 2010, 19:46

#34 Post by Mmmm »

Here's a little script using mount-FULL as a workaround.
Using this means you don't need to replace your mount program with mount-FULL and so you don't lose your little mount indicators.

I put it on my desktop with the required arguments in the little argument box and away I went, you can use it for as many different drives as you like. (just use different arguments for each 'shortcut').

(I called it "MountByLabel-ntfs")

Code: Select all


#!/bin/sh
#usage MountByLabel-ntfs [label] [mountpoint]
#eg. MountByLabel Whitey /mnt/whitey

change_icon()
{
#change desktop icons
echo "<?xml version=\"1.0\"?> 
<env:Envelope xmlns:env=\"http://www.w3.org/2001/12/soap-envelope\"> 
 <env:Body xmlns=\"http://rox.sourceforge.net/SOAP/ROX-Filer\"> 
  <SetIcon> 
    <Path>$1</Path> 
    <Icon>$2</Icon> 
  </SetIcon> 
 </env:Body> 
</env:Envelope>"  | rox -R
}
	
label=$1
mntpt=$2

mounted=$(mount | grep $mntpt)

#if already mounted, unmount
if [ -n "$mounted" ]; then 
	umount $mntpt
	if [ -z "$(mount | grep $mntpt)" ]; then
		icon="/usr/local/lib/X11/pixmaps/usbdrv48.png"
		rox -D $mntpt #close window
	fi
#mount if not mounted
else 
	mount-FULL -t ntfs-3g -L $label $mntpt
	rox -x $mntpt
	if [ -n "$(mount | grep $mntpt)" ]; then
		icon="/usr/local/lib/X11/pixmaps/usbdrv_mntd48.png"
		rox $mntpt #display mounted drive root
	fi
	
fi

device="$(mount | grep $mntpt | cut -c 6-9)" #get device

change_icon /root/.pup_event/drive_$device $icon

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#35 Post by ldolse »

Sorry to revive a thread which seems to have gone quiet, but has this bug ever been solved upstream? (guessing not as I don't see an agreed upon solution here) I discovered this same issue with another user using mpdPup (built from a September woof snapshot) - I've got a wizard there which writes an entry to fstab, e.g.:

Code: Select all

/dev/sdb1     /mnt/music  auto     defaults              0 0
And that seems to work great for any drive type except ntfs, which failed for the exact reasons described in this thread. The other user was attempting to work around the problem and he tried a couple things. First he changed fstab to this:

Code: Select all

/dev/sda2     /mnt/music   ntfs-3g  rw                     0 0
Which still failed. Finally he just edited the /bin/mount script and removed the -n option discussed in this thread. I think that his solution still requires ntfs-3g be used, but I need to do some testing on my own with an ntfs drive. Ideally I'd like a solution that allows 'auto' to be used in fstab if possible to keep my setup scripts simpler.

I was also wondering what the reason was for suppressing writes to mtab with the -n option - the man page mentions it's for dealing with a read only filesystem, but Puppy is always going to be read/write in some manner with any Pupmode, isn't it?

User avatar
miriam
Posts: 373
Joined: Wed 06 Dec 2006, 23:46
Location: Queensland, Australia
Contact:

a possible solution

#36 Post by miriam »

First, thank you Karl Godt. Your careful examination of so much of this helped me think this through.

I looked at the /bin/mount script. As ldolse mentions, the main culprit is the line that passes the "-n" option to mount-FULL, along with, as Kurt says, ntfs-3g being unable to accept that option. A second problem is created with the attempted solution of detecting "ntfs" in the command line, which doesn't seem to work with fstab.

The purpose of the "-n" option in this case is to suppress writing to mtab because Puppy uses a link to /proc/mounts instead of the normal text file. Why the link instead of the standard text file? I have no idea. Letting mount write to the fake mtab doesn't seem to cause any problems so I removed the "-n" option. (Actually I commented out the line and wrote in a copy of the line without the -n option. This makes it easier to roll back changes if I find I need to.)

I would like all the nice error checking that the "else" part of the script does when it detects mention of ntfs in a commandline mount. I'll try some experiments with checking the filesystem of the device and see if I can get it to work... tomorrow. Right now I'm off to bed. :)
[color=blue]A life! Cool! Where can I download one of those from?[/color]

Post Reply