Hard disk partition for Ubuntu installation

Solved
agas18 Posted messages 6 Status Membre -  
 Anonymous user -
Hello,

I would like to install Ubuntu on my computer in dual boot with Windows 7. I followed a tutorial online. However, I am encountering a small problem during partitioning: I already have 4 existing partitions on my hard drive, and all are more or less used.
Here’s what it looks like:

-/dev/sda1 ntfs 69/208 mb used Windows 7 (loader)
-/dev/sda2 ntfs 48 667/479 112 mb used Windows 7 (loader)
-/dev/sda3 ntfs 147 17/16 524 mb used Windows recovery Environment (loader)
-/dev/sda4 fat32 3 096/4 260 mb used (nothing)

I don’t know what these partitions correspond to, and I’m not sure what to do, whether I should delete one or not! I would prefer to have the opinion of someone who knows better than I do.
Thank you in advance for your responses

Configuration: Windows 7 / Safari 535.7

9 réponses

cecim Posted messages 3582 Registration date   Status Membre Last intervention   576
 
Delete sd4! So it means losing the specific HP tools, but well, they might not be of much use anyway.

For partitioning, I have always foolishly followed the installation CD and there are few choices. I'm not a professional computer scientist, even though I've fiddled with CPM and MSDOS systems and learned several languages from a prehistoric era.

I only vaguely follow developments for my personal needs. I gather useful information online (especially on forums) and I return the favor if I can. Here are two that seem sensible to me:
- Create 2 not too large partitions for Windows and Linux intended only for applications and a few specific documents (downloads, incompatible ones...). Plan large anyway if there are many. And a large NTFS partition for data easily accessible to both systems (that's probably what you want to do).
- I have never managed to reinstall Windows (even with a CD) after a hard drive crash without the help of powerful Linux applications, so I think that sda3 is unnecessary and it's better to find an installation CD or make one. Certain manufacturers offer an application that saves the state of the hard drive on DVD to reinstall Windows in case of a crash. Effective on a Vista that goes haywire, but a long process and without guarantee. But for such a capricious system, maybe having an additional means is not useless (to be verified).
2
jns55
 
Yes, but the problem is that there are already 4 primary partitions. How can I create new partitions? I don't see how that would be possible without deleting one of the primary partitions!
0
cecim Posted messages 3582 Registration date   Status Membre Last intervention   576
 
The Linux installation CD will take care of that; I don't know exactly how it works, but it does, without erasing Windows or anything else...
The trick is to compress Windows 7 at the beginning of the partition (defragmentation) and create a new EXT4 partition for Linux on the existing one, but towards the end to avoid touching Windows 7.
Well, with a diagram, it’s easier to explain, but on the Linux CDs I've used, everything is done in graphical mode; you "see" what you’re doing, which is quite handy, and in case of doubt, you can go back as many times as you want until you start the installation.
0
jns55
 
You can have a maximum of 4 primary partitions on a hard drive, this rule is unavoidable. If this number is reached, and it is the case, the Linux installer cannot deviate from this and will block. I assume (I hope) that it will send an appropriate error message.
You cannot create a logical partition on an existing primary partition; this operation is only possible on an extended partition. And you can only create an extended partition if there are fewer than 4 existing primary partitions! That’s why I say that one of the primary partitions must be deleted in order to create an extended partition.

The partitioning tool included on the installation CD is none other than gparted, and it refuses to create a new partition when the limit is reached, and that is normal.

As for automatic partitioning, if it seems very convenient for those who are scared of partitioning, it does not excel in keeping things tidy on a drive by creating logical partitions left and right and of all sizes, but I also doubt that it will manage to get out of this situation.
0
agas18 Posted messages 6 Status Membre
 
At the risk of repeating myself, I had already defragmented the hard drive, so Windows was already compacted in its corner.
0
Anonymous user
 
Re,

The relationship between defragmentation and compacting is not clear. Your W7 necessarily uses 2 partitions (sda1 and sda2). The sda3 is the recovery (which is better left intact). You have sda4 left and that’s it (goodbye HP tools). I don’t see where the problem is. You need to install your Linux in an extended partition on that one.

We’re repeating ourselves a bit as well, here.
I refer you to this post: https://forums.commentcamarche.net/forum/affich-24224148-partition-disque-dur-installation-ubuntu#9
0
cecim Posted messages 3582 Registration date   Status Membre Last intervention   576
 
Hello, I will try to be a bit more specific because limiting to 4GB on sda4 for Linux is scant.
sda3 is off-limits: it’s the backup of Win7 in case of a crash.
sda1 I’m stuck, it’s small so we’ll leave it alone.
sda2 has 479 GB allocated to W7 but only 48 GB used (10%), so not much really.

First of all, for safety, defragment W7. In clear terms, this moves all files to the beginning of the partition, which avoids deleting data with the subsequent operations, and joyfully, it also improves the performance of W7 at the same time. Then we allocate the end of this partition to Linux, but rather at least a hundred GB. And we install it on there; ideally, it should know how to choose it by itself as it is of type ext2 or 3 or 4.
W7 is disturbed on the first restart because it sees that the disk no longer has the same size, as if there were defective sectors, so it performs a check and then everything goes back to normal, no panic.

Oh, I almost forgot the swap; we place it on the 4GB of sda4 while carefully moving the data elsewhere if they're not needed, otherwise cutting a bit more from W7’s space.
1
jns55
 
Good evening,
You have 4 primary partitions, you can no longer create a new partition...
The only solution: delete a partition (I suggest sda4, see what it contains) to replace it with an extended partition and then create logical partitions within the extended partition.
0
agas18 Posted messages 6 Status Membre
 
Hello,

Cecim -> I have already defragmented.
I will delete sda4, which was a location named "HP_TOOLS". Can I put a swap in a logical partition? And also a shared folder to put my personal documents?
0
le druide Posted messages 40644 Registration date   Status Contributeur Last intervention   6 616
 
For someone who wants to get started with Linux, it's better to prepare the ground first under Windows; you'll be more at ease.

Under Windows, install Easeus Partition Master, reduce the space on the partition > -/dev/sda2 ntfs 48 667/479 112 mb used Windows 7 (loader), then you will have unallocated space where you can install Linux.

I'm leaving the choice of the size of this partition to you, but it needs to be at least 20GB. In any case, this is a temporary Linux setup; you'll do like many others and abandon it after a few days...

--

the druid without the potion.
0
cecim Posted messages 3582 Registration date   Status Membre Last intervention   576
 
Why discourage a young citizen full of good intentions?
I wonder what an anti-Linux user is doing on this forum. Do you have any dealings with Bilou?

As for me, Linux is a dream (A Mac at a low price), and every time I turn it on it's a joy. I even had a version capable of competing with a MacBook Air: under 15 seconds to boot and 3 seconds to shut down. In between, on as many virtual desktops as I want, calculations running on one while I work on another, etc., without any slowdowns and especially without crashing.
There are very few software applications for which I can't find an equivalent on Linux (but I do relatively uncommon tasks), so I can't do without Windows to my great dismay. Otherwise, none of my computers would contain that OS. Now Mac OS bothers me less and less as more and more applications are cross-platform.
I hope my computer scientist friends will overcome these shortcomings, but according to them, it's quite a lengthy job.

Otherwise, Linux has always managed to revive old machines that Windows was unable to restart. Even if we donate them because we need a high-performance machine, it's not completely useless.
0
le druide Posted messages 40644 Registration date   Status Contributeur Last intervention   6 616
 
I have no shares in Bilou; this is just an observation that I want to bring to the attention of many internet users who are embarking on a dual-boot Linux installation.

A few days later, they come back to CCM to ask how to remove Linux, sometimes at the risk of losing their factory-installed system on brand-name PCs. There are solutions to try it out without installing it, so why not take advantage of that...

For me, Linux is very good, but with some constraints regarding certain peripherals.

As for recycling, a file server, for example on an old PC with Freenas, is top-notch! After that, I don't see the point in installing Linux on an old PC for multimedia use. Regardless of the system installed on it, it will not provide any comfort of use.

Conclusion:

Linux (apart from servers, which are its strong point) for the web, office work, fine! The downsides: Too many free version software for Windows are not available for Mac-os and Linux.

Mac-os is too expensive for family use; otherwise, it remains a very efficient and solid system, with its comfort and ease of use.

Windows is what it is and will always be the most used system, compatible with a large number of software and peripherals.
0
jns55
 
And what if we went back to the initial question? Our friend wants to install Linux, it's his right and what he does with it afterwards is his problem. We are only supposed to help him manage his partitions so he can do it.
0
le druide Posted messages 40644 Registration date   Status Contributeur Last intervention   6 616
 
0
jns55
 
"On Windows, install EaseUS Partition Master, shrink the space on the partition > -/dev/sda2 ntfs 48 667/479 112 mb used Windows 7 (loader) then you will have unallocated space where you can install Linux.


Alright, but how do you install Linux on the unallocated space (therefore unusable)?
I guess you create a partition, but how do you create a partition when the limit of 4 primary partitions is reached? Whether it is Windows or Linux, this limitation is the same and is not bypassable! If it can be bypassed, I would like someone to explain how!
Conclusion?"
0
Anonymous user
 
Good evening,

You can turn the problem around in every way, you're stuck (jns55 is 100% right): you need to delete a partition (either sd3 and lose the recovery = not great, or sd4 and lose the HP tools = not so good). You can see how they artificially "lock" a PC to a single operating system. Once you've made your choice, you create an extended partition and put whatever you want in there.

Other solutions:

- wubi (you install Ubuntu under Windows, like a program). I don't like it, but whatever.

- A Linux under virtualbox. If the PC is powerful enough, no problem.

- Another HDD alongside the first.
0
cecim Posted messages 3582 Registration date   Status Membre Last intervention   576
 
There is also the Linux USB drive, I tried it on a Netbook. It was a bit slow, but I believe it was because the system was compressed; since there is no CD drive, I installed it from the USB without any issues.
0
agas18 Posted messages 6 Status Membre
 
Sorry, running Ubuntu as an emulator seems a bit messy to me, I wasn't interested in that.
0
DDOS
 
The solution is simple, you just need to change one of your primary partitions to logical [Easily doable on Windows, but if you can't do it, let me know and I'll help you]. I would still recommend changing a partition that you don't really need (or need the least). Then you can create a new primary partition [that you won't format on Windows = ) ] where you can install your Linux.

There you go, and keep us updated.
0
jns55
 
Hello,
Can you explain how to convert a primary partition into an extended partition in Windows without losing the data on it? I am very interested in this and I believe I'm not the only one.
One remark: you made a slip-up: in an extended partition, you can't create a primary partition, only one (or more) logical partition(s).
0
Anonymous user
 
I am also interested in the conversion manipulation from primary to logic without formatting.
0
agas18 Posted messages 6 Status Membre
 
Thank you for your numerous responses.
I finally removed an HP partition (to which I went to complain about already occupying the 4 available partitions). I installed a primary partition for Ubuntu and the swap in logical.

The rest of the installation went smoothly! =) Thank you all
0
DDOS
 
I think I poorly worded my first response. You cannot convert a partition without formatting it. I meant more to back it up to a second partition for recovery after conversion.
Nevertheless, for your case, I suggest this solution which is more suited to your situation:

First, right-click on Computer under Windows 7 and then click on Manage.
Then click on Disk Management where you will find all your partitions. You will find this:
/dev/sda1 ntfs 69/208 mb used Windows 7 (loader)
/dev/sda2 ntfs 48 667/479 112 mb used Windows 7 (loader)
/dev/sda3 ntfs 147 17/16 524 mb used Windows recovery Environment (loader)
/dev/sda4 fat32 3 096/4 260 mb used (none)

(Although displayed differently since it's on Windows)

Right-click on your partition sda4 and choose 'Delete Volume' to have unallocated space.

Then right-click on the C partition of your PC and click 'Shrink Volume', you will choose the volume you want to shrink (to install your Linux). It should be noted that this volume will be added to the 'sda4' partition that you just deleted. All this to ultimately have an 'unallocated' space with the volume you wanted for your Linux.

At this stage, there is nothing more to do on Windows, restart your PC with Linux and follow the installation program by choosing the space you just freed (sda4 normally).
There you go, and keep us updated.
0