LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   dual booting XP and ubuntu with ubuntu being installed first (https://www.linuxquestions.org/questions/linux-general-1/dual-booting-xp-and-ubuntu-with-ubuntu-being-installed-first-516062/)

kajangmarc 01-03-2007 09:28 PM

dual booting XP and ubuntu with ubuntu being installed first
 
I have a problem that apparently many dont have. I have just been baptised into the linux religion and abandoned windows. Then my programming lecturer tells us we're learning Visual Basic 6 so i need to install xp again. I told him i'd use Gambas instead of VB but he refused. So here's the problem:

Running Ubuntu Edgy on 40GB HDD without partitions, ext3 runs till the end of the drive.i want to go 50-50 and resize my ubuntu installation to 20GB then give 20Gb to XP. First step i know is to resize ubuntu which i tried with gparted and qtparted but realised that it wont resize (option to resize is grayed out). I've read up and some say that i need to use the liveCD somehow and it'll work. how do i use the livecd? do you mean click install then partition using the dialog that we faced when installing ubuntu from the livecd in the first place? Is there a better way?... I also know that if thats succesful installing windows on the extra space might destroy grub and i need super grub... i've already got the supergrubCD but what do i do with it?... Any guidance on that?... Pls help this newcomer linux newbie.

kajangmarc 01-04-2007 05:15 AM

GRUB problem
 
I finally managed it... I used my UBUNTU livecd to resize my ext3 using gparted from the system menu. I installed windows and now i have both OS's running. But i still have one problem:

After installing windows it destroyed grub on the MBR. Thats normal. So i fixed grub with the SuperGrubDisk. After that i could boot ubuntu. then i realised it only boots ubuntu! I couldn't get a grub menu that had both XP and ubuntu boot options. So i used SuperGrubDisk again to fix windows bootloader. This time i could only boot XP and not Ubuntu. I can do this continuously to boot either XP or ubuntu but i can never get a menu with both. How do i solve this?

saikee 01-04-2007 05:52 AM

I don't believe this.

Next time when you are in Ubuntu add these lines to its /boot/grub/menu.lst
Code:

title My windows
root (hd0,2)
chainloader +1

if you have installed Windows in the 3rd partition as I speculate you need a swap and a partition for Ubuntu before XP was installed. Grub counts from 0.

If you don't know where is XP then at the Ubuntu's Grub boot screen press "c" to drop into a Grub prompt. You then shout at Grub's face "Show the partition layout of my first hard disk (hd0)" by command
Code:

geometry (hd0)
the xp should use a ntfs partition which is the one with Type 0x7. Unbuntu should have a Type 0x83 while the swap is always 0x82. You can fire up XP manually , say it is in the partition (hd0,2) as predicted, at a Grub prompt, just type
Code:

root (hd0,2)
chainloader +1
boot

You can boot any system manually in a Grub prompt. The difference of it from menu.lst if your drop the "title" statement and add the "boot" statement at the end.

Remeber there is no PC system that a Grub prompt cannot boot!

registering 01-04-2007 06:42 AM

I recommend you also look at VMWare server. That way you can run Windows natively in Linux as a virtual machine. That's what I do, and it's much nicer than my old dual-boot option, as both OS' are running at the same time. Good luck!

saikee 01-04-2007 07:46 AM

registering,

Should also tell each system runs at 50% of the ram and 1/4 if 4 systems are loaded.

kajangmarc 01-05-2007 03:17 AM

Resolved the issue!!
 
Quote:

Originally Posted by saikee
Next time when you are in Ubuntu add these lines to its /boot/grub/menu.lst
Code:

title My windows
root (hd0,2)
chainloader +1

if you have installed Windows in the 3rd partition as I speculate you need a swap and a partition for Ubuntu before XP was installed. Grub counts from 0.

Remeber there is no PC system that a Grub prompt cannot boot!

Thanks for the info... I'll use it next time i dual boot again, but i already resolved it another way. I agree that GRUB is the best and will boot anything but since i didnt have the knowledge necessary in time to fix my problem i resorted to installing another bootloader:

LILO!!

Lilo managed to find xp and ubuntu and with the lilo-config i finally could dual boot in peace. Actually i installed windows on hda2 which is (hdo,1) And i actually tried editing the menu.lst but it wouldn't work although i typed in just what you said.

I know the issue is resolved but i still want to know what went wrong with my procedure. Can someone tell me? First i installed linux from start to finish on my 40GB drive with no partitions. In gparted it will show two automatic partitions which is ext3 on hda1 and extended partition containing linux swap on another partition (not sure what the name is).
Then i resized ext3 with the livecd which created free space between ext3 and the extended partition. I then went on to create a fat32 partition in the free space. Finally i had ext3 on hda1, fat32 on hda2, extended on hda3 which contained the linux swap on hda5. I installed xp on the fat32 by doing a quick format into fat during xp install.
Then i could boot straight into windows. XP didnt recognise the other linux partition in 'my computer'. I used SUPERGRUBDISK and fixed grub boot on the MBR. I could then boot straight into ubuntu. Ubuntu didn't recognise the windows partition in 'computer'. There was only filesystem. I used SGD again to fix windows bootloader so i could now boot straight into windows and i was back at square one apparently and so it continued like that. I always needed SGD to boot into the other OS. Then i installed LILO and config'd it and im good. But windows still cant see linux and linux cant see windows which is something i'd like to fix.

So tell me guys, what went wrong from the start?

PS: thank you all so much for your help, i really appreciate it. Is my new problem something fixable?...

nilsa5 01-30-2009 02:06 PM

You can also do like this:

Quote:

root@nilsa-desktop:/home/nilsa# mount
/dev/sdc1 on / type ext3 (rw,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
lrm on /lib/modules/2.6.27-11-generic/volatile type tmpfs (rw,mode=755)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/nilsa/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=nilsa)
/dev/sda1 on /mnt/xp1 type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096)
/dev/sda5 on /mnt/xp3 type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096)
( For me )
And so:
Quote:

root@nilsa-desktop:/home/nilsa# update-grub /dev/sdc1
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.27-11-generic
Found kernel: /boot/vmlinuz-2.6.27-7-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

root@nilsa-desktop:/home/nilsa#


All times are GMT -5. The time now is 08:48 PM.