Peppermint OS Community Forum

Support => Advanced Topics => Topic started by: spence on June 16, 2017, 05:57:15 pm

Title: HPG6 & symlinks... [SOLVED]
Post by: spence on June 16, 2017, 05:57:15 pm
my brain fog is clearing a wee bit, so I am deciding to start my own thread instead of muddying up any further the symlink tutorial... lemme know if you'd prefer i delete my posts from that thread... the last thing you asked me was:

Sorry, What's the output from:
Code: [Select]
ls -l ~/ | grep ">"

and my output is blank... or i'm not comprehending what you want in "v"   :-X
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 16, 2017, 06:06:50 pm
Can you link back to the other topic, because I can't remember why I asked for that output.
Title: Re: HPG6 & symlinks...
Post by: spence on June 16, 2017, 06:17:18 pm
here ya go:
https://forum.peppermintos.com/index.php/topic,1835.msg56894.html#msg56894 (https://forum.peppermintos.com/index.php/topic,1835.msg56894.html#msg56894)
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 16, 2017, 06:19:27 pm
Well if
Code: [Select]
ls -l ~/ | grep ">"
outputs nothingg, you can't have any symlinks in your home folder :-\
Title: Re: HPG6 & symlinks...
Post by: spence on June 16, 2017, 06:38:49 pm
Excellent, then i successfully deleted them...  now to undo the /mnt/mnt/mnt
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 16, 2017, 09:00:04 pm
what's the output from
Code: [Select]
mount
Title: Re: HPG6 & symlinks...
Post by: spence on June 16, 2017, 10:23:25 pm
what's the output from
Code: [Select]
mount

ummmm yikes:
Spoiler (click here to view / hide)
spence@hpG6 ~ $ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1731248k,nr_inodes=432812,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=350864k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=11946)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda5 on /mnt type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
/dev/sda5 on /mnt/mnt type ext4 (rw,noatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=350864k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
[close]
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 17, 2017, 02:42:56 pm
Can we have the contents of your
Code: [Select]
pluma /etc/fstab
Title: Re: HPG6 & symlinks...
Post by: spence on June 19, 2017, 08:14:45 pm
Can we have the contents of your
Code: [Select]
pluma /etc/fstab

Code: [Select]
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=69870d95-e9cd-4e01-823e-1e57c7463c76 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=7739ead9-4767-4af9-9ca3-d499e73f88c5 /boot           ext4    defaults        0       2
# /mnt was on /dev/sda5 during installation
UUID=b486b28d-15cf-477b-a90c-c68b3a58712d /mnt            ext4    defaults        0       2

# DATA partition /dev/sda5 is at /mnt/mnt ...
/dev/sda5   /mnt/mnt   ext4   noatime,defaults   0  0
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 19, 2017, 08:22:58 pm
Okay you can remove:-
Code: [Select]
# DATA partition /dev/sda5 is at /mnt/mnt ...
/dev/sda5   /mnt/mnt   ext4   noatime,defaults   0  0
from fstab .. SAVE and reboot.

But beyond that...

a) I don't know why you have sda5 mounted at /mnt ? .. what's on sda5 ? .. if unsure, what's the output from:
Code: [Select]
ls -a /mnt

and

b) I'm not 100% sure you want to do after undoing your earlier changes ?
Title: Re: HPG6 & symlinks...
Post by: spence on June 19, 2017, 08:36:15 pm
well, i thought i was being all smart by naming it mnt... so now I've edited the fstab, thanks for gentle reminder, to be:
Code: [Select]
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=69870d95-e9cd-4e01-823e-1e57c7463c76 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=7739ead9-4767-4af9-9ca3-d499e73f88c5 /boot           ext4    defaults        0       2

Code: [Select]
spence@hpG6 ~ $ ls -a /mnt
.  ..
spence@hpG6 ~ $

and yes, i did save a backup copy of the previous one...

currently nothing on SDA5 until I figure this out...




Title: Re: HPG6 & symlinks...
Post by: spence on June 19, 2017, 08:44:11 pm
guess I over-edited fstab... as my sda5 now shows as "a device" instead of a mounted partition.... guessing i need to add this back:
Code: [Select]
# /mnt was on /dev/sda5 during installation
UUID=b486b28d-15cf-477b-a90c-c68b3a58712d /mnt            ext4    defaults        0       2
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 19, 2017, 08:47:55 pm
What exactly is sda5 ?
Title: Re: HPG6 & symlinks...
Post by: spence on June 19, 2017, 09:01:19 pm
it was the partition I cleared out to become the symlinked data partition, nothing there currently

more precisely it is currently the entire extended partition under sda3 ... as i ponder playing with other distros too... when my head is cleared and the heat has abated...
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 20, 2017, 08:22:01 am
Okay, so the purpose of this topic is to set up a DATA partition with symlinks right ?

Can you give us your
Code: [Select]
pluma /etc/fstab
contents as it stands now.
Title: Re: HPG6 & symlinks...
Post by: spence on June 23, 2017, 03:41:19 pm
Okay, so the purpose of this topic is to set up a DATA partition with symlinks right ?

correctamundo, to figure this out before updating the rebuilt Antec....

Can you give us your
Code: [Select]
pluma /etc/fstab
contents as it stands now.

Certainly, but I think I need to add a line back in from the fstab-old to make the data partition not appear as a drive like the sd media cards do:

Code: [Select]
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=69870d95-e9cd-4e01-823e-1e57c7463c76 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=7739ead9-4767-4af9-9ca3-d499e73f88c5 /boot           ext4    defaults        0       2

and I think that line would be:

Code: [Select]
# /mnt was on /dev/sda5 during installation
UUID=b486b28d-15cf-477b-a90c-c68b3a58712d /mnt            ext4    defaults        0       2






Title: Re: HPG6 & symlinks...
Post by: spence on June 23, 2017, 03:46:37 pm
My supposition was correct, and now the data partition no longer appears as a "device" in the file manager menu...
although, i'm now pondering if that might be a convenient access point to files on that drive? hmmmmmm  ;) ?
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 24, 2017, 09:41:33 am
Can we have the output from:
Code: [Select]
sudo fdisk -l
and
Code: [Select]
sudo blkid
and can you confirm sda5 is the partition you want to use as the DATA partition ?
Title: Re: HPG6 & symlinks...
Post by: spence on June 25, 2017, 02:36:56 pm
Can we have the output from:
Code: [Select]
sudo fdisk -l

Code: [Select]
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfcff5427

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1  *        2048   2423922   2421875   1.2G 83 Linux
/dev/sda2        2424832  20883455  18458624   8.8G 83 Linux
/dev/sda3       20885502 468860927 447975426 213.6G  5 Extended
/dev/sda5       20885504 468860927 447975424 213.6G 83 Linux

and
Code: [Select]
sudo blkid
and can you confirm sda5 is the partition you want to use as the DATA partition ?

Code: [Select]
/dev/sda1: UUID="7739ead9-4767-4af9-9ca3-d499e73f88c5" TYPE="ext4" PTTYPE="dos" PARTUUID="fcff5427-01"
/dev/sda2: UUID="69870d95-e9cd-4e01-823e-1e57c7463c76" TYPE="ext4" PARTUUID="fcff5427-02"
/dev/sda5: UUID="b486b28d-15cf-477b-a90c-c68b3a58712d" TYPE="ext4" PARTUUID="fcff5427-05"
/dev/mmcblk0: PTUUID="0008fc28" PTTYPE="dos"
/dev/mmcblk0p1: UUID="3AE0ADBC6DA616EA" TYPE="ntfs" PARTUUID="0008fc28-01


sda3 is an extended partition which i intend to further partition to play with other distributions one day... but currently only contains sda5 which will be the data partition. As you've made clear previously creating a home or mnt partition doesn't give me the separation I desire when updating or upgrading peppermint.
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on June 28, 2017, 04:18:23 pm
Okay run:
Code: [Select]
sudo mkdir /mnt/DATA
now run:
Code: [Select]
sudo pluma /etc/fstab
and add these two lines at the bottom:
Code: [Select]
## Added by Spence - Mount /dev/sda5 at /mnt/DATA
UUID=b486b28d-15cf-477b-a90c-c68b3a58712d /mnt/DATA            ext4    defaults        0       0
SAVE the file and exit pluma.

Now run:
Code: [Select]
sudo mount -a
and hopefully there will be no errors.

Confirm that last command didn't throw up an error and we'll continue.
Title: Re: HPG6 & symlinks...
Post by: spence on June 29, 2017, 10:04:35 pm
Sorry for delays... its a busy pool party season here in the Sonoran Desert  8)

Also no errors on the hpG6

Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on July 01, 2017, 12:00:16 pm
Huh :-\

Are you saying that after adding the lines I said to fstab and running "sudo mount -a" you get no error ?

It's the word "Also" that's confusing me .. are we doing this just one PC or two ?
Title: Re: HPG6 & symlinks...
Post by: spence on July 01, 2017, 04:39:08 pm
There were no errors....  8)

I will start a separate thread for the Antec rebuild when the time comes... will have to sort the stupid USB wifi on that machine first.

Title: Re: HPG6 & symlinks...
Post by: spence on July 01, 2017, 05:05:25 pm
now I've got a muckety mucked up pile of file muck.... will add screen shot in a bit...  >:(
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on July 01, 2017, 05:15:01 pm
A what ? :))
Title: Re: HPG6 & symlinks...
Post by: spence on July 02, 2017, 04:59:50 pm
A what ? :))
a blanketey blank muckety muck of a frakking fine file folder mess. Initially thought i was being brilliant by choosing to use the empty mnt folder as my data partition... as opposed to adding a folder called DATA...  on the very unlikely chance this laptop ever was lost or stolen... then theres an embedded folder also called archives... and now one named DATA, none of which i seem to be able to delete...  likely because i used the undeletable folder mnt...

mebbe i should quit trying to be cool while my brain is only partially engaged...   :(https://1drv.ms/i/s!AhWXWykJZPvozTXS1Itp0XeaSKUD (https://1drv.ms/i/s!AhWXWykJZPvozTXS1Itp0XeaSKUD)
Title: Re: HPG6 & symlinks...
Post by: PCNetSpec on July 02, 2017, 07:02:12 pm
Okay that totally messed up my head...

what's the output from:
Code: [Select]
ls -l /mnt
and
Code: [Select]
mount
Title: Re: HPG6 & symlinks...
Post by: spence on July 02, 2017, 07:52:37 pm
Okay that totally messed up my head...

what's the output from:
Code: [Select]
ls -l /mnt

making my damaged head hurt more too...  :-\

Code: [Select]
total 12
drwxr-xr-x 6 root   root   4096 Jul  1 13:34 archives
drwxr-xr-x 2 root   root   4096 Jun 29 19:02 DATA
drwxr-xr-x 2 spence spence 4096 Jun  6 12:58 mnt


and
Code: [Select]
mount

Spoiler (click here to view / hide)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1731244k,nr_inodes=432811,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=350860k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=35,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=342)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda5 on /mnt type ext4 (rw,relatime,data=ordered)
/dev/sda5 on /mnt/archives type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=350860k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/mmcblk0p1 on /media/spence/3AE0ADBC6DA616EA type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
[close]
Title: Re: HPG6 & symlinks...
Post by: spence on July 03, 2017, 12:55:14 pm
so here's what I've tried this morning...
Code: [Select]
spence@hpG6 ~ $ sudo rm mkdir /mnt/archives
[sudo] password for spence:
rm: cannot remove 'mkdir': No such file or directory
rm: cannot remove '/mnt/archives': Is a directory
spence@hpG6 ~ $ sudo rm /mnt/archives
rm: cannot remove '/mnt/archives': Is a directory
spence@hpG6 ~ $ sudo delete ~archives
sudo: delete: command not found
spence@hpG6 ~ $ sudo rm ~archives
rm: cannot remove '~archives': No such file or directory
spence@hpG6 ~ $ sudo rm archives
[sudo] password for spence:
rm: cannot remove 'archives': No such file or directory
spence@hpG6 ~ $ sudo rm -rf archives
spence@hpG6 ~ $ sudo rm -rf mnt
spence@hpG6 ~ $ sudo rm -rf DATA

but thus far the blanketey blank muckety muck of a frakking fine file folder mess remains, then i tried a few other variations I found online...

Code: [Select]
root@hpG6 /mnt/archives/mnt # rm mnt
rm: cannot remove 'mnt': No such file or directory
root@hpG6 /mnt/archives/mnt # cd /mnt/archives
root@hpG6 /mnt/archives # rmdir archives
rmdir: failed to remove 'archives': Device or resource busy
root@hpG6 /mnt/archives # rmdir archives
rmdir: failed to remove 'archives': Device or resource busy
root@hpG6 /mnt/archives #

which I think is telling me I'll have to do this removal from the live usb?

Naa, decided that made no sense... trying a few other things from here but no changes yet https://stackoverflow.com/questions/210120/remove-a-symlink-to-a-directory (https://stackoverflow.com/questions/210120/remove-a-symlink-to-a-directory)




Title: Re: HPG6 & symlinks...
Post by: spence on July 03, 2017, 01:42:20 pm
 :D Found It.... i needed to change permissions... thanks to finding this link...  https://forum.peppermintos.com/index.php/topic,5650.msg56710.html#msg56710 (https://forum.peppermintos.com/index.php/topic,5650.msg56710.html#msg56710)   my concussion damaged brain is re-engaging...   8)