Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] [solved]wrong /home  (Read 6908 times)

laudire

  • Guest
[EN] [solved]wrong /home
« on: 2012/11/14, 22:39:56 »
Hi again!

When I installed siduction I used a 40 GB drive which I partitionned as such;

sda1 7.25 GB /boot

sda2 10.47 GB /

sda3 19.43 /home

Now I just discovered that "Home is on  the root partition;



No wonder why I have problems downloading new .iso file. There is only 2.19 GB left unused and 17.33 GB on what I thought was my /home.

Anything I can do to change that?

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.362
    • Land of the Buckeye
RE: wrong /home
« Reply #1 on: 2012/11/14, 23:15:41 »
Two points:

(1) IF you needed a separate /boot partition, which you do not for ext4 filesystems, then it only needs to be 300MB, not 7+ GB.

(2) Although you can change the way your partitions are mounted, via editing /etc/fstab, you cannot change the size of them, and you cannot (practically) move the installed OS from one partition to another. (You could theoretically do it with dd but that would not be optimal, in light of what happened with #1).

Since the installation is new and you don't have a lot of time spent in configuration, I would advise re-partitioning.  If you do need a /boot partition, make it 300 or 400 MB, then you can have 10GB for the OS and the rest for /home.  If you are using ext4 for the filesystem, then just make two partitions, the first one 10GB and the second one can have the rest of the drive for /home.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline michaa7

  • User
  • Posts: 2.302
wrong /home
« Reply #2 on: 2012/11/14, 23:24:40 »
EDIT://
what I am describing here only concerns how to "move" a home partiton. It does not deal with what dibl is suggesting!

- mount empty new home partiton to everything appropriate but *not* "/home"
- copy as user all the content from /home/<user> to /path/to/empty/home/<user>
control whether all content is there!
- logout as user and enter init 3 as root
- open /etc/fstab in texteditor like nano/mcedit/...
- add something like:

LABEL=myhome                                     /home             ext3 defaults,relatime,errors=remount-ro

depending on whether you use LABEL, UUID, or devicenames like /dev/xdx and how your home partiton is formated (ext3, ext4,whatever)
- mount this partiton
- login as user
- If now you can access your home as usual you did all right :-)

But you still have to delete the content of /home on your root partiton. To do so:
- logout again and login as root (textmode) and (attention!) unmount the new home partiton and *delete* the *content* of (old) /home (which is only visible and can only be deleted when you unmount the new home partiton!!! first).

Be carefull when doing this!
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

laudire

  • Guest
RE: wrong /home
« Reply #3 on: 2012/11/15, 01:18:36 »
dibl's way is the most straightforward except that I have spent a good 3 weeks configuring my install (nvidia and what not ) so I would be tempted to go with michaa7 except that I can see problems;
I configured the system so that it boots as <user> (rejean) autologin.

Here is my /etc/fstab btw;
Code: [Select]

UUID=9bedf715-48d5-42e2-9bb2-2505f2ed5f9b     /boot                ext4         defaults,relatime,errors=remount-ro           0    2  
UUID=d96b9d15-f25c-4eba-87dd-47ac990ddeee     /                    ext4         defaults,relatime,errors=remount-ro           0    1  
UUID=1c0b9567-a3a7-4719-a3f1-f1d3a73960f0     /media/disk1part3    ext4         defaults,relatime,errors=remount-ro           0    2  
UUID=048201C74C181A59                         /media/disk2part1    ntfs         auto,users,ro,dmask=0022,fmask=0133,nls=utf8  0    0  
UUID=aabd9a0f-562c-44fe-b997-7de0af9921cf     /media/disk2part10   ext4         auto,users,rw,exec,relatime                   0    0  
UUID=2B32-81E1                                /media/disk2part11   vfat         auto,users,rw,quiet,umask=000,shortname=lower 0    0  
UUID=81447030-5931-4f13-9ff1-25c273bfa7ec     /media/disk2part2    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=9fb189a6-ce57-4cf9-bf5b-9591f2512e90     none                 swap         sw                                            0    0  
UUID=2c2df885-c0fa-4f6a-9358-8b49c597448d     /media/disk2part6    ext3         auto,users,rw,exec,relatime                   0    0  
UUID=813361da-ccd1-4380-b1ec-d97820f07fdf     /media/disk2part7    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=255c6116-9cf8-4ce9-8b67-0ac952ac612b     /media/disk2part8    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=3b733ca4-0790-4b6f-9938-3fde5b477f7d     /media/disk2part9    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=68d986dd-531d-49b7-8cea-fec3388cc736     /media/disk3part1    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=b6cda9cb-7fc9-4880-b552-557d0e5bc8df     /media/disk3part10   ext4         auto,users,rw,exec,relatime                   0    0  
UUID=9cfd579a-1e91-4bba-a4c9-d2a10a0d74af     /media/disk3part11   ext4         auto,users,rw,exec,relatime                   0    0  
UUID=23098723-af66-4a0e-88a3-dbf29043c450     /media/disk3part2    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=b773a4a3-3d84-4afd-a672-a6b653a1f7e8     /media/disk3part4    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=28e42a2e-cd77-4761-b90d-bfda05957914     /media/disk3part5    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=a8f96c38-a441-4872-821e-fcb081110f36     none                 swap         sw                                            0    0  
UUID=443E317E38E48AC0                         /media/disk3part7    ntfs         auto,users,ro,dmask=0022,fmask=0133,nls=utf8  0    0  
UUID=07aea50a-c1e8-4b4a-b212-8b7601eddc9d     /media/disk3part8    ext4         auto,users,rw,exec,relatime                   0    0  
UUID=b1e5fb38-794f-49b8-94f2-19923e8f2b9c     /media/disk3part9    ext4         auto,users,rw,exec,relatime                   0    0  


with the following line corresponding to the partition I would like to ( and thought I did ) be my /home partition;
Code: [Select]

UUID=1c0b9567-a3a7-4719-a3f1-f1d3a73960f0     /media/disk1part3    ext4         defaults,relatime,errors=remount-ro           0    2


Right now it has more or less what I want it to have such as the .mozilla file, etc. except for a few folders such as Downloads/.

I should also add that I do have a big partition (sdc7 488 GB) and a smaller (sdb11 100 GB) where I keep copies of the important and personnal stuff plus a bunch of .iso with which I play in Vbox.

So unless I can do some of the work from another distro ( I have OpenSUSE, Mageia,CentOS,Linux Mint, Slackware and PCLinuxOS mini-Zen all in working order ) I'll do some research and reading on booting as root in init3.
Any other suggestion in the meantime will be more than welcome.

Offline michaa7

  • User
  • Posts: 2.302
RE: wrong /home
« Reply #4 on: 2012/11/15, 01:45:28 »
yes, I remembered, you're the one with more than a handfull distros installed ... ;-)

I have moved around / partitions and /home partitions several times, successfully. It's not done by magic. But it helps a lot if you understand what I am suggesting and you're doing.

So, from what I was explaining it should be clear *when*, what and how to change:


Quote
UUID=1c0b9567-a3a7-4719-a3f1-f1d3a73960f0     /media/disk1part3    ext4         defaults,relatime,errors=remount-ro           0    2




But I do not understand what
Quote
"I configured the system so that it boots as <user> (rejean) autologin."
should tell us? You're booting neither as root nor as <user>!
There may be an autologin at the end of the boot process, though.

And I do not understand to what is referring:
Quote
Right now it has more or less what I want it to have such as the .mozilla file, etc. except for a few folders such as Downloads/.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

laudire

  • Guest
RE: wrong /home
« Reply #5 on: 2012/11/15, 02:10:08 »
sorry my wrongs; I wanted to say that it does autologin as me. I normally turn the computer on then walk away and when I come back it has booted, started siduction and login.
Also what I meant is that there is nothing in root/home/rejean that is not already on sd3 (where I thought my /home was).
I have written your explanations in my notebook and will read them a few times then proceed exactly as you suggested.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.362
    • Land of the Buckeye
RE: wrong /home
« Reply #6 on: 2012/11/15, 02:37:47 »
Unless I have missed something, it is still the case that some 7GB of disk space is wasted on a /boot partition that is 7GB larger than it needs to be.  No rearrangement of sda2 and sda3 will fix that problem.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

laudire

  • Guest
RE: wrong /home
« Reply #7 on: 2012/11/15, 03:29:49 »
I do have a 40 GB, a 250 GB and a 1 TB hard drives but if I ever reinstall a /boot partition I will remember your suggestion dibl.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.362
    • Land of the Buckeye
RE: wrong /home
« Reply #8 on: 2012/11/15, 09:57:45 »
Gparted has the capability to resize partitions. It is a slow process, and of course there is some risk of losing all the contents of the hard drive.  If you boot a Parted Magic live CD or USB stick, you could shrink sda1 and let the space go to whichever partition needs to get larger.  Don't lose power while you are running Gparted!
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline michaa7

  • User
  • Posts: 2.302
Re: RE: wrong /home
« Reply #9 on: 2012/11/15, 11:53:00 »
Quote from: "laudire"
...
Also what I meant is that there is nothing in root/home/rejean that is not already on sd3 (where I thought my /home was).
....


This is confusing. How can this be.

Hopefully "root/home/rejean" doesn't even exist. You mix up "/" (root of the tree) and "root" (name of the unrestricted user) and "/root" (the home directory of the unrestricted user). I assume you meant "/home/rejean/". Never ever call root of the tree "root" (it is "/") because this is completly misleading.

And if you already have some (hidden) user config files and whatever on sda3 WITHOUT being it you who manually copied these files to this location like I suggested then something in your description was wrong! Hopefully you wanted to tell me that you began to follow my steps and copied the content of your home folder to the desired location but haven't finisehed the other steps?
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Online towo

  • Administrator
  • User
  • *****
  • Posts: 2.941
RE: Re: RE: wrong /home
« Reply #10 on: 2012/11/15, 12:39:05 »
If anyone would look at the postet fstab, there is no entry for a separate home.
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline michaa7

  • User
  • Posts: 2.302
Re: RE: Re: RE: wrong /home
« Reply #11 on: 2012/11/15, 12:49:29 »
Quote from: "towo"
If anyone would look at the postet fstab, there is no entry for a separate home.


towo, be sure, I have looked. But nobody knows what laudire did in between.

The action he wants to take requires a communication without misunderstandings. That's why I don't want to "assume" but to "know" what he is doing.
If this sounds like I am nitpicking with the info he gives us/me I am fine with that.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

laudire

  • Guest
RE: Re: RE: Re: RE: wrong /home
« Reply #12 on: 2012/11/15, 17:00:01 »
Ok! Let us recap, shall we, because English being my 2nd language I am not always as clear as I ought to be.
About 2 months ago I installed siduction with a /boot partition on sda1 (7.27 GB) then a / partition on sda2 (10.47 GB) and a /home partition on sda3 (19.43 GB).
After I am done installing a new distro I go to my storage partition sdc7 (488 GB) copy some files and folders that I know I will use on a daily basis (such as .mozilla) and paste them on my /home partition (which should be sd3).
Yesterday I wanted to download a .iso package that I could try in Vbox and I was told there was not enough space available. That is when I realized that I was not using the <user> "home" (which is the whole sda3 partition with 16.4 GIB free of 19.2GIB) but the </> "home" (which is on sda2 with only 1.6 GIB free of 10.3 GIB).
I will not add anything else for now so I don't make the whole thing more complicated.
If anyone has some advice please shoot.

laudire

  • Guest
RE: Re: RE: Re: RE: wrong /home
« Reply #13 on: 2012/11/15, 18:05:38 »
Yeah!
I kindda followed michaa7 suggestion and login as root then edited /etc/fstab with mcedit.
All I did was change the line;
Code: [Select]


UUID=1c0b9567-a3a7-4719-a3f1-f1d3a73960f0 /media/disk1part3 ext4 defaults,relatime,errors=remount-ro 0 2

to
Code: [Select]

UUID=1c0b9567-a3a7-4719-a3f1-f1d3a73960f0     /home                ext4         defaults,relatime,errors=remount-ro           0    2

I saved it and rebooted

and now if I open Dolphin then left-click on "root" then right-click on "home" and choose 'properties' I am told that I have 16.3 GIB free of 19.2 GIB;



Thanks a lot guys.

Offline michaa7

  • User
  • Posts: 2.302
Re: RE: Re: RE: Re: RE: wrong /home
« Reply #14 on: 2012/11/15, 18:30:20 »
[ EDIT:// ]

Happy you managed to resolve this problem (partly? And no, you didn't click at "root", please...). You still will run out of space on your "/" partiton if you did not clean up. See below.

[/ EDIT:// ]



I am not sure we/I should support someone who is confused by installing more distros than he can manage. On the other hand, it's your feet you have to watch out not to shoot at ;-) . I am not aiming at it!


Quote from: "laudire"
About 2 months ago I installed siduction with a /boot partition on sda1 (7.27 GB) then a / partition on sda2 (10.47 GB)
you did
Quote
and a /home partition on sda3 (19.43 GB).

you did *not* although you tried.
Quote
After I am done installing a new distro
I unfortunately have to assume you here do not refere to the siduction installation but yet an other one in which case the used /etc/fstab is an other one ??? If instead by "a new distro" you meant "this/the new distro" them my comment is obsolete
Quote
I go to my storage partition sdc7 (488 GB) copy some files and folders that I know I will use on a daily basis (such as .mozilla) and paste them on my /home partition (which should be sd3).

In this case your sda3 should still be completely empty. If it's not, your description what you did is incomplete/wrong.


Again, what to do to "repair" the situation is straightforward and no magic. The only difficulty is to be sure you describing your system and what you did accurately.

All you have to  understand is:
- you have to copy (as user) the content of the existing home/user to the desired home/user partition.
- you then have to mount (as root, automating it by editing /etc/fstab) the desired home partiton to /home (and so far all you did can be reverted, so this can't harm)
But as you want to free space on /home/user/content *on your systempartiton* you have to be 100% sure the new home partiton isn't mounted there while you delete something.
- you only can delete the old home/user (the one on your system partiton) while the new home/user isn't mounted over it (because then it is invisible/unaccessible). This is the only moment you can loose data ... if you fail to understand what is mounted and where and what should not be mounted during this action.
Ok, you can't code, but you still might be able to write a bug report for Debian's sake