AV Linux MX-21 Edition RC1 for Testing uploaded

Help on all MX Re-spins
Message
Author
SwampRabbit
Posts: 3602
Joined: Tue Jun 14, 2016 2:02 pm

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#11 Post by SwampRabbit »

@AVLinux forgive my ignorance about not knowing why all drives should be mounted at boot as a default...

But could the updated disk-manager in development testing right now be an option to allow users to mount drives as they choose?
NEW USERS START HERE FAQS, MX Manual, and How to Break Your System - Don't use Ubuntu PPAs! Always post your Quick System Info (QSI) when asking for help.

User avatar
AVLinux
Posts: 2007
Joined: Wed Jul 15, 2020 1:15 am

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#12 Post by AVLinux »

SwampRabbit wrote: Thu Dec 23, 2021 1:02 pm @AVLinux forgive my ignorance about not knowing why all drives should be mounted at boot as a default...

But could the updated disk-manager in development testing right now be an option to allow users to mount drives as they choose?
It's a very valid question actually..

My feeling is if you are going to try an OS to work with Audio and Video files and you can't access the files to try and test then it's kind of offputting, It's not like an MX ISO (or many Live Distros especially 'Rescue' products) doesn't make it possible to mount them and access the data either, it just takes a couple of User interventions to get there. The automount feature is a resurrection from when AVL was based on Debian, I just hadn't gotten it organized with MX until now, I'm still waffling on if it should be switched on or not by default... my gut feeling now is probably not...
Last edited by AVLinux on Thu Dec 23, 2021 1:27 pm, edited 1 time in total.

User avatar
AVLinux
Posts: 2007
Joined: Wed Jul 15, 2020 1:15 am

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#13 Post by AVLinux »

pianokeyjoe wrote: Thu Dec 23, 2021 12:54 pm @AVLinux great to see this is finally taking off and we have a RC1 to play with! I wanted to know on that mount all drives script, is that script contents that you posted here, IN rc.local in /etc/rc.local? Or is it POINTED to, by rc.local somehow? I wanted to use the script for my embedded versions of MX and AVL-MXE so that when I boot into the live embedded sessions, ALL partitions mount automatically without me having to point,click,mount or type a password. Most of my embedded projects would only have a touchscreen as the input device for playing mp3 and mp4 files in VLC.Audacious,etc. For AVL-MXE it is especially important since the working or record drive has to be mounted automatically for the daws to find it where it last recorded when I start them up. I ask this because I am still using the previous version of AVL-MXE and MX19.3 for my projects and want to adapt that mount all drives script at boot. For the MX21AHS build of AVL-MXE, will I still be able to remove packages and themes at will and respin with MX-SNAPSHOT as needed? Or has that feature been removed?
The script itself is placed in /usr/bin/ and is pointed to by /etc/rc.local

Yes indeed, you can install and remove whatever you want and use MX-Snapshot to your hearts content, the only difference is on my end and how I build the initial ISO's. Running Live and installing will work like MX always has.

Steve
Posts: 143
Joined: Wed Nov 24, 2021 9:08 pm

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#14 Post by Steve »

@SwampRabbit
“It "should" not, although every system is different, and "may" have issues with versions of packages in AHS.
In these circumstances, things need tested, troubleshot, and worked out on a case by case basis.

That being said, MX KDE is also based on AHS, and we have lots of people using MX KDE on hardware much older than yours.“

Yes there seems to be no issues but me. :alien:

@AVLinux
The only “bug” I have found was with the live cd running ardour wanted to open a template that was not there and it closes. Tell it to open a file and point it to the folder and it will run.

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#15 Post by fehlix »

AVLinux wrote: Thu Dec 23, 2021 11:36 am the 'mountalldrives' script ..

Code: Select all

#!/bin/bash
### BEGIN INIT INFO
# Provides:          mountalldrives
# Required-Start:    checkfs
# Required-Stop: 
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount all filesystems.
# Description:
### END INIT INFO

for disk in `cat /proc/partitions | awk '{print $4}' | grep "[0-9]" | grep -v "sr0"`; do

SIZE="`cat /proc/partitions | grep $disk | awk '{print $3}' | grep "[0-9]"`"

if [ "$SIZE" != "1" ]; then

testmount=`mount | grep $disk`
if [ "$testmount" = "" ]; then
BLKID=`blkid /dev/$disk`
export `echo $BLKID | sed -e "s~/dev/$disk: ~~g" | sed -e 's/"//g' `

if [ "$LABEL" = "" ]; then
LABEL="$disk"
fi

if [ "$TYPE" = "ntfs" ]; then
TYPE="ntfs-3g"
fi

if [ "$TYPE" = "swap" ]; then
echo
else
echo "Mounting $TYPE partition $LABEL on /media/$LABEL" 
if [ ! -d /media/$LABEL ]; then
mkdir -p /media/$LABEL
chmod 777 /media/$LABEL
fi
if [ "$TYPE" = "vfat" ]; then
mount /dev/$disk /media/$LABEL -t $TYPE -o rw,nosuid,umask=0
chmod 777 /media/$LABEL
else
mount /dev/$disk /media/$LABEL -t $TYPE -o rw,nosuid
chmod 777 /media/$LABEL
fi
fi
fi
LABEL=""
TYPE=""
fi

done 

I may see some "small" issues within the mountalldrive script:

* labels can have spaces, so the first "export" line would fail for partionlables with spaces as quoting is removed.
Having fixed that $LABEL would need to quote as "$LABEL" within the following commands, which otherwise may fail

* nvme and mmcblk devices do not have numbers within the partition name only, but also within the device name, so there would be some issues as the script might try to mount the device itself not only partitions.

* chmod 777 on the mounted partition will change permissions of "/"-root of the file system to world writable and this would be sticky e.g for ext4 partitions. Which means after having run AVL-MXE LiveISO/USB all ext4 partitions would be world writable on the "/"-level. So normal user could accidentally remove any system relevant symlinks like /lib /sbin /bin and by this would make the corresponding system potentially break.

Actually I have not yet downloaded the iso to further run some tests ... later ... :snail:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
AVLinux
Posts: 2007
Joined: Wed Jul 15, 2020 1:15 am

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#16 Post by AVLinux »

OK,

I think I'd better switch that feature off and upload an RC2 this evening... :frown:

User avatar
sunrat
Posts: 636
Joined: Mon Mar 28, 2016 9:54 pm

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#17 Post by sunrat »

Sorry just another question, maybe naive, but why does the 'mountalldrives' script chmod the mount directory twice? Mounting the drive should not change the permissions of the mount directory, so unnecessary. The second chmod doesn't have -R for recursive so would it actually change permissions of the contents as you suggested above @fehlix ?

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#18 Post by fehlix »

sunrat wrote: Thu Dec 23, 2021 7:03 pm Sorry just another question, maybe naive, but why does the 'mountalldrives' script chmod the mount directory twice? Mounting the drive should not change the permissions of the mount directory, so unnecessary. The second chmod doesn't have -R for recursive so would it actually change permissions of the contents as you suggested above @fehlix ?
The first chmod just before mount is not needed b/c after mount the permissions of the mountpoint are not visible anymore.
The chmod 777 after mount will change the permissions of the mounted "/" root directory with the filesystem of the partition.
After removing the LiveUSB and boot normaly any normal user even without sudo or root access, can remove files within that "/" root directory, b/c permission 777 give full write access within the top "/" directory, which includes remove files and symlinks within "/". So a user, which supposed to have no critical permissions can break the system, e.g by removing all symlinks within "/".
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
AVLinux
Posts: 2007
Joined: Wed Jul 15, 2020 1:15 am

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#19 Post by AVLinux »

@sunrat @fehlix

Thanks for the clarification, RC2 has now uploaded and has this feature turned off, I guess it's one of those goodies I'll just keep for my own uses..

RobertJohn
Posts: 6
Joined: Tue Oct 06, 2020 7:57 am

Re: AV Linux MX-21 Edition RC1 for Testing uploaded

#20 Post by RobertJohn »

Great News The Best Christmas Present under the Tree this year.
Thanks for your dedication and Hard work on this.

Cheers

Post Reply

Return to “MX Respins”