symlink persist follow-up

Grizzly Real_Grizz_Adams at yahoo.co.uk
Sat Sep 23 22:24:26 UTC 2023


Saturday, September 23, 2023  at 13:13, Keith wrote:
Re: symlink persist follow-up (at least in part)

>On 9/23/23 1:24 AM, Grizzly via ubuntu-users wrote:
>> Friday, September 22, 2023  at 17:45, Keith wrote:
>> Re: symlink persist follow-up (at least in part)
 
>>> On 9/22/23 9:14 AM, Grizzly via ubuntu-users wrote:
>>> [snip]
   
>>>> the 22.04 drive is set to auto mount at system start & show on launcher
 
>>> I don't believe the 22.04 partition is being automounted. The dock
>>> (launcher) is configured to show user-visible volumes including
>>> non-mounted ones. When you click on the 22.04 drive icon on the dock,
>>> the partition is mounted and suddenly the symlink isn't broken and you
>>> can browse the images in the 22.04 Pictures directory.
   
>>>> is there a step I missed or a way to get that drive "seen" at boot so the link
>>>> will work
 
>>> I saw in a previous post you stated that you have 3 OS's on the
>>> following partitions:
 
>>> 22.04=sda1
 
Correction Jammy
>> Lunar
>> Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
>> /dev/sda1     2048      4095      2048     1M Linux filesystem
>> /dev/sda2     4096   1054719   1050624   513M EFI System
>> /dev/sda3  1054720 976771071 975716352 465.3G Linux filesystem
 
>>> Win7=sda2
 
>> Win7
>> Disk /dev/sdb: 335.35 GiB, 360080695296 bytes, 703282608 sectors
>> /dev/sdb1  *     2048 703279103 703277056 335.3G  7 HPFS/NTFS/exFAT
 
>>> 23.10=sda3
 
>> Mantic
>> Disk /dev/sdc: 465.76 GiB, 500107862016 bytes, 976773168 sectors
>> /dev/sdc1     2048      4095      2048     1M BIOS boot
>> /dev/sdc2     4096   1054719   1050624   513M EFI System
>> /dev/sdc3  1054720 976771071 975716352 465.3G Linux filesystem

>Did you leave off listing any swap partitions from the Ubuntu disks or 
>is it on a separate disk? Or are you using swapfiles, or zram for swap 
>space? Not that its germane to this issue, but its relevant to questions 
>about fstab.
 
>>> Is this still correct?

Somewhere along te way swap (at least from 23.10) seems gone, I could install 
gparted to check, disks didn't show it (I'm on an old windows box at the 
moment) 
 
>> If that was written it was a typo, each OS is on it's own drive (see above for
>> detail) sdx changes, sometimes the Win7 disk is just not there (usually after a
>> few reboots)

>Well, I got the information from this post

>https://lists.ubuntu.com/archives/ubuntu-users/2023-September/311184.html

>   "It is on a different drive, 22.04=sda1, Win7=sda2, 23.10=sda3

>   >and just mount it (when you boot 'something else'?)  That's how it's
>   >typically done, instead of using links.

>   sda1, sda2 & sda3 all mount at boot, grub is on sda1, as is the dirs I
>   want to link (or anything that lets me have just one Pictures dir)"

>That's a little more than just a typo  :/

yes I got it wrong, (but I did say on a different drive) brain (and rest of me) 
was obviously in windows mode where drives have numbers, Disk1, Disk2, Disk3 
and partitions have letters C, D, E
of cause it's the other way round on my Ubuntu boxes
 
>>> If so, then boot into 23.10 and run the following
>>> in a terminal:
 
>>> $ udisksctl info -b /dev/sda1 |egrep Hint"(Auto|System)"
>>> HintAuto:                   false
>>> HintSystem:                 true
 
>>> Did you get the the output above?  If not, post what you got.
 
>> Assuming the cmdline was based on the (maybe) typo I ran it for each drive
 
>> kenya at Cludia:~$ udisksctl info -b /dev/sda|egrep Hint"(Auto|System)"
>>      HintAuto:                   false
>>      HintSystem:                 true
>> kenya at Cludia:~$ udisksctl info -b /dev/sdb|egrep Hint"(Auto|System)"
>>      HintAuto:                   false
>>      HintSystem:                 true
>> kenya at Cludia:~$ udisksctl info -b /dev/sdc|egrep Hint"(Auto|System)"
>>      HintAuto:                   true
>>      HintSystem:                 false

>The /dev/sdc is puzzling. If you're booting off of it into 23.10, it 
>should be regarded as a system volume and the HintAuto property set to 
>false. Were you running 23.10 when you issued the udisksctl command? 
>It's not a removable drive, is it?

Boot and grub are on 22.04 drive,  

 etc/default/grub

has

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

so once I choose one grub option it will boot that way "until" I choose another 
option,  

when I upgraded to 23.10 it didn't show on grub, because I was updating the 
wrong grub until I choose 22.04 (or as the grub showed it just "Ubuntu")

>>> If you did get the above output, then create a udev rules file called
>>> 10-automount-sda1.rules (for example) and place it in /etc/udev/rules.d/
>>> . In the file put this following line:
 
>>> KERNEL=="sda1", ENV{UDISKS_AUTO}="1"

>Well, if the disk information you provided from above is now correct, 
>sda1 in the file should be changed to sda3 since that is where the / 
>filesystem of 22.04 lives. However, as noted below if you are going to 
>modify 23.10's /etc/fstab to mount /dev/sda3 (22.04), then you don't 
>need to create the above udev rule.
 
>>> NOTE: *This modification is only applicable for 23.10. Do not make this
>>> change while booted into 22.04.*
 
>>> Reboot (into 23.10) and upon login to gnome, the 22.04 partition should
>>> be automounted without needing to click the 22.04 drive icon on the dock.

that worked, it is mounted now, still have to reset wallpaper every time (so 
far) though, Pictures is populated, I do have an entry in user-dirs.dirs 
pointing to it
 
>> Unity login
 
>>> I use this method to automount an exfat partition that's on my main
>>> system drive along with 22.04.3 Ubuntu and Win10 to share data between
>>> the OS's.
 
>>> Volumes with the HintSystem=true will by default have HintAuto=false and
>>> thus not automountable by gnome (udisks) unless you override the
>>> HintAuto property either via /etc/fstab, or some automounter daemon, or
>>> via a udev rule like the one above.
 
>> what "should" fstab for that drive look like? I did use disks to set it
>> automount but ...

>Just post both /etc/fstab's from 22.04(?) and 23.10 and the list can 
>take a look at them.

fstab from Mantic 

/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>
# /boot/efi was on /dev/sda2 during installation
UUID=92F5-3DEA  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
UUID=c8264b8d-5caa-4515-b44b-a7c9c78f536a / ext4 errors=remount-ro,x-gvfs-show,x-gvfs-name=Jammy 0 1

fstab from Jammy
# /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/sda3 during installation
UUID=c8264b8d-5caa-4515-b44b-a7c9c78f536a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=92F5-3DEA  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

>BTW, Jammy Jellyfish is 22.04. Lunar Lobster is 23.04. check 
>/etc/issue or /etc/os-release, or "lsb_release -a" to find out what 
>version you're running when booted into the older Ubuntu release. (the 
>one on /dev/sda3).

it is 22.04.3 LTS, Jammy, 
 




More information about the ubuntu-users mailing list