AudioPhile Linux
  • Email
  • Google+
  • Linkedin
  • Twitter
Follow us on Twitter @AudiophileLinux
  • Home
  • News
  • Documentation
  • Screenshots
  • Download
  • Articles
  • About
  • FAQ
Navigation
Search the site...

How to add new disk in AP-Linux

April 20, 2017 / Marko / Documentation
22
  1. Add disk to your PC
  2. Open terminal and become root with “su” command
  3. Find the name of your new disk with “fdisk -l” command
  4. Let’s suppose that your new disk has name /dev/sdb
  5. Create one partition with “fdisk /dev/sdb” or “cfdisk /dev/sdb”
  6. Create file system on that partition with “mkfs.ext4 /dev/sdb1”
  7. Create directory “mkdir /ssd-disk1”
  8. Make you owner of that directory “chown your-username:your-username /ssd-disk1”
  9. Automount – Edit /etc/fstab with “nano /etc/fstab”
  10. Add this line at the end of /etc/fstab
  11. /dev/sdb1 /ssd-disk1 ext4 rw,noatime,discard,data=ordered 0 2
  12. Try to mount without restart “mount /ssd-disk1”
  13. Try to see disk free command “df”
  14. If everything is ok, reboot and you should have your disk auto-mounted automatically.
  15. Copy music to /ssd-disk1
  16. Set up MPD so Cantata can see the files on the new disk
  17. Option 1. “ln -s /ssd-disk1 /home/your-username/Music”
  18. Option 2. edit /etc/mpd.conf and set music_directory path to /ssd-disk1
  19. Restart MPD and refresh database in Cantata

22 comments on “How to add new disk in AP-Linux”

  1. Benny says:
    April 22, 2017 at 04:28

    Has been trying in vain to add an extra internal disk.
    Thank you for this article, I have added an internal hard disk following your instructions.
    A big thank you to your hard work and dedication to the music lover community.

    Reply
  2. Sandro says:
    April 23, 2017 at 12:32

    AP Linux is excellent! Thank you!
    My music disk is NTFS.
    How to?
    Thanks.

    Reply
    • mlerota says:
      April 24, 2017 at 09:09

      https://wiki.archlinux.org/index.php/NTFS-3G

      Reply
      • Sandro says:
        April 24, 2017 at 18:58

        Modified /etc/fstab file to add my ntfs logical partition with musics:

        /dev/sda8 /home/user_name/Music ntfs rw,defaults,noatime 0 0

        Reply
  3. Sandro says:
    April 23, 2017 at 13:59

    One more question.
    I plan to use AP-Linux as headless music server, so I’d like to share AP-Linux music disk. This way I could download musics in my Windows workstation and copy them to AP-Linux by network.
    Is is bad to add a sharing server in AP-Linux (resources)?
    Which server do you recommend?
    I am new to linux.

    Reply
    • mlerota says:
      April 24, 2017 at 09:07

      NFS first, Samba second. I don’t know if Windows can access NFS.

      Reply
      • Sandro says:
        April 24, 2017 at 18:49

        Thank you.
        Very easy to use NFS:
        – edit /etc/exports and add /home/user_name/Music *(rw,async,no_root_squash)
        – config nfs-server to autostart: systemctl enable nfs-server

        In Windows 10:
        – Add NFS client (Control panel-programs and features-Turn windows features on or off)
        – Them run regedit.exe (tip from web), locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default. Add two DWORD values: AnonymousUid and AnonymousGid. Set these values to 1000 in decimal base. Restart computer.

        Reply
        • Sandro says:
          April 24, 2017 at 20:59

          Almost everything ok…
          NTFS music partition working…
          NFS sharing working…
          MPD working… Nice clean sound AP-Linux has!!
          One problem:
          After completing my settings, I removed the display (my system will be headless) and after that I discovered the system doesn’t boot without a display. I connected the display again and saw this message on top left of screen:
          ================
          GRUB loading.
          Welcome to GRUB!
          ================
          And no boot.
          How to solve this?
          Ps.: If I turn off and boot with display connected, It works.
          Thanks.

          Reply
  4. John says:
    August 23, 2018 at 08:43

    Newbie: Just got installed last week. Can view & play any music files in Cantata -> Folders. But in ‘Library’, it’s not being able to see all my music files after scanning, only some wav & ape but not flac. Some have .cue paired with .wav/.ape that is reading off an external USB HDD drive (ie. /run/Media/user/Music) that is mounted properly in fstab over a notebook. Scanning the mpd database only bring up a few music files, what can I do ?

    Reply
  5. Tom says:
    October 21, 2018 at 17:42

    Hello,
    I use AP-linux everyday and it work good but after a year or a year and a half, the second disk failed totally. First, it were hdd 2To (kaput) and now ssd 500 Go (kaput now !!!). I try to save the ssd with fdisk and fsck but this tools failed too. So I try to refurbish the ssd with hdparm and it already failed. That’s great because I’ve got an other PC with a debian distribution and ssd and hdd disk and there’s no matter.
    So what’s the matter with my disks on AP-linux ? Is it just a coincidence or someone else have the same problem ?
    Thanks for reply.
    Tom.

    Reply
    • Marko says:
      October 21, 2018 at 21:14

      This has nothing to do with AP-Linux. It happened to me running other OS’s. Who knows what it can be. But I would backup this Debian just in case…Maybe it’s your PC…

      Reply
    • Daniele Domenicali says:
      February 18, 2023 at 19:07

      OS never screws the disks. No such thing. Disks, on the other hand, have very often the habit of screwing themselves. SSD a lot less but they also do that. There must be some electrical issues in your setup… or it’s a simple although rare, coincidence.

      Reply
  6. Ravinder says:
    July 13, 2019 at 19:12

    Finally I was able to install AP linux but having problems related to second ssd just for music files. 60GB Dogfish mssd is being used for AP Linux and I want to use Samsung QVO 1TB SSD as music storage only.
    But when I follow 7th line “””Create directory “mkdir /ssd-disk1”””” then I see ssd-disk1 in Dogfish mSSD and not second 1TB SSD.
    Please help.

    Reply
  7. RSJ says:
    July 16, 2019 at 15:08

    I am stuck at step 12. I get the message that ssd-disk1 is not found. This could be due to incorrect command at step 7 (mkdir /ssd-disk1). What is the full command to be given at step 7. Please help.

    Reply
    • Marko says:
      July 16, 2019 at 15:19

      What does the “fdisk -l” command say?

      Reply
  8. RSJ says:
    July 16, 2019 at 17:25

    Thanks Marko. Could you please guide me to correct step 7 command ? II am just typing mkdir/ssd-disk1 and this dir is being shown in Dogfish ssd rather than in the 2nd Samsung ssd. I know I am doing it wrong way. This is my first linux install for my computer audio transport.

    It would be better to post fdisk -l after giving correct command.

    And sorry for using two different names for last two questions. One is my real name and other is my usr id on linux.

    Reply
  9. RSJ says:
    July 16, 2019 at 17:31

    BTW below is the fdisk -l response till step 6

    Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
    Disk model: Samsung SSD 860
    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: 0x1d7ef88a

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 2048 1953525167 1953523120 931.5G 83 Linux

    Disk /dev/sdb: 55.92 GiB, 60022480896 bytes, 117231408 sectors
    Disk model: DOGFISH SSD 60GB
    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: 0x9151bd41

    Device Boot Start End Sectors Size Id Type
    /dev/sdb1 * 2048 117231407 117229360 55.9G 83 Linux
    root@apl /home/rsj #

    Reply
  10. RSJ says:
    July 16, 2019 at 18:45

    Suddenly I was able to do it and below is the answer to few commands. 256GB is external USB which will be used to copy music to ssd-disk1.

    root@apl /home/rsj # df
    Filesystem Size Used Avail Use% Mounted on
    /dev/sdb1 55G 4.3G 48G 9% /
    /dev/sda1 916G 77M 870G 1% /ssd-disk1
    root@apl /home/rsj # lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 931.5G 0 disk
    └─sda1 8:1 0 931.5G 0 part /ssd-disk1
    sdb 8:16 0 55.9G 0 disk
    └─sdb1 8:17 0 55.9G 0 part /
    sdc 8:32 1 238.4G 0 disk
    └─sdc1 8:33 1 238.4G 0 part
    sr0 11:0 1 1024M 0 rom
    root@apl /home/rsj # blkid
    /dev/sda1: UUID=”ae4881d1-d342-4e39-86c8-9f45b03968bc” TYPE=”ext4″ PARTUUID=”1d7ef88a-01″
    /dev/sdb1: UUID=”c1ce4a18-31cb-47aa-9bc4-2712d4bb62ee” TYPE=”ext4″ PARTUUID=”9151bd41-01″
    /dev/sdc1: LABEL=”USB 256GB” UUID=”383867D138678D26″ TYPE=”ntfs” PARTUUID=”5e86a726-01″
    root@apl /home/rsj #

    Reply
  11. Roy says:
    September 27, 2019 at 21:29

    After hours of headaches I still cannot manage to install APL 4.0

    I did the following:

    # mkfs.ext4 /dev/sdXX
    # mount /dev/sdXX /mnt
    # time cp -ax / /mnt
    # arch-chroot /mnt /bin/bash
    # cd /etc/apl-files
    # ./runme.sh
    # grub-install –target=i386-pc /dev/sdX
    # grub-mkconfig -o /boot/grub/grub.cfg
    # passwd root
    # ln -s /usr/share/zoneinfo/Europe/Dublin /etc/localtime
    # hwclock –systohc –utc
    # ./autologin.sh
    # exit
    # genfstab -U /mnt >> /mnt/etc/fstab
    # reboot

    after the reboot it started up fine. I was able to see the GUI 🙂

    However, then the problems started.

    – ping 8.8.8.8 (good, I have internet access)
    – su (also no problems here)
    – pacman-key –init (still good)
    – pacman -key -populate archlinux (fine)
    – skipped pacman -Sy (because of ppl saying this is no good practice)
    – pacman -Suy (2600MB of install size, so it took 20 mins or so, went fine)
    – pacman -Rc libxfont (error, couldn’t find package libxfont)
    – pacman -S terminus-font (ok)
    – pacman -S xorg-server (ok)
    – reboot -> ERROR: xauth: timeout in locking authority file/home/xxx/.Xauthority
    it is stuck there.

    Reply
    • Marko says:
      September 30, 2019 at 10:03

      Don’t do anything after “pacman -key -populate archlinux”. The update is broken. You can use the system without these commands.

      Reply
      • Roy says:
        October 4, 2019 at 20:36

        Hi, if I do that I just have a desktop and nothing works. I mean, audacious doesn’t start up, I cannot install anything (like rubberband ladspa plugin) and thus it is unusable. What are my options? Thanks

        Reply
  12. Roy says:
    October 1, 2019 at 19:50

    Thanks. Yes it gives me a GUI without any issue, problem is I cannot install anything (I want to install samba or a file share client to be able to interact with my NAS, and rubberband ladspa plugins) because I always get the following errors:
    – warning: databasefile file for ‘ core’ does not exist (same for extra and community

    I checked for answers, ALL say: update with pacman -Syu, which breaks the system

    It’s totally unusable. It’s a shame but I am fed up wasting days of my life to get this shit running. I will try other distro’s. Thanks anyway for trying to help but it’s beyond my abilities right now to fix it.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • AP Linux v5 install instructions

    December 20, 2019
  • How to add new disk in AP-Linux

    April 20, 2017
  • AP-Linux-V4 available

    April 16, 2017

Recent Comments

  • Piotr on AP Linux v5 install instructions
  • PiotrC on AP Linux v5 install instructions
  • Piotr on AP Linux v5 install instructions
  • Daniele Domenicali on Install instructions v3.0
  • John Foss on Supported DACs

Get in Touch

  • +353 85 7630 316
  • info@ap-linux.com
  • Contact Us
    • Twitter

Made on GNU/Linux

Audiophile Linux is based on Arch Linux distribution. Old versions are based on Linux Mint. It’s absolutely free. Linux operating system and it’s kernel are distributed under GPL license.

Links

RuneAudio Rasp Pi/CuBox
Native DSD Music Store
24bit96.com web site.
GPL License
Fluxbox Window manager

Latest tweets

401 Unauthorized: Authentication credentials were missing or incorrect.

(c) 2013 Audiophile Linux Distribution - Marko Lerota