You are not logged in.

#1 2013-02-03 21:40:15

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

systemd transition vfat mount error

i transitioned over to systemd on one of my laptops, and now im running into a problem that i cant seem to solve

on /dev/sda6 its a shared(dual boot) home drive on a vfat partition (ntfs), right after converting to systemd, it fails to mount.

[FAILED] to mount /home
[DEPEND] dependence failed for local file systems.

i ahve no way of copy and pasting fstab but ill type it out here

tempfs /tmp tmpfs nodev,nosuid 0 0
/dev/sda2 /boot ext2 defaults 0 2
/dev/sda4 / ext3 defaults 0 1
/dev/sda5 swap swap defaults 0 0
/dev/sda6 /home vfat defaults 0 2
#note i tried pass 0 also on /dev/sda6

i have installed dosfstools but not sure how to use it

the first error in journalctl -xb regarding this issue is as follows

Mounted /boot.
boot.mount has finished starting up
the start-up result is done
mount: wrong fs type, bad option, bad superblock on /dev/sda6
missing codepage or helper program or other error
home.mount mount process exited, code=exited status-32
FAT-fs (sda6): bogus number of reserved sectors
FAT-fs (sda6): cant find valid FAT filesystem
Failed to mount /home
Unit home.mount has failed

The result is failed.
Dependency failed for Local File Systems
...

I think this "bogus number of reserved sectors" has been there since initial installation about 6 months ago, but since upgrading to systemd, its becoming a fatal problem, whereas before when in initscripts it wasnt an issue. 

I tried runing parted, but couldnt see any problems, and didnt know where to go from there.  It is an MBR type table.
I am able to run my network connection from maintenance mode, and install what i need to.  I was able to get past the maintenance mode and get the system to boot up by running

mount -t ntfs-3g /dev/sda6 /home

but when i do that i get an empty home drive
The funny thing is when i am in  maintenance mode, i can access the home drive no problems.  So it is mounted.

Last edited by wolfdogg (2013-02-03 21:42:44)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#2 2013-02-03 22:33:32

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: systemd transition vfat mount error

I have little experience with NTFS drives under linux, but why do you mount it as vfat instead of ntfs-3g in the fstab? That doesn't seem right.


ᶘ ᵒᴥᵒᶅ

Offline

#3 2013-02-03 22:48:53

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd transition vfat mount error

I'm curious what a failing mount has to do with systemd...

Last edited by falconindy (2013-02-03 22:49:09)

Offline

#4 2013-02-03 22:55:38

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: systemd transition vfat mount error

P.s., you probably also want to check your website for any...problems...


ᶘ ᵒᴥᵒᶅ

Offline

#5 2013-02-04 00:56:31

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

litemotiv wrote:

I have little experience with NTFS drives under linux, but why do you mount it as vfat instead of ntfs-3g in the fstab? That doesn't seem right.

ok, thanks for pointing that you.  It is probably a fat32, and i may have mixed that one up while trying to find tools to repair the file system.  I think i used fat32 since i wanted to make it readable by both windows and linux, and it seemed like the best solution at the time.  If it was fat32, wouldnt it have been a vfat in that case?  If so, then thats probably what it was. 

falconindy wrote:

I'm curious what a failing mount has to do with systemd...

auto mounting falls into systemd's management now i gather

litemotiv wrote:

P.s., you probably also want to check your website for any...problems...

What website are you referring to?

So, i made a new directory on root,
copied the entire home dir there,
use parted to remove the partition,
commented out fstab /dev/sda6
rebooted and now its booting normal to the arch login screen. 

so, now that i can move forward, those files that i copied, im guessing since they were created from the linux system on the dos type partition fielsystem (wether it be ntfs, or fat) didnt have any windows type attributes tied to them, given this, i copied them over to the new folder on root, and im assuming all i need to do is create a ntfs-3g partition on that space now and copy them back and im good. 

does this sound right assuming i want to stay with the dual boot arcitecture for now accessible by both windows and linux?    (funny, the windows7 installation is in a non working state because its boot partition got overwritten when i installed the dual boot linux on it anyhow, bwahh hah, but i want to keep it future compatible so i need a filesystem accesible by both)
Do i need to worry about the partition being created on the wrong starting sector AGAIN?
what partition program should i use for this?

Last edited by wolfdogg (2013-02-04 01:00:16)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#6 2013-02-04 01:19:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: systemd transition vfat mount error

wolfdogg wrote:
litemotiv wrote:

P.s., you probably also want to check your website for any...problems...

What website are you referring to?

The hacked one linked to from your profile...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-02-04 01:37:50

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

@litemotiv, jasonwryan,
well i give them props for accomplishing that, but since i have net seen this yet, it would appear that the culprit is nigh. Who is going to put that shitty music on my site?
So looks like somebody jumped through singapore using 175.140.88.175 and uploaded a shell through the shared hosting. what do i have to do, upgrade my isp to a static ip so i can host my own?   
Thanks for pointing that out, looks like it happened about 22 hrs ago.


regarding this topic;
so i installed ntfsprogs, used parted to create the partition then make a mkfs.ntfs on it, ill copy the files back next and see how it goes.

Last edited by wolfdogg (2013-02-04 02:23:52)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#8 2013-02-06 05:16:08

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

well, it was going well, until i tried to set permissions.  i have a multi user system and wanted to use ntfs as the home dir drive on this system to have a cool dual boot setup.  but i need to chown the files i copied back over to each user, of course i cant do that currntly.
What i need is a standard functioning home directory that this drive is mounted to.    So each user needs their own permissions, and write privs of course.   
i was considering setting it up in fstab like this

/dev/sda6       /home           ntfs-3g gid=users,dmask=022,fmask=133   0       0

I also thought of mounting it to /mnt/sda6, then
mounting /mnt/sda6/user1 to /home/user1
and so forth... Kind of a cascaded mount.  its only about 3-4 users in total, so not that much work if i can get steered in the right direction.
but im not quite sure that will work properly. 

Can someone pass some advice?  im not as interested to hear that its not the best way, but if it cant be done then thats another issue.

hmm.. this is interesting http://www.tuxera.com/community/ntfs-3g … r-mapping/

Last edited by wolfdogg (2013-02-06 06:16:11)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#9 2013-02-06 07:42:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: systemd transition vfat mount error

NTFS doesn't support UNIX file permissions (although you can force-set a sweeping permission set at mount time). I strongly recommend that you don't use it for /home.

What I do is have a NTFS partition that I use for documents et al, and bind the respective directories in my home area.

wormzy@sakura[pts/3]~$ grep "bind\|ntfs" /etc/fstab
UUID=3202F2060A266E0F                     /media/Terastore                         ntfs-3g auto,uid=1000,gid=100,umask=027             0 0
/media/Terastore/WorMzy/Collection/       /home/wormzy/Collection                  none    bind                                        0 0
/media/Terastore/WorMzy/Pictures/         /home/wormzy/Pictures                    none    bind                                        0 0
/media/Terastore/WorMzy/Documents/        /home/wormzy/Documents                   none    bind                                        0 0
/media/Terastore/WorMzy/Downloads/        /home/wormzy/Downloads                   none    bind                                        0 0

And it works fine for a single-user (me). All my documents are accessible from Arch and Windows, but my home area itself is a on a btrfs partition, so my dotfiles and everything have the right permissions set.

If I wanted to set this up for a system with multiple users where privacy needed to be enforced, I'd mount the ntfs partition without uid/gid, and set umask to 777, then I'd use bindfs to bind the respective directories onto their user's corresponding home directories with their permissions.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#10 2013-02-07 06:31:10

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

this was great info, thanks for that.  it really looked promising to me, and it led me to trying things i have not tried before, and taught me a few new things. However, no matter what i try i cant get the users home directories mounted properly on ntfs.  Its probably over the top for me to reach into the AUR and and add another program to solve a problem that's getting over complicating to solve what deceivingly seems to be a rather simple issue.  so i tried your examples of fstab every other way without bind, i even installed what i thought was bindfs, under the name 'bind', all i got to say for that is oops, it installed (Berkeley Internet Name Domain).  As far as the taboo of mounting users homes to ntfs, i am able to reconfigure my system at anytime after i achieve this, but for right now i would rather go through the pains of mounting the user directories residing on sda6 than i would to reformat the drive to another file system type that wont be accessible to windows.  this is mainly for a learning experience, to try it on for size, and to realize for myself why i would or would not want this in the next build. 

in the mean time,  what i tried hasn't work, i have only been able to use the ntfs file system as root, and not able to alter the permissions at that.  looking at my fstab below you can see what i am trying to accomplish, the 'miker' entry has dmask and fmask entries from a root test just to see what it will yield, so ignore that one, but the last 2 entries of users are the way i would like it to be.  can i accomplish this using fstab without having to install bindfs through the AUR?

#
# /etc/fstab: static file system information
#
# <file system> <dir>           <type>  <options>                               <dump>  <pass>
tmpfs           /tmp            tmpfs   nodev,nosuid                            0       0
/dev/sda2       /boot           ext2    defaults                                0       2
/dev/sda4       /               ext3    defaults                                0       1
/dev/sda5       swap            swap    defaults                                0       0
/dev/cdrom      /mnt/dvd        iso9660 ro,user,noauto,unhide,iocharset=utf8    0       0
#/dev/sda6      /home           ntfs-3g agid=users,dmask=022,fmask=133          0       0
/dev/sda6       /mnt/ntfs       ntfs-3g auto,dmask=022,fmask=133                0       0
#/mnt/ntfs/miker                /home/miker     ntfs-3g auto,uid,1002,gid=users,dmask=022,fmask=133     0       0
/mnt/ntfs/liaml /home/liaml     ntfs-3g auto,uid=1002,gid=users,umask=027       0       0
/mnt/ntfs/ellal /home/ellal     ntfs-3g auto,uid=1001,gid=users,umask=027       0       0

as you can see, the fstab wont work because /mnt/ntfs isnt a block device, but its just where i gave up and am asking for more ideas...

Last edited by wolfdogg (2013-02-07 06:40:21)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#11 2013-02-07 07:08:02

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

.

Last edited by wolfdogg (2013-02-07 07:12:31)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#12 2013-02-07 07:24:17

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: systemd transition vfat mount error

Bindfs is in the AUR: https://aur.archlinux.org/packages/bindfs/

I think that something like the following would work:

/dev/sda6       /mnt/ntfs       ntfs-3g auto,umask=777                0       0
bindfs#/mnt/ntfs /home/liaml fuse owner=liaml,group=users,perms=0700 0 0

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#13 2013-02-07 16:12:33

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

so, so your thinking that the only way to mount the entire block device and mount multiple directories to multiple users is to use bindfs to mirror the mounts?  When i come home from work today i will try this, unless, Is there a solution without using bindfs by just placing separate entries in fstab with various options for owner and mask settings?


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#14 2013-02-07 16:28:35

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: systemd transition vfat mount error

No you can only mount ntfs partitions on one mount point at a time. Binding is the only way around this that I know of, but the regular bind option doesn't allow you to change the permissions of the bound directory. I believe bindfs was developed to overcome this limitation, but don't quote me on that. All I know is that it's worked for me in the past, in a similar situation.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#15 2013-03-18 22:16:54

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: systemd transition vfat mount error

yeah, gave up on it, there was NO apparent solution, wasted too much time getting it to NOT work.  went back to ext3  :-)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

Board footer

Powered by FluxBB