Practical questions about disk partitioning, moving the /home directory and shrinking the / system directory.

Nils Kassube kassube at gmx.net
Wed Jul 17 07:20:14 UTC 2024


On 17.07.24 Bas G. Roufs wrote:
> Hey dear Nils and others.
> > so there should be an entry in /etc/fstab for sda3 to be mounted at /. And
> > you also want to use a separate partition for /home. Therefore you need an
> > additional entry in /etc/fstab for sda5 to be mounted at /home. However
> > that can only work if there is a folder /home on the sda3 partition which
> > will be used as the mount point. So /etc/fstab might look like this:
> >
> > /dev/sda3 / ext4 d 22efaults 0 1
> > /dev/sda5 /home ext4 defaults 0 2
> >
> 
> Attached to this message, you gonna find a textfile that includes two
> /etc/fstab files.

Sorry, there is no attachment. Did you forget it, or maybe kubuntu-users doesn't allow attachments? Can you send it (again) but this time inline or via private mail?

> One has been used until 22 June 2024. I call that one now
> fstab-ori. Another one I have been using from 22 June 2024 up to now. It is
> also the one created for mounting my external hard drive. However, a
> mistake might be in that one that causes the slow upstart.
> 
> In the same textfile, you'll find a bunch of test aimed at revealing the
> UUID of each disk and partition. Do you find info that is useful for
> rewriting /etc/fstab?

Oh dear! You used fstab to mount both the new and old disk? Then this may have caused the boot problem because from cloning partitions you get duplicate UUIDs.

To find out the UUIDs of the partitions you can use the command

ls -l /dev/disk/by-uuid/

> > > > I think you have two options now.
> > > >
> > > > 1. Move everything from the home-new folder to the top folder of sda5.
> > > > Then you need only one fstab entry:
> > > >
> > >
> > > (...)
> > >
> > > I tend to act according to the possible solution you summarise here
> > > above....
> > >
> > > Concretely, I think about the following steps in ONE SINGLE  SESSION. Any
> > > suggestions when reading them?
> > >
> > > Step 1.  «Home-ori» in sda3.
> > > =====≠=================
> > > I open the terminal and launch Midnight Commander via sudo mc. Then, I
> > > navigate to the old home in sda3 at the left side. I navigate to sda5,
> > > Camino-casa, at the right side. Then, I rename the old home in sda3 to
> > > home-ori: via the root-command line  down under Midnight Commander.
> >
> > Sorry, I'm not familiar with MC - I only used it a few times last
> > millenium and I don't remember how it works :)
> > Anyway, what do you mean when you write navigate to sda3 and sda5? Do you
> > use a live system?
> 
> 
> No, I use mc for that! Inside Kubuntu24.04 LTS!
> 
> Install it again within your terminal and try it out - you'll see what I
> mean.
> 
> sudo apt install mc
> 
> After installing midnight commander, do this:
> 
> sudo mc
> You will probably remember again what I mean.
> With «navigating», I mean in this situation - checking the sda3 old home
> folder at the left pane, and simulateously the new home folder sda5,
> Camino-casa, at the right pane.

Well, I tried that, but I couldn't navigate to partitions. Therefore I suppose you have mounted the partitions somewhere and navigate to those mount points.

> > After renaming (sda3)/home to home-ori you should also make a new (empty)
> > folder (sda3)/home because that one is needed as the mount point.
> >
> 
> I know what you mean.
> One question. Do I need to do this in the same session when I also will
> rewrite etc/fstab?

Yes.

> > > Step 2. «home-new» > «home» @ sda5.
> > > ================================
> > >
> > > At this stage, I stay in Midnight Commander. I want to deal with
> > > Camino-casa, sda5 - more then 3 quarter of the 1 TB disk. There, I want
> > to
> > > rename «home-new» into «home». Like this, «home» will get at the «top
> > > folder position» of sda5.
> >
> > I thought you wanted to go with my first option?
> 
> 
> Sure!
> 
> 
> > Then you should not rename that (sda5)/home-new but move the contents from
> > (sda5)/home to (sda5)/ So e.g. (sda5)/home-new/bas should be moved upwards
> > to become (sda5)/bas
> 
> 
> Like this, the folder «home-new» at sda5 will become an empty directory?
> For the rest, I understand what you write here.

Yes, the home-new should be empty after moving the contents upwards. Of course you can remove it then.

> Check in this context the different UUID's I got via some test - look for
> this in the same text file.

I will do so, when you resend it :)


Nils







More information about the kubuntu-users mailing list