0

I was getting frequent error messages (usually on Ibus Preferences – which were very frequent, and errors on few on other categories too). So, I re-installed using a LiveCD creating new partitions for root (/) and swap (linux-swap) by formatting them. However, I did the mistake of not selecting the existing home partition (/home). In fact, I did not specify any particular space for /home.

After the (re)install, I tried something to mount my old /home partition back. And, after doing this (or, at least I think so), all my ubuntu partitions are showing under a windows (extended) partition (/dev/sda3). I thought it was because I installed ubuntu in a empty windows (NTFS) partition (/dev/sda3 of 195.1 GB, in the below fig.).

Partition data - after 1st (re)installation.

Unfortunately, I don’t have a screenshot taken after the original ubuntu install.

I wanted the ubuntu partitions to be placed along-side windows NTFS partitions (not within any of them) in the HDD. So, I re-installed ubuntu again, this time I selected the un-allocated space (220.35 GB in the above fig.) to install. And, I selected the existing home partition as /home (with the format button unchecked). However, still the ubuntu partitions are still showing under a Windows partition (/dev/sda3). Not sure why.

(Note the difference in the size of /dev/sda3 after the 1st & 2nd installation. See screenshots).

Partition data - after 2nd (re)installation.

Now, I have 2 questions.

1. How can I install ubuntu in the hdd along-side windows, without any dependency? (Note that the **temp** is a NTFS, which is another windows partition & I’m not sure why it is also brought under this extended partition).
   
2. How to make an exiting home partition (not directory) to be the default **/home** for ubuntu – after completing the installation (without using LiveCD i.e. from a Ubuntu terminal). I’m sure there are ways, but I guess they all assume **/home** to contain user info only & not the data.
    i. I am (understandably) unable to access the **dev/sdax** (**/home** partition) using **cd/cp/mv** commands. Without these, how can I backup my data before doing this?
    ii. When I mount the old home partition as **/home**, the user folder created in the new home (during install) is getting removed. I don’t mind this, but can I restore my old users from the old **/home** partition when I mount it. If so, how can I do so.
    iii. Somewhere while trying, I saw my home partition listed as **/media/<something>** in the **Files** window. What does it mean & how can I handle mounting in such cases.

Note: I have all my data under the /home partition.

Edit on 10-07-2020 (as a reply to @heynnema).

@heynnema: Sorry about the delay. I didn’t want to reply until I have tried everything suggested & get something working (or, not working).

Thank you. Yes, your answer was (very) helpful in understanding why my Ubuntu partitions (which need to be primary) were showing under the Windows extended partition (which is a logical partition). In fact, I missed to notice that I already had 3 primary partitions in Windows. I knew the MBR & Windows(C:) partitions to be primary, but I missed to consider Windows RE tools to be another primary partition (and, I still don’t understand the reason why there should be one – as it still expects one to have a recovery image in an external drive).

And, Ubuntu is not my primary, Windows-10 is (for now).

I couldn’t try your suggestion, as I don’t have an external drive with that much empty space. That is why I had to try copying /home data via terminal and that’s why I had to mention that I was unable to access /dev/sdax/ (/home).

But I still have 2 questions.

  1. When we install ubuntu using “Install along side of Windows” method, we’d still have the same problem of the No. of max. Primary partitions, right? Or, would it be handled internally, somehow?
  2. Let’s say I format the entire drive & install Ubuntu first, how can Windows be installed properly (as Ubuntu would have already taken 3 Primary partitions)? Will it be the reverse of how it is now (or) Ubuntu doens’t have those limitations on the No. of Primary partitions? And, both Ubuntu & Windows would show under /dev/sda?.

Anyway, so I tried to live with my existing hardware & installed ubuntu again with a completely new /home space.

@walttheboss: Thank you. That was a neat trick with fstab. I get fascinated by these kind of tweaks, as they let me understand the underlying structure/code better.

I tried it, but somehow I couldn’t get my old users to work. I was also unable to access my 3rd-party applications - which I installed in /home/software, assuming I can always have them with me (I still think I’m right to assume). I will try your method next time I mess-up something (I’m sure I will, as that’s how I learn – mostly). So, I re-installed it completely.

I’m still interested in knowing tweaks/workarounds (if there are any) as an answer to my other questions.

Finally, @heynnema: Sorry, I don't have a check-mark icon next to your answer (see screenshot below). I’m also not sure if I should accept if I haven’t tried it (yet). However, I have up-voted (up-arrow) as I was able to do so.

@walttheboss: Sorry, I couldn't find a way to up-vote your answer.

Screenshot - No check-mark to accept answer

  • 1
    Good question and good documentation. I agree that it is nicest to have each OS in its own primary partition. BUT in reality I don't think it matters. Some older drives only allow so many primary partitions and therefore you have to do it that way. If you have an existing home partition and it is the same version (i.e. 18.04) then it is easy. Boot any way you want. Modify the file /etc/fstab to mount the home you want. Here is the line from mine. # /home was on /dev/sda6 during installation UUID=d04b53d9-1117-44b6-933b-dce48105bd16 /home ext4 defaults 0 2 – walttheboss Jul 5 at 22:45
  • If my answer is helpful, please remember to accept it by clicking on the checkmark icon that appears just to the left of my answer. Thanks! – heynnema Jul 6 at 12:13
  • Status please... – heynnema Jul 8 at 13:09
  • Status please... – heynnema Jul 12 at 16:28
  • Pls read the edit on 10-07-2020. It exceeded the word limits for comments. (I thought people would get an alert when there is an edit/change in question. Is that not right?). – v-lan Jul 13 at 13:44
1

You have a bit of a mess on your hands. Let me explain.

You have a smallish 500G HDD, formatted with a MBR style partition table. This kind of format can only have 4 partitions max. So they trick the system and usually have 3 primary partitions, and 1 extended partition that can hold a bunch of logical partitions.

When installing Ubuntu on a smallish disk, the mistake many new users make is to try and manually partition their disk during install. Bad idea... for a number of reasons. In your case, you've ended up only using 1/2 of your total available disk space. I recommend letting the Ubuntu installer partition the disk for you.

I assume that Ubuntu is your primary OS, and that Windows is your secondary OS.

You MUST backup your important data from the NTFS temp partition (as we'll be deleting that partition), AND the Ubuntu /home partition (as we'll be deleting that partition). Backing up important files from your Windows C: drive wouldn't hurt either.

Then boot to a Ubuntu Live DVD/USB, and deleting partitions sda5/6/7, doing a swapoff on sda8, then delete sda8, and finally sda3. Then reinstall Ubuntu, without manual partitioning, and using the "Install along side of Windows" option.

If you need to share files between Windows and Ubuntu, with little effort, later you can create a new NTFS partition for that. It would become the D: drive in Windows.

Much better long term results.

Update #1:

Since Windows is currently your primary OS, we have to consider if your existing C: drive has a large enough partition. If it IS large enough, then just perform the process I outline above. If your C: drive IS NOT large enough, then we should consider what to do about that now.

In the BEST scenario, you'd have backups of all of your important data, then we'd wipe the disk, reinstall Windows first, then boot to Windows and use Disk Management tools to shrink the C: partition to approximately 100-200G. Turn off Fast Boot in Windows, and turn off Secure Boot in your BIOS. Then install Ubuntu using the "Install along side Windows" option. Lastly, you'd restore your data to the Windows and Ubuntu partitions.

Later, if you wish to share files between Windows and Ubuntu, with little effort, an additional NTFS partition can be created for that.

| improve this answer | |
  • This is an excellent answer, and clearly explained. Listen to him. – user535733 Jul 6 at 0:05

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.