0

Hello and thank you for your help!!! So i am very new with ubuntu system (15.04 version) and am a bit lost. I have installed ubuntu in my SSD drive but i can't see my second hard drive for me to start downloading things. I cannot see my secondary hard drive at the left of the screen and when i open gparted it does not showing me the 2 discs in the same window (also gparted shows me that the second hard drives space is anavailable). All i want is to see my hard drive and get to install things in it. Please help!!!

jimx@jimx-desktop:~$ sudo fdisk -l

Disk /dev/sda: 119,2 GiB, 128035676160 bytes, 250069680 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: 0x942894fd

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 233457663 233455616 111,3G 83 Linux
/dev/sda2       233459710 250068991  16609282   7,9G  5 Extended
/dev/sda5       233459712 250068991  16609280   7,9G 82 Linux swap / Solaris

Disk /dev/sdb: 465,8 GiB, 500107862016 bytes, 976773168 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: 0x152a9fd4
0

Attaching your second hard drive

  • Open GParted with sudo gparted in a terminal.

    • In the upper right corner select your second hard drive. The default in this box should be /dev/sda, your second hard drive should be /dev/sdb
    • If you have no partitions on your second hard drive (what I assume, because you say the space of the second drive is unavailable), you have to create a partition table:
    • Select in the menue bar Device >> Create Partition Table >> msdos (Master Boot Record)
    • By right-clicking on the white space you can now create a new partition via new.
    • You can customize the size of the partition, the file system - ext4 or ext3recommended - and give a label.
    • After clicking Add you have a new partition on your second hard drive.
    • When you reboot your system now, your second hard disk should appear in the left bar of ubuntu.
    • Now you can (recommended) make an entry in /etc/fstab, so that your second hard drive is mounted automatically with booting of your system.
    • Create a mount point:

      sudo mkdir /media/<user>/<nameOfyourDrive>
      

(I recommend to choose /media/<user>/<nameOfyourDrive, where <user> is your username in ubuntu and <nameOfyourDrive> the name you want for your second drive, because it creates a symbol in your left bar.)

  • Edit /etc/fstab:

    sudo nano /etc/fstab
    
  • Enter following at the end of the file:

    /dev/sdb1 /media/<user>/nameOfyourDrive ext4 defaults 0 2
    

(/dev/sdb1when it was the name of your second hard drive in GParted. The 1 stands for the first partition on the disc. ext4, when you choose it as your format in GParted.)

  • When you reboot your system again now, the second hard disc is supposed to be mounted automatically.

Moving Programs

  • An easy way to move programs onto the second hard disc is creating symlinks:

With a symlink you move the actual file to another place and you on the former place create a symlink which directs to the new place - explained in easy words. I recommend, that before you move files you make a copy of them with an alternative name and delete them first, when everything is working.

  • Now search for the programs/files you want to have on your second disc, it's likely that they are stored under /usr/bin, /usr/sbin or /binⁱ.
  • Make a backup of them in the same directory

    sudo cp <PATHtoFILE>/<filename> <PATHtoFILE>/<filename>_backup #it doesnt matter how you name your copy.
    
  • Then copy your file on the second hard disc:

    sudo cp <PATHtoFILE>/<filename> /media/<user>/<nameOfyourDrive>/<filename> # the mountpoint you created earlier, your second hard disc
    
  • And now you are able to create a symlink to its former place:

    sudo ln -s /media/<user>/<nameOfyourDrive>/<filename> <oldPath>/<filename> #creates a symbolic link from the old path to the second hard drive
    

Test the programs or files, which you intend to move: If you recognize, that everything is working nicely, you can delete the backup, which you hopefully created earlier:

 sudo rm [-r] <PATHtoFILE>/<filename>_backup # removes backup-file or directory: '-r' only, when it's a directory

ⁱ Matter, that it's not sure that all parts of the programs are here. It may be possible, that they are in different directiers or separated into more than only one. Furthermore it's likely that they access libraries from /usr/lib/or from elsewhere in the filesystem.

  • Thank you very much i have attached my second hard drive BUT i tried to download a program and when i choose the destination folder to be my second hard drive does not let me install it Also when i try to access my second hard drive this message pops up "no object for D-Bus interface" with a ok button at the end. what is that and does the ubuntu file storage system works like windows or not? – Dhmhtrhs Kaskouras Sep 25 '15 at 12:48
  • Firstly the linux filesystems differs a lot from windows', just take a look in this short intro: howtogeek.com/137096/… . Secondly I didn't know about the error you received, but I found this: askubuntu.com/q/627621/448613 – h0ch5tr4355 Sep 25 '15 at 13:21
0

Can you See your HardDisk listed in the following commands output. Please execute this command as root.

fdisk -l

If it is not listed means HardDisk is not detected by OS. But if you are able to see the HardDisk in the commands output that means

Either:

  1. Your HardDisk does not have partition.

  2. Your HardDisk is not mounted.

  • 1
    First of all thank you and secondly i can see my hard drive but it is not like my SSD (see the answer bellow) what do i do next??? – Dhmhtrhs Kaskouras Sep 25 '15 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.