Linux-Noob Forums

Full Version: Install Linux alongside 2 windows installations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4

Hello Linux-Noobs!

 

Firstly thanks for having this website up and running, provided some very essential reading for a first time Linux user like me.

 

Getting down to business... I would class myself as an Intermediate/Advanced user of Windows systems (Home Admin). My family have all been using Windows XP since its release, and now Windows 7 has been introduced. I see this as the perfect opportunity to introduce Linux into the mix. However I am having some issues.

 

The HDD's:

 

Hard Disk 1 150gb (4 Paritions) [Disk 0]

Hard Disk 2 150gb (2 Paritions) [Disk 1]

 

The Partitions:

 



Code:
Disk 0:

(primary)      30GB   FAT32     WINDOWS-XP
(primary)      90GB   NTFS      WINDOWS-7
(primary)      10GB   EXT3      LINUXROOT
(logical)      20GB   EXT3      LINUXHOME

Disk 1:

(primary)      145GB  NTFS     HDD-STORAGE
(primary)      2GB    SWAP




 

The problem:

 

The problem is, I cannot get Kubuntu 10 to install. I can get both Windows installs to run fine, dual boot etc. When I install Kubuntu it messes up the boot and doesn't let me load Windows. It gave me a Hal.dll error. I have been formatting, partitioning, installing, re-formatting for the past 2 days trying to get an order which will work. I believe I needed to install XP first, then Windows 7, then Kubuntu 10, if I have the order wrong please tell me. Something about Windows 7 writing to the MBR I think it was.

 

I would say I am almost there, I have all the partitions setup, all the installs, everything burned to discs. Just need some Linux install experience please guys/girls.

 

Notes:

 

PS, Is it too hard to have all 3 (multi-boot)? Like:

 

1. Windows XP

2. Windows 7

3. Kubuntu 10

 

Also, I have tried and tested each one individually to make sure the discs are ok and installs are ok, they all work fine on their own.

 

Also, before I get flamed for putting a SWAP on a separate HDD I was told it would be a good idea as the HDD head on disk0 doesn't have to move around as much, also I would be able to read/write simultaneously? Slightly better performance?

 

Somebody, anybody?

 

EDIT: Attached a screen dump of Disk Management window.

 

Disk Management Screen Dump


Quote:I believe I needed to install XP first, then Windows 7, then Kubuntu 10, if I have the order wrong please tell me. Something about Windows 7 writing to the MBR I think it was.
that would be the order I would attempt them too - the general feeling tends to be:

"install all the windows stuff in ascending chronological order" (Later versions of Windows are earlier-aware, but not the other way around) followed by

"install Linux stuff after" (Linux stuff is Windows-aware; Windows tends to be Linux-denial).

 

After the Windows 7 part, it may help to take a ganders at your boot.ini and make a note of what it looks like - since you'll need to add these entries into your GRUB config file.

 

Can you also build a recovery disk for the windows partitions? Just thinking: if you trash the MBR with a bad GRUB config, is there some way to recover the MBR in such a way that you can get back to the dual-boot windows?

Quote:Also, before I get flamed for putting a SWAP on a separate HDD I was told it would be a good idea as the HDD head on disk0 doesn't have to move around as much, also I would be able to read/write simultaneously? Slightly better performance?[/i]
This is correct, unless disk0 and disk1 are on the same controller (master+slave) in which case there will be bus contention anyway. Using separate disks just spreads the loads, but with today's SATA speeds and cost of RAM falling, I don't think it'll make much difference. It's a simple matter to move it around in Linux anyway - it's just a disk partition.


Hello Dungeon-Dave!

 

Thank you for your reply. I have had a look at the XP boot.ini and it is quite unexciting. It is just telling me it's loading WINDOWS from Partition 1 on Disk0. The reason I put XP on the beginning is that I read somewhere Windows prefers to be close to the boot sector. Also, yes Linux is starting to seem more attractive to me. It's so much more "System Friendly" then I would say Windows is.

 

Windows XP boot.ini:

 



Code:
;
;Warning: Boot.ini is used on Windows XP and earlier operating systems.
;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.
;
[boot loader]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT




 

I do believe however that Windows 7 is managing the bootloader entries. I have found an image on the web which is what I see. Obviously replace "Microsoft Windows Vista" with "Windows 7" but that is pretty much what I see when booting up.

 

--> Image on the web <---

 

Also since reading your reply, I have stumbled across (see line 3 of boot.ini) this page about windows 7 boot loader. That page also mentions that the tool will let me modify the GRUB bootloader?

 

Short Questions:

 



<ol style="list-style-type:decimal;">[*]Have I organized and formatted the partitions correctly?

[*]If something goes wrong, will I still be ok to format everything and start again?

</ol>

 

Longer Question:

 



<ol style="list-style-type:decimal;">[*]When I run the Kubuntu CD from within windows, it will only allow me to install it on a Win partition. If I reboot with the CD will it give me the option to install it on a Non-Win partition?
</ol>

 

All I want to do is install Kubuntu using the 3 partitions I've made (Home, Root, Swap) and not have it harm the Windows installations. I understand that this comment is funny, seeing as how Windows is the only one doing the harming but I am pretty sure you understand my concern. The windows installations are being used, I want to create a SMOOTH transition to Linux for everyone.

 

Thanks for your first reply, hopefully not the last!


Hi there! Welcome to the forums. :)

 

I've tried to reproduce your partitioning situation in a virtual machine, so I can go through the Kubuntu installer myself and see what options I would pick in the same situation.

 

Just before I run through that walkthrough of how I would approach this install, here is how I would set up the bootloaders in your situation (I actually have a triple-boot Linux, Windows Vista and Windows XP machine, so I have achieved this is a slightly different, but similar setting).

 

Linux leaves the Windows bootloaders completely alone. Instead, it installs its boot loader before the Windows bootloader. So what you will have if you want to follow my walkthrough is this:

 


  • First bootloader -- select either Kubuntu Linux or Windows

  • If you selected Kubuntu Linux, that boots straight away

  • If you select Windows, you then enter the Windows bootloader and select either Windows 7 or Windows XP.


 

This is often called 'chainloading'. The Linux bootloader only knows enough to boot the Windows bootloader, which is then responsible for picking the right copy of Windows and booting that.

 

With that in mind, here is my walkthrough for what I would do to make this a reality.

 

First of all, if you run the Windows application on the Kubuntu CD from within Windows, that will always offer to install Kubuntu alongside Windows, on the same partition (it's a technology called Wubi and it's great, but not what you want to do here).

 

So you absolutely do need to reboot the PC and boot it directly from the CD to enter the 'real' Kubuntu installer.

 

<a class="ipsAttachLink ipsAttachLink_image" href="<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772731218283.png" data-fileid="1270">[img]<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772731218283.png[/img]</a>

 

At this screen, I recommend you choose Try Kubuntu without installing. As counterintuitive as that sounds, you can still run the installer fine from this mode and it gives you the flexibility of loading a complete desktop session so you can use any other programs on the Kubuntu disc you might need before or after the installer is run. Now, you have to wait while the OS boots from CD and the full desktop session is finished loading.

 

Once the desktop arrives, click the Install Kubuntu 10.04 shortcut on the desktop.

 

Go through the Language, Timezone and Keyboard stages of the installer as you would normally.

 

When you get to Disk Setup, the installer will offer one or more automatic choices, including Erase and use the entire disk and possibly some other options (which might even sound like they are the 'right' options). I suggest that whatever comes up, you choose Specify partitions manually - Advanced since your setup is more complicated.

 

The Prepare partitions screen is now a lot like Disk Management in Windows, it's just some of the terminology and notation is different. On my VM simulating your disk layout, this is what I see. I hope this should mostly match up with the choices you get (I only cheated the sizes on disk 2 to save myself space, and obviously there's no data on my VM!):

 

<a class="ipsAttachLink ipsAttachLink_image" href="<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772738670583.jpg" data-fileid="1271">[img]<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772738670583.jpg[/img]</a>

 

What you need to now is instruct the installer to use each partition that you want your new installation to make use of, and leave the other ones alone. Notice the /dev/sdxy layout. x is a letter denoting which physical disk this is referring to, and y is the partition number. Notice how it jumps from sda3 (third primary partition on disk a) to sda5 (first logical drive on disk a), as logical drives are numbered from 5.

 

First, click the entry for /dev/sda3, which is your LINUXROOT partition. Click Change and choose Ext3 journalling file system under Use as (you could also use the newer Ext4 and there are a multitude of other filesystems you can use, but Ext3 is perfectly adequate and very stable). Tick the box to format the partition (of course, making sure there's nothing on that partition you want to save!)

 

Because this is your LINUXROOT, the mount point should be /. Click OK.

 

<a class="ipsAttachLink ipsAttachLink_image" href="<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772741953012.png" data-fileid="1272">[img]<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772741953012.png[/img]</a>

 

The mount point of / should now show up in the table.

 

Now address /dev/sda5 in the same way, clicking on it and choosing Change. Once again, I'd recommend Ext3 Journalling. Set the mount point manually to /home and, again, choose the box to format the partition if that's appropriate.

 

The Linux swap partition can probably be left as is; Kubuntu should intelligently make use of any swap that is available once it is running, so if the Linux swap partition is already formatted as swap, you can leave that.

 

Verify that none of your Windows partitions have a mount point or are set to be formatted (you can configure access to your Windows data from within Linux later). Here's what my table now looks like:

 

<a class="ipsAttachLink ipsAttachLink_image" href="<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772746066124.jpg" data-fileid="1273">[img]<fileStore.core_Attachment>/monthly_06_2010/post-1019-12772746066124.jpg[/img]</a>

 

Double and triple check that you're happy with what you're formatting, then go ahead and move Forward in the installer. Finish up the installer by going through the User Info screen as normal.

 

On the Summary screen, you will get a final summary of the partitioning changes. There's also an Advanced button allowing you more control over the Linux bootloader install, but that should be left as is if you want the setup I described earlier. Once you click Install, the deeds will be done.

 

Once Kubuntu is installed, on rebooting the computer you will get the Linux bootloader coming up straight away. Windows should have been auto-detected and added as an option to that menu. Choosing that should chainload the Windows bootloader as I explained earlier. Unfortunately, without replicating your setup exactly, I can't be 100% sure this will work, but if the worst comes to the worst...

 

Rolling back if it all breaks

 

You should obviously have a backup of everything before doing any of this. That goes without saying when you're modifying partitions, just in case you slip up.

 

If something goes unexpectedly wrong during the Linux install with bootloading and you can't get into Windows, you should be able to fix Windows booting by following this tutorial (using the /ALL option).

 

Once you've got Windows back, you can still use your computer ;) and you can then regroup, find out what didn't work and try fixing Linux booting if you want to.


Hi Dungeon-Dave and Hybrid!

 

Thanks for your reply Hybrid. I am now in Linux running it off the CD. I have completed the installation (took less then 10 minutes, impressive).

 

I can verify that Kubuntu has autodetected the Windows 7 loader.

 

Problem:

 

I am not able to boot into my Linux installation. When I do it gives me:

(note: I am able to boot into XP and 7)

 



Code:
error: file not found.
error: you need to load the kernel first.

Press any key to continue...




 

I have a strong feeling now all the installs are working (XP, 7, Kubuntu) however I believe it is the boot settings. If you think i'm wrong please tell me, I am still new to all this after all. I done a sudo fdisk -lu while running off the CD. Output is as follows:

 



Code:
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    61577144    30788541    c  W95 FAT32 (LBA)
/dev/sda2       266454090   312560639    23053275    f  W95 Ext'd (LBA)
/dev/sda3        61577145   245971214    92197035    7  HPFS/NTFS
/dev/sda4       245971215   266454089    10241437+  83  Linux
/dev/sda5       266454153   312560639    23053243+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000001

  Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   308367674   154183806    7  HPFS/NTFS
/dev/sdb2       308367675   312576704     2104515   82  Linux swap / Solaris




 

One thing in particular caught my eye here, /dev/sda1 is marked as Boot with a * do you think that is why Linux is saying there is no kernel present at the time of boot? Would this * indicate that the XP partition is the Active partition, or is it just marked with * because it is sda1?

 

Summary:

 

My system is setup as follows now:

 

1. Windows XP installed and working

2. Windows 7 installed and working

3. Kubuntu installed (not working, but running from LiveCD)

 

I have the feeling the race is over, I just need to cross the finish line with this one. Any further assistance would be really appreciated. I do appreciate the time you've taken to help me out so far!

 

Thanks!

 

EDIT: I do not want to change the Active Partition unless I know 100% it will work, I read somewhere if you change your AP, while your system isn't setup properly you could cause some problems. I'm checking the GRUB.cfg file, seems fine. The only thing I can think it could be is the XP Partition set as Boot, but I could be wrong and it might need to be setup like that.

 

EDIT again, my GRUB.cfg:

 



Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
   saved_entry=${chosen}
   save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 00000000-0000-0000-0000-000000000000
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
   # For backward compatibility with versions of terminal.mod that don't
   # understand terminal_output
   terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 00000000-0000-0000-0000-000000000000
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 00000000-0000-0000-0000-000000000000
linux    /boot/vmlinuz-2.6.32-21-generic root=/dev/sda4 ro   quiet splash
initrd    /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 00000000-0000-0000-0000-000000000000
echo    'Loading Linux 2.6.32-21-generic ...'
linux    /boot/vmlinuz-2.6.32-21-generic root=/dev/sda4 ro single
echo    'Loading initial ramdisk ...'
initrd    /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 00000000-0000-0000-0000-000000000000
linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 00000000-0000-0000-0000-000000000000
linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 9c81-cc68
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###




 

Do you think perhaps it could be all the 000000000000000's at menuentry 'Ubuntu, with Linux 2.6.32-21-generic' ?


I don't think this is an issue with active partitions. If you are getting to the Kubuntu boot loader fine, then that should be all that matters there. We now need to get that to actually do its job properly.

 

What options do you get on that first boot menu and which one are you choosing to enter Kubuntu?

 

(This issue might possibly be a bug -- see https://bugs.launchpad.net/ubuntu/+sourc...ug/387326. It is certainly something that shouldn't be happening, but something that other people have reported using Wubi. I presume you're sure you haven't installed Kubuntu inside Windows this time!).


Do you see any references to hd(0) in grub.cfg? All references to hd(0) should now be references to hd(1), I believe, with the new GRUB 2 software that is in 10.04. I'd be hestitant to change this manually if you do notice it, because I'm not sure yet, but if you do see that, it may explain the issue.

 

EDIT: forget that, I'm confusing disk numbers with partition numbers. hd(0) is right. Don't heed the above advice.


Quote:Do you think perhaps it could be all the 000000000000000's at menuentry 'Ubuntu, with Linux 2.6.32-21-generic' ?
 

This could well be the issue. I'm thinking it might also be the lines:

 



Code:
set root='(hd0,4)'




 

Since we don't have much to lose -- Kubuntu isn't booting anyway, what happens if you change the instance of set root='(hd0,4)' under the top Ubuntu menu entry to:

 



Code:
set root='(hd0,3)'




 

I have a feeling the bootloader is looking for the Kubuntu OS on the wrong partition.


Hello Hybrid!

 

Thanks for your quick reply. The install was done from within Linux. Also, I am pretty sure hd0,3 is My windows 7 partition. If I set this to root, are you sure it wont Write anything to the Win7 partition? I will edit the cfg and reboot as soon as I get a response about the Write question.

 

Thanks again!

EDIT: Let me just try and change it to hd0,3 and reboot. Be back in a second :)


I'm not sure we should mess with the configuration file like that actually, so perhaps we should look to a different method.

 

Boot from the live CD, and try following the Method 3 - Chroot instructions under Reinstalling GRUB on the Ubuntu wiki. Your normal system partition in this case is /dev/sda3, the correct device is /dev/sda and make sure you run the update-grub step at the right point in those instructions.

 

If all goes well, that should recreate the configuration file with the right settings and make the thing boot. It also shouldn't affect any of your Windows stuff; it is only doing the same things that happened during install.

 

Let us know how that goes!

Pages: 1 2 3 4