Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: I can't figure out how to do something

  1. #1
    Join Date
    Sep 2007
    Beans
    1,562

    I can't figure out how to do something

    I am running with Rhythmbox Audio Player. I gave up on trying to get this to open my list of music to play. So, I wonder if it is possible to sertup a little command line so that, when I start my machine, it will open my music folder. If I can do that then Rhythmbox will immediately see it and its done. Right now I just goto the drive its on and open it myself but I am lazy.

    Just thought I would ask - thank you............
    Memory: 16gb
    Processor: Intel® Core™ i7-2600 CPU
    Graphics: NVC1
    OS: Ubuntu 22.04.3 Gnome: 42.9

  2. #2
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: I can't figure out how to do something

    Just to be clear. You have your music folder on another drive/partition? If that is true, then you need to automount the drive/partition. This link explains how to edit /etc/fstab

    https://help.ubuntu.com/community/Fstab

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  3. #3
    Join Date
    Sep 2007
    Beans
    1,562

    Re: I can't figure out how to do something

    Wow! I was just getting ready to change my question and mention that my file is on another drive but, I think, you have found the solution. I am going to give it a try!

    Thanks again! Will get back and report whether I succeeded or failed.
    Memory: 16gb
    Processor: Intel® Core™ i7-2600 CPU
    Graphics: NVC1
    OS: Ubuntu 22.04.3 Gnome: 42.9

  4. #4
    Join Date
    Sep 2007
    Beans
    1,562

    Re: I can't figure out how to do something

    Since I am a coward I thought I had better ask I am a question.

    Here is my existing fstab as is:
    HTML Code:
    # /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=704193d7-3858-4289-9e3f-800b76c30957 /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/sda1 during installation
    UUID=88E5-D686  /boot/efi       vfat    umask=0077      0       1
    /swapfile                                 none            swap    sw              0       0
    Here is my fstab line to install: 9354305b-3831-4a1e-ac38-52fac40a1d4 /media/greg/misc/my_music ext4 ro 0 1

    I am not sure about the ro for option - will it freeze the whole folder so that it cannot be changed by something else later? Should it be nouser which, I think, means only changes with sudo? Just asking.......

    I think all I have to do now is to sudo gedit fstab and enter my line and save the file? Then I'm done? (assuming my line is correct and I am where fstab resides when I do it)

    Thank you!
    Last edited by jgw; August 1st, 2024 at 08:57 PM.
    Memory: 16gb
    Processor: Intel® Core™ i7-2600 CPU
    Graphics: NVC1
    OS: Ubuntu 22.04.3 Gnome: 42.9

  5. #5
    Join Date
    Dec 2014
    Beans
    2,691

    Re: I can't figure out how to do something

    Setting the file system to 'read only' on mount will not allow any writing, not even by root. You'd have to re-mount the file system to be able to write to it. The options used when mounting through udisks2 (which is what happens when you open the file system in your file manager or when auto-mounting after plugging a device in) are 'rw,nosuid,nodev,relatime,errors=remount-ro'. And I wouldn't use 'sudo gedit ...' for editing files, I'd use 'sudoedit' or 'sudo -e' with an appropriately set EDITOR variable, e.g. 'EDITOR=/usr/bin/gedit sudoedit /etc/fstab'. The advantage of this is that you're not running the editor with elevated privileges; sudoedit makes a copy owned by your account of the file, runs your chosen editor on that copy, and if the file was changed copies the changed file.

    Holger

  6. #6
    Join Date
    Sep 2007
    Beans
    1,562

    Re: I can't figure out how to do something

    I did it. My machine will no longer boot up. I have attached a picture of what I get when I try to boot. Continuing from this gets a few other things, but basically this is the end of the boot. I really screwed the goose on this one. I suspect that what I should actually do is take the 1 tb sdd, which is the main drive, out of the machine, edit and find fstab, and remove the line I inserted. Put the sdd back into the computer and see if it boots. If it does boot I then figure to either try again or just give up.

    This is embarrassing. I REALLY screwed up!!

    Thoughts?
    Attached Images Attached Images
    Memory: 16gb
    Processor: Intel® Core™ i7-2600 CPU
    Graphics: NVC1
    OS: Ubuntu 22.04.3 Gnome: 42.9

  7. #7
    #&thj^% is offline I Ubuntu, Therefore, I Am
    Join Date
    Aug 2016
    Beans
    Hidden!

    Re: I can't figure out how to do something

    Will it get to grub if you use (Control +D)
    If not your going to have to fix fstab or remove the lines you added.

    EDIT: when I play around in fstab, I'll make a back-up first
    Code:
    sudo cp -a /etc/fstab /etc/fstab.bk
    Always check with:
    Code:
    cd /etc && ls -la|grep fstab.bk
    -rw-r--r--   1 root root     524 Aug  1 13:26 fstab.bk
    And I still have my original as seen with:
    Code:
    nano /etc/fstab.bk
    Last edited by #&thj^%; August 2nd, 2024 at 07:00 PM.

  8. #8
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,815

    Re: I can't figure out how to do something

    Boot with install media to desktop, mount the buggered disk, edit fstab and reboot without install media

  9. #9
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,846

    Re: I can't figure out how to do something

    Important: The mount point has to already exist when you mount with fstab.

    Other tips:

    Label the file system you are mounting. Then you can write the fstab entry without any uuid.
    For the 'options' field, just use 'defaults'

    I like to mount my external data partitions on a subdirectory of /mnt By doing that, any snap application can access those files too.

    As an example, here is the mount line for my data files, which exist on another disk partition. The file system I am mounting was labeled "Common-Files" beforehand. The mount point has the same name, but it doesn't have to.

    Code:
    # mount the data LV
    LABEL=Common-Files /mnt/Common-Files ext4 defaults 0 2
    The utility e2label will label an ext4 file system. Example:
    Code:
    sudo e2label /dev/sda6 Common-Files

  10. #10
    Join Date
    Jun 2014
    Beans
    7,682

    Re: I can't figure out how to do something

    9354305b-3831-4a1e-ac38-52fac40a1d4 /media/greg/misc/my_music ext4 ro 0 1
    You did put UUID= at the beginning of that line, correct. And as mentioned the directories music/my_music must already exist under /medi/greg. You might add a comment line above the entry so you know what its purpose is, similar to the lines above the entries for the / and /boot/efi partitions.i

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •