0

When installed Ubuntu 13.10 i made sure /home its own partition gave it 42 GB and root partition 22 GB. now every thing save in my root's home folder but not my separate home partition.Gradually my root partition is filled up but home partition totally unused.even if i can,t access my home partition.when i goto my home partition i see only lost+folder.i upgraded 14.04 via on-line. but same problem.the partition details is given bellow ,here sda7 is my home partition and sda8 is my root partition for Ubuntu.sda11,12,13 is used for RedHat 6.

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848    61442047    30617600    7  HPFS/NTFS/exFAT
/dev/sda3        61442048   202364927    70461440    7  HPFS/NTFS/exFAT
/dev/sda4       202366974   625139711   211386369    f  W95 Ext'd (LBA)
/dev/sda5       202366976   208658431     3145728    7  HPFS/NTFS/exFAT
/dev/sda6       208660480   212854783     2097152   82  Linux swap / Solaris
/dev/sda7       212856832   300921285    44032227   83  Linux
/dev/sda8       300922880   343289855    21183488   83  Linux
/dev/sda9       460969173   484215164    11622996    7  HPFS/NTFS/exFAT
/dev/sda10      484216832   625139711    70461440    7  HPFS/NTFS/exFAT
/dev/sda11      343291904   343701503      204800   83  Linux
/dev/sda12      343703552   360087551     8192000   83  Linux
/dev/sda13      360089600   376473599     8192000   83  Linux

the output of cat /etc/fstab; mount | grep ^/; sudo blkid /dev/sda7; echo HOME=$HOME; ls -l $HOME; ls -l /home

habib@Satellite:~$ cat /etc/fstab; mount | grep ^/; sudo blkid /dev/sda7; echo HOME=$HOME; ls -l $HOME; ls -l /home;
# /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/sda10 during installation
UUID=619c87d5-b511-4f39-b11a-a53954837902 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda8 during installation
UUID=f6bc50c4-c8df-4a21-ba60-226ccb684c8a none            swap    sw              0       0
/dev/sda8 on / type ext4 (rw,errors=remount-ro)
/dev/sda9 on /media/habib/Apple type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda7 on /media/habib/home type ext4 (rw,nosuid,nodev,uhelper=udisks2)
/dev/sda5 on /media/habib/14F04FA10985EF8D type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda7: LABEL="home" UUID="e42ffcb6-e8f1-4566-b698-fc6913737510" TYPE="ext4" 
HOME=/home/habib
total 88284
-rw-r--r-- 1 habib habib  1636913 অক্টো  20 22:57 12RPTSP.pdf
-rw-rw-r-- 1 habib habib  1152275 নভে   11 02:51 AustinHams SDR.pdf
drwxrwxr-x 9 habib habib     4096 নভে   20 20:55 bladeRF
-rw-r--r-- 1 habib habib  4080349 নভে   19 08:50 bladerf j61.mp4.part
drwx------ 3 habib habib     4096 নভে   21 03:55 Downloads
-rw-rw-r-- 1 habib habib  3440632 নভে   20 00:54 Elce2010-welte-openbsc.pdf
-rw-r--r-- 1 habib habib     8980 ফেব্রু   7  2014 examples.desktop
-rw-r--r-- 1 habib habib  1259576 অক্টো  21 08:23 flareget_3.2-42_i386(1).deb
-rw-r--r-- 1 habib habib  1259576 অক্টো  19 14:18 flareget_3.2-42_i386.deb
drwxr-xr-x 3 habib habib     4096 ফেব্রু  24  2014 gnuradio
drwxr-xr-x 2 habib habib     4096 নভে   15 04:39 kodu
drwxrwxr-x 9 habib habib     4096 নভে   20 17:45 make-3.81
-rw-rw-r-- 1 habib habib  1564560 নভে   20 17:25 make-3.81.tar.gz
drwxr-xr-x 9 habib habib     4096 নভে   20 18:22 make-4.1
-rw-rw-r-- 1 habib habib  1878787 নভে   20 18:16 make-4.1.tar.gz
drwxr-xr-x 5 habib habib     4096 ফেব্রু  25  2014 Music
drwxr-xr-x 2 habib habib     4096 ফেব্রু   7  2014 MUsic
-rw-r--r-- 1 habib habib    12170 এপ্রি   5  2014 nice.grc
-rw-r--r-- 1 habib habib 13165373 অক্টো  19 21:19 octave-3.8.2-alt1.src.rpm
-rw-r--r-- 1 habib habib  9445475 অক্টো  19 21:19 octave-3.8.2-alt1.x86_64.rpm
-rw-r--r-- 1 habib habib        0 অক্টো  24 20:40 octave-core
drwxr-xr-x 3 habib habib     4096 ফেব্রু  20  2014 PCL_BGTLK
drwxr-xr-x 2 habib habib     4096 নভে   22 01:38 Pictures
drwxr-xr-x 2 habib habib     4096 ফেব্রু   7  2014 Public
drwxr-xr-x 3 habib habib     4096 ফেব্রু  24  2014 PyQt-x11-gpl-4.10.3
-rw-r--r-- 1 habib habib  5544049 অক্টো  19 12:06 RMLL_Kernen_Home_Brew_IPTV_v2_optimised.pdf
-rw-rw-r-- 1 habib habib  1006033 নভে    2 14:06 sirisha_engg_material_blogspot_com_2011_11_microprocessor_la.pdf
drwxrwxr-x 3 habib habib     4096 অক্টো  26 23:23 sketchbook
drwxr-xr-x 3 habib habib     4096 ফেব্রু  24  2014 taletalk
drwxr-xr-x 2 habib habib     4096 ফেব্রু   7  2014 Templates
-rwxrwxr-- 1 habib habib     5202 এপ্রি   5  2014 top_block.py
drwxr-xr-x 2 habib habib     4096 ফেব্রু  25  2014 turna
drwxrwxr-x 2 habib habib     4096 ফেব্রু   8  2014 Ubuntu One
-rw-r--r-- 1 habib habib  2769884 অক্টো  25 01:22 UbuntuTutorial_9-04_15-07-09.pdf
-rw-rw-r-- 1 habib habib       87 নভে   14 09:34 Untitled Document
-rw-rw-r-- 1 habib habib        0 নভে   14 09:34 Untitled Document~
drwxr-xr-x 4 habib habib     4096 অক্টো  24 23:45 usbview
drwxr-xr-x 2 habib habib     4096 ফেব্রু   7  2014 Videos
-rw-rw-r-- 1 habib habib   146305 নভে   13 08:49 wiki_yatebts_com_index_php_Configuration_Commands.pdf
-rw-rw-r-- 1 habib habib   119739 নভে   13 08:48 wiki_yatebts_com_index_php_Installing.pdf
-rw-rw-r-- 1 habib habib   147175 নভে   13 08:46 wiki_yatebts_com_index_php_Main_Page.pdf
-rw-rw-r-- 1 habib habib    97348 নভে   13 08:47 wiki_yatebts_com_index_php_Prerequisites.pdf
-rw-rw-r-- 1 habib habib    98951 নভে   13 08:49 wiki_yatebts_com_index_php_Running.pdf
-rw-r--r-- 1 habib habib 41433818 অক্টো  21 00:34 YateBTS Lab Kit- Unboxing and Setup.mp4
total 4
drwxr-xr-x 45 habib habib 4096 নভে   22 03:35 habib
4
  • What is the output of this big command: cat /etc/fstab; mount | grep ^/; sudo blkid /dev/sda7; echo HOME=$HOME; ls -l $HOME; ls -l /home;?
    – Alaa Ali
    Nov 21, 2014 at 21:30
  • i have just edited my question adding your command.thanks Nov 21, 2014 at 22:02
  • I guess that by root home folder you mean home folder for when you're acting as root user? It will be /root - and this one is located in rootfs - /. Kind of "tradition". /home is regular users. You could of course modify your root details to have its home in /home/root - if that's what you're after - but that's probably not really the best idea.
    – Jacek
    Nov 21, 2014 at 22:54
  • O.o, there's something strange about your computer, your fstab has wrong comments. Meh.
    – Alaa Ali
    Nov 21, 2014 at 23:04

1 Answer 1

1

Your machine is not using your partition as home because you don't have it mounted as /home, but instead /media/habib/home. What you have to do now is:

  1. Copy your current /home contents to your partition,
  2. Remove the current /home,
  3. Make a new /home folder and mount your partition over it.

Here are the steps you need to do:

  1. sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/habib/home/.

    • This copies your existing /home to your partition, which is currently mounted as /media/habib/home. This might take a while, depending on how big your home folder is.
  2. Once it's done, make sure that everything was copied over to your partition by doing an ls -l /media/habib/home/habib, you should see all your files there.

  3. Edit fstab by doing sudo nano /etc/fstab and add this line at the end:

    UUID=e42ffcb6-e8f1-4566-b698-fc6913737510   /home    ext4   defaults   0   2
    

    Hit Ctrl+X, then Y, then Enter to save and close.

  4. cd / && sudo mv /home /old.home && sudo mkdir /home

    • This moves your /home to /old.home so that we can still keep it instead of deleting it, then creates a new folder called /home.
  5. sudo mount -a

    • This mounts your partition on /home. If all is well, you shouldn't get any errors here.

Do the following to verify that everything worked:

  • ls -l /home/habib, you should see all your files there
  • df /home, the output line should start with /dev/sda7.

If all of this checked out, then you've been successful! All you need to do now is to remove the old /home to free up space on your root partition. You can do that by sudo rm -r /old.home.

Read this for more information: https://help.ubuntu.com/community/Partitioning/Home/Moving

1
  • The out put of first command is like rsync: mkdir "/media/habib/home/." failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(674) [Receiver=3.1.0] ` Nov 22, 2014 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .