Unable to log in after creating a new /home partition

Ubuntu Support Template

Ubuntu Version:
Ubuntu 24.04.2 LTS

Desktop Environment (if applicable):xfce4-session 4.18.3 (Xfce 4.18)

xfce4-session 4.18.3 (Xfce 4.18)

Problem Description:
I had a Windows 11 and Xubuntu dual boot system and the Xubuntu system became corrupt. I deleted it and reinstalled again but forgot to select a /home partition. I have created another /home partition and proposed to copy the relevant directories from / directory into my new /home.

I mounted the new /home partition, I thought correctly but when I rebooted I was unable to log in. The login just kept reappearing. I got out of this by using the advance options to edit the fstab.

My fstab:

{GNU nano 7.2                       /etc/fstab
/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).

/ was on /dev/nvme0n1p8 during curtin installation
/dev/disk/by-uuid/35d543ee-e3d8-4333-b194-cf2d27cb5785 / ext4 defaults 0 1
/boot/efi was on /dev/nvme0n1p1 during curtin installation
/dev/disk/by-uuid/40DB-4F92 /boot/efi vfat defaults 0 1/swap.img       none    swap    sw      0       0

my new /home partition

#/dev/disk/by-uuid/c1779421-c81f-43d9-9cc2-335304088107 /home ext4 defaults 0 1
}

I cannot see an error but needed to # out the /home entry.

1 Like

Welcome to Ubuntu Discourse :slight_smile:

From a liveUSB, please select to Try Ubuntu and then run the boot info summary:

Post the pastebin link back here so we can review.

Some questions:

  • Is Secure Boot disabled
  • Can you access Windows
  • Did you install Xubuntu with encryption for the root partition
1 Like

Boot-info: paste.ubuntu.com/p/6VMqJmhvB5

Secure Boot: This is set to ‘Custom’. The only other option available is ‘Standard’. Windows says ‘Off’

Access to Windows: Yes. This reply is from that OS.

Xubuntu with encryption: No

Your bootinfo summary shows an error in the efi /etc/fstab entry. Does your initial post contain a typo as your fstab contents show the swap file entry on the same line as the efi entry. Whatever your swap is (partition or file) it needs to be on a separate line from the efi entry. I believe the lines in the bootinfo summary are lines 170 and 181.

That looks like a complicated set-up
3 x nvme disks
1 x sda:32.2GB:scsi:512:512:gpt:UDISK PDI09_32G ACJ3.0:; containing with XUBUNTU 24_ Main Data Partition

Both your operating systems are located on one disk as follows:-

OS#1 (linux):   Ubuntu 24.04.2 LTS on nvme2n1p8
OS#2 (windows):   Windows 8 or 10 on nvme2n1p4

Now, this is probably not the advice you wish to read, but, nevertheless, here it is:-

Back up your Windows and Xubuntu data
Install (or retain) Windows on one disk (uefi mode & gpt is automatic)
Restore data and test (if re-installed)

Install Xubuntu 24.04 on a separate disk (uefi mode with gpt is essential)
Restore data and test

Use the third nvme disk for shared data (if necessary)

Boot each disk independently via PC boot menu
Edit grub later if you prefer

Please elucidate on the error. What did it say?

The boot disk is an expensive M2 and I would like both OS on it as it is in the fast boot slot, but not /home.

  1. windows & Xubuntu - OS on boot nvme
  2. either of the other two nvme with /home
  3. That was my objective

However as I am not familiar with linux I decided first to see if I could split /home from / and put /home in a separate partition on the same nvme. It seemed easier than jumping straight into my final objective.

The other two nvme (both 2 TiB are used solely for data and gaming. Xubuntu can see both if necessary and windows can see its NTFS which is used for gaming. Neither of them are ‘booted’ but each is mounted by Xubuntu. One reason for changing anything was that with / and /home on the same nvme I ran out of space.

After Covid (first time I ever ‘gamed’) my gaming has gradually wound down until now it is virtually nil. Can I not used part of the gaming nvme for /home as it is a 2TiB drive and the rest for any data from Windows? The other nvme would be used for any data I decide from xubuntu or given to a relative.

I agree with tea-for-one on keeping systems on separate drives?
Are not all three NVMe drives M.2? or are you using some sort of adapter?

An alternative suggestion is keep /home inside / (root) and put all data in separate data partition(s). Back with XP had both a Linux formatted partition for data & a NTFS data partition for some data I wanted to share between systems. When I got a larger NVMe drive, I moved my data partition from sda to the NVMe drive. The sda become test installs and backups. I keep two / main working partitions, one current LTS install & one older, that then becomes newest LTS.
I also like to keep a small / on every data drive to use for repair if main drive has issues. Just an altenative to external drive, if I have space. I do not se snaps, so installs are somewhat smaller.

2 Likes

There is a Right Curly Bracket on the second line - that may be the error.
I think that your fstab entry should be:-

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p8 during curtin installation
/dev/disk/by-uuid/35d543ee-e3d8-4333-b194-cf2d27cb5785 / ext4 defaults 0 1
# /boot/efi was on /dev/nvme0n1p1 during curtin installation
/dev/disk/by-uuid/40DB-4F92 /boot/efi vfat defaults 0 1
#/home is now on /dev/nvme2n1p5
/dev/disk/by-uuid/c1779421-c81f-43d9-9cc2-335304088107 /home ext4 defaults 0 1
/swap.img	none	swap	sw	0	0

If …

  • the contents of the /home directory was resident on the root disk,       and

  • you needed to migrate that data onto the separate partition being mounted as /home,

then …

  • you need to boot to live ISO session,
  • mount the original root to path ${originalRoot}
  • rename ${originalRoot}/home to ${originalRoot}/home.ORIG
  • mkdir ${newHomeDir}
  • mount the ${originalRoot}/home to ${newHomeDir} (on that second partition)
  • ( cd ${originalRoot}/home.ORIG ; tar cf - . ) | ( cd ${newHomeDir} ; tar xvpf - )

That will migrate the data to that proper /home partition.



However, there will be a race condition during boot! You need to specify that the /home partition must be confirmed as mounted before proceeding with starting the Desktop Manager.

In my case, that was done by setting a systemd wants specification, per the following for my own setup.


File: system/lightdm.service.d/override.conf

[Unit]
RequiresMountsFor=/DB001_F2

File: system/sysinit.target.d/override.conf

[Unit]
RequiresMountsFor=/DB001_F2

Also, in my case, I’ve kept the actual root of my ${HOME} on the root partition, but symlink all non-${HOME} content to that secondary drive, per the following:

In a previous post in this discourse I was told to enclose multi-line txt in {}.

The } you refer to was not in the fstab but was at the end of the txt. Sory it appeared to be part of the entry.

Oh, how I (an 85 year old struggling with terminal cancer and always have struggled with linux since covid), wish someone would guide me in that as I am sure it is what I was trying to achieve.

There now, everyone knows my full story, sorry.

However, I will attempt that if nobody says it is a false trail (many times in history)

I’m 70, so we can make this work! :slight_smile:

Is there anything that you are unsure of with what I described in my earlier post?

How can I get to see the pastebin that I posted? When I use the link it takes me to a new pastebin input web page

mount the ${originalRoot}/home to ${newHomeDir} (on that second partition)

I don’t follow those. But does this leave the Xubuntu Boot (OS?) on the small boot nvme?

I am probably being pedantic but that was expensive and if it later on has Windows which I hardly now use, it does seem a waste.

BTW, I have all the data I need from the previous system backed up to a USB. I did say my use for all this was small. My son suggested the PC build during covid.

I dont need anything from windows and an empty /home in the right place would be great!

Yes, all three are M.2. It was quite an expensive bit of kit but never having played games…………

My son suggested the specs and I had it built to pass the Covid time. Now, I think it may be OTT for my current use.

To make sure we can guide you for your specific setup, could you please share with us a snapshot image of your disk layout as reported by GParted (that can be found under “System Tools”). That will look something like this:



Please identify which of the partitions reported in the above is your Xubuntu OS (I will refer to that as the “first partition”). Let us know if you want/prefer/need to keep that OS on that partition or not.

  • I will also let others (more familiar with Xubuntu specifically) advise you as to whether the existing size of that Xubuntu partition is large enough for the expected needs of the OS alone, not counting user content if that is all stored under /home.

Also, did I correctly understand that your Windows partition is the larger partition and that you are prepared to

  • reformat that second partition as an ext4 partition that would become your future /home partition?       or

  • you wish to keep that and create a third partition (by “shrinking” the size of the Windows partition and re-allocate some of that space as a new partition) that will become your future /home partition?

I apologize profusely. In all good conscience, I cannot assist you because I see your system is UEFI-based and I don’t know anything about how to manipulate such configurations, expecially if they might have been “secured” with bitlocker.

I will have to step away and allow the experts in the community continue with your assistance.

I much regret this outcome. I wish you luck and success with the assistance from others.

I did try to explain that what you see above in the screen shot is what is now Windows and Xubuntu / (p8) without a /home ie. all in / (p8) . Plus a partition which is/was intended to be a new /home (p5) with the data from / (p8) relating to it’s /home transferred into the new /home (p5).

The fstab I posted relates to this and fails to boot correctly.