Dual Boot Installation Problem

Asked by Magelkyc

Hello, I am hoping to get this solved.

I am new to Ubuntu or any linux system for that matter so I want to do a dual boot so I can continue to use some of my windows programs. I installed Ubuntu on my daughters XP netbook because it was very slow and I heard linux isn't loaded down so much and is faster. I just did a complete install on my daughters machine and replaced windows and had no issues. My daughter loves it and from what i have seen, I like it too, so I want to get it on my machine.

So here is my problem. I have windows 7, and I have the live CD. I have no problem getting to the installation part but when it gets to the part where it asks if you want to install and replace windows, make your own allocation etc. it doesn't give me the option to run along side windows, it only gives me the two options of replaceing windows, or allocating space on my current hard drive. First of all, I am not sure why that is since every tutorial and instruction for installing shows the run along side windows option. So I thought ok, I will allocate space on my existing drive but when I select my C drive to free up space, it asks how much space for the partition but I don't know if that is how much space to leave for C or how much free space I want to take away from C. So I found another set of instructions that talked about freeing up space on an existing partition with windows disk managment and so I freed up 80 gigs but when I go back to the installation, it says the unallocated space is unusable. I can easily reallocate the 83 gigs back to my C drive if needed but I thoguht I would leave it until I get some help. So this is currently how I have my hard drive divided:

SYSTEM
(C:)
Unallocated
Revovery (D:)
HP_TOOLS

I have an HP if that makes any difference. I thought I read or saw on a YouTube video that there is a problem with a drive partitioned more than four times. I had thought about installing Ubuntu with the wubui application but the cons that I have read about this method don't sound appealing. Any help would be appreciated.

Curt

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Solved by:
Magelkyc
Solved:
Last query:
Last reply:
Revision history for this message
Magelkyc (magelkyc) said :
#1

After I posted this, I found some information on using G PARTED on the live CD. G Parted is much easier to use and I was able to partition easier and it did tell me that I can't have more than four partitions. Is there any way around this?

Curt

Revision history for this message
Chris (fabricator4) said :
#2

Yes, you can only have four _primary_ partition. If you make an extended partition that takes up all of the 80Gb of unallocated space you will be able to make as many partitions inside that as you need. Not you can't install the OS to an extended partition, you have to make some Linux partitions inside of that.

I recommend you make three partitions inside the extended partition: a / (called 'root") partition of about 20Gb for Ubuntu OS, a swap partition of at least the size of your RAM, and a partition that uses all of the rest of the drive for /home, which is where all your settings and files will be.

Set up these partitions with Gparted before you start the install - it's simpler as you found out.

You should also back up all your important data on the windows partition and make sure you have a copy of the Windows installation disks before you proceed. Sometimes bad things happen, and sometimes people hit the wrong button at the wrong time. It's good to be able to recover fully from something like that ;-)

One last thing you should do is boot off the LiveCD and make sure the OS works satisfactorily on your machine. You can start the install from this boot once you are happy to go ahead.

Once the installer gets to ask you how to proceed select manual partitioning.

Now, the 20Gb partition you should select as / (root, remember) and tell it to format the partition, and select ext4 as the format. The installer will now know that it must format the partition as ext4 and install the operating system on it.

The Swap partition should e selected as swap instead of ext4. No other parameter need to be set - Ubuntu will know what to do with this.

Re remaining large partition should be set as ext4 and set to format (this time only) and should also be set to mount as /home. Like setting /, this can be selected in the drop down menu when you are configuring the FS etc. The system will now know to use this partition as ext4 and use it as /home, which is where you Home directory will reside - where all your documents, photos, configuration etc will go.

One last thing you should do is down the bottom it should say that it will be install grub to /dev/sda. Verify that this is the case. This tells the installer to replace the Windows MBR with Grub so that you will get a choice of selecting Windows or Ubuntu at boot time. If you don't install grub it will leave the Windows MBR in place and all it will ever boot will be Windows.

You should now be able to proceed with the installation and enjoy your new OS.

You'll not that we made a separate /home partition and there's a very good reason for this. It's a highly recommend way of installing because no matter what happens on the / partition, your data is safe from this. So, for example if you want to install a new version, go back to an old one, or even try something completely different your /home is always safely on a different partition. The system could crash and burn horribly and all you'd have to do is re-install again and be up and running in 20 minutes. To do this just specify the partition as /home again, but do NOT tell it to format the partition. ;-)

Chris

Revision history for this message
Magelkyc (magelkyc) said :
#3

Chris,

Thanks for replying. I understood what you were saying except with the partition part. I think I need a little more clarification. I understand that I can only have four primary partitions per hard drive. I understand that I can have one of those four partitions as an extended partition. I put my partitions back to what they were from the factory and this is how my hard drive is partitioned and this is what it says under status in my disk management.

(C:) - boot, page file, crash dump, primary partition - 194 GB free space
HP_TOOLS - Primary Partition - 89 MB free space
RECOVERY (D:) - Primary Partition - 2.36 GB free space
SYSTEM - System, Active, Primary Partition - 165 MB free space

How do I know which is an extended partition? Do I have an extended partition? If I don't, do I need to reformat one of these partitions into an extended partition? Maybe I am not grasping what an extended partition is?

Revision history for this message
Chris (fabricator4) said :
#4

>How do I know which is an extended partition? Do I have an extended partition? If I don't, do I need to reformat one of these partitions into an extended partition? Maybe I am not grasping what an extended partition is?

Yes, you need to change one of the existing partitions to and extended partition. I'm not seeing the 80 GB of unallocated space you were talking about. Is this separate to the four partitions you have listed?

If so, then yes you'll have to delete one of them, at that makes four primary partition. You should probably make sure your data is backed up at this point. A mistake here can be a lot of trouble or even impossible to fix.

1) Get into Gparted as you have done previously.

2) Delete the primary partition than you intend to put the logical partitions onto (logical partitions are usable partitions other than primary partition)

3) Make an extended partition that takes up _all_ of the free space that you want to use for this purpose. This is not a partition that you can put an OS onto, but simply a place where you can make several logical partitions.

4) Create the logical partitions as discussed previously.

Once you follow this in Gparted you'll find that it's quite simple and "logical" if you'll 'scuse the pun ;-)

If you want to see how Unbunt/Linux sees the partitions you can use the fdisk command:

sudo fdisk -l

This simply lists the drives that it finds and the partitions on them. So, for example if you have one hard drive in the system it will normally be device /dev/sda. The partitions you will probably see on it will be /dev/sda1, sda2, sda3, and sda4. It's important to have some ideas what your partitions are called as it can help when you are doing the install. Both Gparted and the installer will refer to the partitions in this way, as well as showing the size.

The extended partition will also get a device name, normally the next one available. To give you some idea, here's the result of fdisk on my machine:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2940 23614526 83 Linux
/dev/sda2 2941 9730 54534020 5 Extended
/dev/sda5 9187 9730 4358144 82 Linux swap / Solaris
/dev/sda6 2941 6201 26193919+ 83 Linux
/dev/sda7 6202 9186 23976981 83 Linux

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
D vice Boot Start End Blocks Id System
/dev/sdb1 * 1 24053 193205691 83 Linux

I've delete some of the disk information as being irrelevant to this discussion. You'll see I have to physical drives in the machine, /dev/sda is 80Gb and is listed first. /dev/sdb is 200Gb and is the secondary drive

Look first at /dev/sdb: It has only one partition, is a bootable active device, takes up the whole drive. There are no extended partitions. This partition mounts as my /home, so I have 200 GB to put data and other files in.

Now look at /dev/sda: It's not quite so clear, but you can see that there is only one primary partition: the one that is labelled sda1 and is marked as a boot device. Look at the start and end blocks: you'll see that the ranged used is unique to this partition as you'd expect of a primary partition. You'll also see that it's marked as a Linux partition.

The next partition on this drive is an extended one. If you look at the start/end blocks you'll see that it starts after the primary partitions ends. It is called sda2 and you'll also see that it goes right to the end of the physical drive.

The other partitions are all logical partitions because they exist inside the start/end of the extended partition.

sda5 is my swap partition, it's 4GB in size.

sda6 and sda7 are both Linux boot partitions. (Why two extra boot partitions I hear you cry!) Simple, I like to play with other releases of the Ubuntu: sda6 is used to boot the latest alpha and beta versions of Ubuntu, while sda7 currently has the latest stable Redhat Linux on it - I wanted to try out the Gnome3 desktop environment.

I hope this makes things clearer. Perhaps I've given too much information but it's pretty hard to describe in just a text based medium.

Chris

Revision history for this message
Magelkyc (magelkyc) said :
#5

Chris,

I think I understand what you said. I just have one more question. If I delete one of the primary partitions on my drive and make it an extended partition to make room for Linux, will it delete the data on that partition? For example, the partition that I want to make an extended partition is my C: drive. If deleting that partition looses all of my data on that partition, then I might as well reformate my whole drive and repartition the whole thing differently.

If this is the case, I might just try installing Ubuntu via the wubui application and play with it that way for awhile until I feel that I really want to go to that extra trouble. Like I said, I am new to this Linux thing and I am not sure how much I want to commit. i think it is retarded that HP used up all of the primary partitions with it's factory install; it makes it a lot harder for novices like me to play around with other operating systems. I guess I could look at getting windows 7 disk and getting rid of the HP stuff on my drive and then it would free up partitions.

I appreciate the info you have given so far, I am learning a lot.

Curt

Revision history for this message
delance (olivier-delance) said :
#6

If you want to use Wubi, contact https://launchpad.net/~bcbc to get advices.

Revision history for this message
Chris (fabricator4) said :
#7

Hi, yes you could use Wubi to try out Ubuntu. It's not a bad way really, however it does have a few quirks. Because it's running out of a virtualised drive, which is slightly slower, and it's a bit more "all eggs in one basket". When I tried it out on my laptop it got broken two or three times with updates to the wubi loader. I'd hope that was no longer the case. I managed to always get it going again but sometimes the fix was non-trivial. It did kind of sour me on the Wubi concept but it's still the most hassle free way of getting Ubuntu without making large changes to the hard drive.

It's odd that HP used so many partitions, and didn't make a single extended partition to put some of them on. Looking at it again it seems really strange the way it's been set up. There's 194GB of free space on the drive but it's not usable, or it doesn't seem so.

BTW the "recovery" partition probably has the installation stuff for windows. See if there's a HP utility that will burn the installation CD for you. Once you have that you'd be able to do anything you want to to the system.

BTW, a word of warning regarding the recovery partition: It will show up in the grub boot loader as a windows partition after you've installed Ubuntu. Its very important that you do NOT boot the recovery partition this way - Oh it will boot, but one of the first things it will probably do when booted into the recover menu is to overwrite the MBR with the windows boot manager again - you'll lose grub and the ability to boot into Ubuntu. It's fixable, but a real pain.

Personally, I'd still be looking for a way of backing up the data and taking at least one of those partitions back ;-)

Chris

Revision history for this message
Magelkyc (magelkyc) said :
#8

Thanks for all your help Chris, I appriciate it. I think I have enough information to make an informed decision.

Curt