LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 04-30-2024, 09:04 AM   #1
VarstrayPl
LQ Newbie
 
Registered: Aug 2020
Posts: 8

Rep: Reputation: Disabled
Make Windows Partitions Root-Writeable without Re-running install Disk


So, I re-installed Slackware 15.0 for the umpteenth time, configured everything to my liking, but accidentally forgot to select the "Make Windows Partitions Writeable by Root" option when the installer was configuring access settings for detected Windows filesystems. Instead, the default option of "Not Writeable Ever" was selected.

Does anyone know what the installer disk actually does when configuring Slackware to allow Root to write to my detected windows filesystems? If I absolutely have to, I guess I can run the installer again, but I'm curious if there is some basic shell command or config files in /etc/* that I can just edit. It would also be nice to actually learn how to do it without the installer to increase my general system knowledge, as well.

Thank you very much for your time!
 
Old 04-30-2024, 01:51 PM   #2
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 593

Rep: Reputation: Disabled
There's no setup script in your Slackware installation which could repair your omission, but you can see how it's originally done when you peek inside the Slackware installer.
The only difference is the value you assign to dmask and fmask: https://git.slackware.nl/current/tre...DOS?h=15.0#n25
You can change the NTFS access behaviour on your computer by editing etc/fstab using the appropriate values obtained from the script I linked to.
 
Old 04-30-2024, 04:20 PM   #3
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 779

Rep: Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891
I've got a machine that dual boots Slackware and Windows 10 so I can show the steps on this machine.

First you need to identify which device and partition is used by Windows. You can use 'lsblk --fs' for this, e.g:
Code:
# lsblk --fs
NAME        FSTYPE FSVER LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                    
|-sda1                                                                                 
`-sda2      ntfs         Data      202662B626628D1A                                    
sdb                                                                                    
|-sdb1      vfat   FAT32           A109-5E2F                             473.2M     5% /boot/efi
|-sdb2      swap   1               7ede5871-5e34-41ec-bcdc-d51102a89820                [SWAP]
`-sdb3      ext4   1.0             693d27b0-7c59-4291-a478-2a6f5d0c7a85   32.6G    79% /
sdc                                                                                    
`-sdc1      ext4   1.0             b7c779dc-f300-485d-8478-26d936a5a0cf  659.8G    23% /mnt/storage
nvme0n1                                                                                
|-nvme0n1p1 vfat   FAT32 SYSTEM    A25D-26C4                                           
|-nvme0n1p2                                                                            
|-nvme0n1p3 ntfs         Windows   9E6C5FE26C5FB42D                                    
`-nvme0n1p4 ntfs         WinRE_DRV 2AA4602FA45FFBA7
Note that I have 4 disks total. Two are for windows (sda is just data, nvme0n1 holds the windows 10 installation), the other two are my slackware disks. The windows partition is /dev/nvme0n1p3. You will have to do something similar and identify which disk and partition your windows installation resides on since your setup will be different.

Next we need a mount point. You can pick whatever point you want. I'm going to use '/mnt/windows', e.g:
Code:
# mkdir /mnt/windows
Now you need an fstab entry to mount this partition automatically at boot. This is what that install script sets up for you, but it's not hard to figure out if you read 'man fstab' and 'man mount'. I came up with the following line in my '/etc/fstab':
Code:
/dev/nvme0n1p3   /mnt/windows    ntfs       auto,umask=022        0   0
Read 'man fstab' for the details on what each field is used for above, but the gist of it is I'm mounting /dev/nvme0n1p3 at my /mnt/windows mount point. That partition has a filesystem type of ntfs, and I'm using 'auto' so it mounts automatically at boot time, and umask=022, which gives the root account full read/write access, and regular users read only access. I'm not planning on running fsck on this partition, so I left the last field at 0.

Note that in the setup script that Windu linked, the options are set as "fmask=133,dmask=022", etc. While this works as well from my testing, 'man mount' only talks about using umask for mounting ntfs types, and fmask/dmask for fat types. You can try those if you want, or just copy the value from dmask to set your umask.

Side note: It'll be better/more consistent to use a filesystem label or uuid for mounting, instead of the device node, since that can change if you alter the disk setup in the machine. I'm keeping this example simple and just used the device node.

Other note: This change takes effect at next reboot, or run 'mount -a' to mount all 'auto' flagged filesystems from fstab on an already running system (auto is the default, so its technically not necessary, but I use a mix of 'auto' and 'noauto' in my fstab anyways to keep track of things).

HTH

Edit:

The post as I have written above defaults to using the ntfs-3g fuse driver for mounting the ntfs partition from windows.

If you wanted to use the ntfs3 kernel driver instead (in kernels 5.15.x and up), then you can use a line like so in '/etc/fstab':
Code:
/dev/nvme0n1p3   /mnt/windows    ntfs3       auto,force,umask=022        0   0
Note: I had to add 'force' as an option, else I got errors about "bad superblock" or "missing codepage". Apparently this is because that filesystem is marked dirty and the ntfs3 driver will not mount unless forced. I should fix it but I only load windows once in a blue moon and have been skipping fixing the disk for a while now...

Last edited by 0XBF; 04-30-2024 at 05:55 PM. Reason: Added other note, and details on ntfs drivers
 
2 members found this post helpful.
Old 05-02-2024, 07:08 PM   #4
VarstrayPl
LQ Newbie
 
Registered: Aug 2020
Posts: 8

Original Poster
Rep: Reputation: Disabled
OXBF and Windu! Thank you very much! I have followed these instructions, and my system now works perfectly. I can access my windows drives again!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A readonly rootfs with a writeable overlay...without an initramfs marler8997 LinuxQuestions.org Member Success Stories 4 04-22-2020 05:57 AM
[SOLVED] ufw status world writeable group writeable masuch Linux - Security 2 02-28-2012 10:31 AM
Create Read-only directory in writeable filesystem (without using chmod)? MarkA Linux - Software 2 08-15-2008 03:38 AM
Major problems with new install. Making the disk writeable?? riwaJR Slackware 4 02-11-2007 11:52 AM
world writeable files will not stay world writeable antken Mandriva 1 03-02-2004 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 12:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration