LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-03-2005, 10:48 AM   #1
richx2004
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Rep: Reputation: 0
Dual Booting


I'm a complete newbie when it comes to linux, but i decided to take the plunge and installed Ubuntu (5.04) on a spare 20GB hard drive. I'd hoped to get it to dual boot with my installation of Windows XP. I've been through the install prosess and installed the GRUB loader when requested as it successfully recognised my XP installation.

After the required reboot, my system booted straight into XP without even a hint of the GRUB loader. Im at a total loss for what to do now!

It might be worth saying i have 3 hard drives

a Seagate 120Gb With the windows partition on it
a WD 160GB for media
and a Seagate 20Gb with the Linux installation.

Any help would muchly appreciated

Rich
 
Old 11-03-2005, 11:11 AM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
To diagnose your problem you need to know the contents of some files in Ubuntu. That will not happen unless you have a Live CD to boot up to and do

(1) fdisk -l to list all the partitions in the three disks

(2) list the content of /boot/grub/menu.lst from the root partition of your Ubuntu here so that a solution can be proposed.

Also do you have a hidden partition doing back up for the XP?
 
Old 11-03-2005, 11:38 AM   #3
richx2004
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Original Poster
Rep: Reputation: 0
the fdisk -l came up with

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 14593 76260555 f W95 Ext'd (LBA)
/dev/sda5 5100 8934 30804606 7 HPFS/NTFS
/dev/sda6 8935 14593 45455886 7 HPFS/NTFS

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 2 19457 156280320 f W95 Ext'd (LBA)
/dev/hdc5 2 19457 156280288+ 7 HPFS/NTFS

Disk /dev/hdd: 20.0 GB, 20020396544 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 2330 18715693+ 83 Linux
/dev/hdd2 2331 2434 835380 f W95 Ext'd (LBA)
/dev/hdd5 2331 2434 835348+ 82 Linux swap / Solaris

I cant however seem to find the /boot/grub/menu.lst (i really am a newbie) how i can i find this info?

Cheers for your help
 
Old 11-03-2005, 07:15 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
OK

The root partition of your Linux appears to be in the hdd1 with hdd5 as the swap

If you are booting to a Live CD, as you should be, then you can get inside hdd1 as follow

Log in as root to the Live CD (need admin privilege) and use the terminal mode. In Ubuntu you need to click system, then click root terminal and supply a password.

make a temporary directory call hdd1 in /mnt and mount the partition /dev/ hdd1 on it. The commands are

mkdir /mnt/hdd1
mount /dev/hdd1 /mnt/hdd1

If the Live CD Linux doesn't object to the above your command prompt should change slightly, signifying you are now inside the Ubuntu

the text file that control Grub is /boot/grub/menu.lst

I have Ubuntu 5.10 and the essential entries in your case should be

Title Ubuntu 5.04 @ hdd1
root (hd2,0)
kernel /boot/vmlinuz-2.6.12-8-386 ro root=/dev/hdd1
initrd /boot/initrd.imh-2.6.12-8-386

title Windows xp @ sda1 of Sata disk
root (hd0,0)
chainloader +1

The above lines should boot boot systems. Grub counts from 0 so (hd2,0) means 1st partition of the 3rd disk. You have Sata as the first disk and so (hd0,0) = 1st partition of the first disk.

The kernel name may be different for you 5.04 version so just change the above to the one you have in /boot/grub/menu.lst

Save the file and try to reboot

One more thing the system file may be displayable in the desktop but only editable in root terminal. I believe you can use the graphic edition kwrite with the command

kwrite /boot/grub/menu.lst

Failing that you may have to use Linux 's standard vi editor to modify the file.

Good luck

Last edited by saikee; 11-04-2005 at 09:01 AM.
 
Old 11-04-2005, 08:48 AM   #5
redwing57
Member
 
Registered: Jan 2005
Location: Yorktown, VA
Distribution: CentOS, Ubuntu, MEPIS
Posts: 30

Rep: Reputation: 15
Since you are a newbie, and I know how that is, you might want to consider an alternate approach. At this point you don't have anything invested in your Ubuntu installation, so why not reinstall? I think you will be able to avoid the same booting problem.

When the installation gets to the part about installing grub, you will have some options:

- If you didn't let the installer put grub on your master boot record (MBR) last time, that may have caused your boot problem. Install grub on the MBR, finish the installation, reboot, and see if it boots to the grub menu. If so, you should be able to boot to both Windows or Ubuntu.

- If you prefer not to install grub on the MBR, create a boot floppy. Then your machine will boot to Windows unless you push the floopy in at boot time, in which case you will see the grub menu and be able to contunue booting into Ubuntu.

Rob
 
Old 11-04-2005, 09:18 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Booting in Linux is quite simple.

I booted 4 systems with XP after one month in it and 50+ after 1.5 years.

You should find in my post the following techniques which will be useful to any newbie

(1) How to get into a unbootable Linux with a Live CD using the change root technique

(2) The only two methods of booting any system in a PC; (a) by addressing its kernel with the kernel and initrd commands and (b) by chainloading as in the case of Windows

Some information may look nothing important but I boot every one of my 50+ systems using identically the same 3 lines of booting Windows in my previous post, amending only the description in the title line and the partition reference.
 
Old 11-05-2005, 07:48 AM   #7
richx2004
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for all your help guys.

I've tried a full reinstall, as suggested - as that was something i was most comfortable with. I opted to put Ubuntu 5.10 (x64 if that matters ?) on this time (i figured i might as well get up to date while im doing this) and made sure i wrote GRUB to the MBR.

Unfortunately that didnt solve any of my problems.

So i moved on to a different approach, i've booted to Ubuntu 5,10 live and (eventually) managed to open a root terminal (following saikee's instructions)

when i type the 'mount dev/hdd1 /mnt/hdd1' line i get:

root@ubuntu:/home/ubuntu# mount dev/hdd1 mnt/hdd1
mount: you must specify the filesystem type

could anyone please tell me what the right syntax is for specifying this ?

Sorry to be frustraightingly unknowledgeable!

Thanks in advance

Rich
 
Old 11-05-2005, 08:12 AM   #8
NightLord
LQ Newbie
 
Registered: Jun 2005
Distribution: Debian Sarge
Posts: 12

Rep: Reputation: 0
do mount dev/hdd1 /mnt/hdd1 -t ext3
 
Old 11-05-2005, 08:26 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Normally a modern Linux does not require to specify a filesystem type, even for non-Linux like the FAT and NTFS of Windows. Older kernels might need such information. I have over 40+ distros and I rarely have to use the -t parameter.

Your can try to specify type ext2 or ext3. The syntax is

mount -t ext2 dev/hdd1 mnt/hdd1, with the filesystem type after -t etc.

Only you would know what filesystem has been created in hdd1. Since the partition type is 83 native Linux the filesystem should be either ext2, ext3 or reiserf I would have thought, so try all three if you have to.

From my experience Linux only asks for the file type when there is something wrong with the partition.
 
Old 11-05-2005, 12:36 PM   #10
richx2004
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Using the -t ext 3 extention worked, but i was unable to edit the menu.lst

I needed to get to it through the root terminal in order to have 'write permissions' however i could not find the right BASH command for it. i did manage to navigate to the file though exploring the computer tab but it was locked as read only.

I would ask for the comand to execute this (i cant find it for looking), but then im only going to have to post again, for the right lines in the menu.lst to edit, as after looking at it i can see far too many similar entries - i'd be scared i got the wrong one!

so i think maybe i should take a different approach. could anyone point me to a good tutorial for producing a GRUB boot floppy?, then i can get into my distro properly - and learn my way around before asking technical questions!
 
Old 11-05-2005, 01:13 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
You can overcome the root privilege problem by typing su or sudo (for superuser) in the shell terminal. Live CD normally would waive the requirement for a password.

The bootable Grub floppy can be created once you have "chroot" to the distressed Linux and type (required root privilege)

grub-install /dev/fd0

Don't forget to pop a floppy into the drive before pressing the enter key of the above.

---------------------------

Lastly you can manually boot Ubuntu using a Grub floppy unattached to an operating system.

Steps to create a Grub floppy unattached to an operating system

Boot a Live Linux that support Grub (Ubuntu Live CD does), find the directory that stores Grub's stage1 (stage2 will be there too), change directory to it and use dd command to write stage1 and stage2 onto the floppy. The resulting Grub floppy will boot you into a Grub shell. Ccommands are

find / -name stage (assuming Linux reports back the directory is /boot/grub)
cd /boot/grub (alter this directory name to suit your own case)
dd if=stage1 of=/dev/fd0 bs=512 cout=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

Once you can boot into a Grub shell, type help to see the commads available. You also need to know the excat names of the kernel and initrz which are both in /boot directory. Write the files names down. I have Ubuntu 5.0.4 also but my kernel and initrd names may be different to yours if they are from different releases. Nevertheless I use them as an example to show how you can boot a Linux manually (the technique is applicable to all Linux (just alter the kernel & initrd names). Your Ubnuntu is in the 3rd disk 1st partition and that is (hd2,0) to Grub

Steps to boot a Linux manually with Grub

In manually booting Ubnuntu (you can still try it even after you have solve the booting problem) you boot to a Grub shell and type

root (hd2,0)

Grub is being told which is the root partition and will responds by telling you the filingsystem is type 83

kernel /boot/vmlinuz-2.6.8.1-3-386 ro root=/dev/hdd1

No message by Grub means OK

initrd /boot/initrd.img-2.6.8.1-3-386

No message by Grub means OK

boot

The above line trigger the booting process.

Enjoy the power of Grub!




Last edited by saikee; 11-05-2005 at 01:42 PM.
 
Old 11-09-2005, 07:27 AM   #12
Alan Lakin
Member
 
Registered: Sep 2002
Location: Wallington, Surrey, UK
Distribution: Ubuntu, Android phone
Posts: 119

Rep: Reputation: 15
I am quite interested in giving Kubuntu a try but I need a quick bit of reassurance before I dive in. For various reasons that I do not need to go into just now I have not installed lilo or GRUB to my MBR - I have boot floppies with both installed so that I always have a way out if I need one Does Kubuntu give the option of not installing a boot loader? I will configure my lilo boot floppy myself after the event. I do not want some nasty auto-install-press-this-button-and-I'll-do-it-all-for-you type set-up that messes up my box

Thanks.
 
Old 11-09-2005, 09:54 AM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Alan Lakin,

Can't be sure if Ubuntu provides to put the boot loader onto a floppy but it surly allow it to be installed in Ubuntu's root partition.

Say if it is installed in hdc6 you can amend /etc/lilo.conf of the Linux you booted with a Lilo floppy to include

other=/dev/hdc5
label=Ubuntu

then you pop the floppy back into the drive and type

lilo -b /dev/fd0

to update the floppy. Thereafter Ubuntu should be bootable from the floppy, as an additional alternative.
 
Old 11-09-2005, 11:24 AM   #14
Alan Lakin
Member
 
Registered: Sep 2002
Location: Wallington, Surrey, UK
Distribution: Ubuntu, Android phone
Posts: 119

Rep: Reputation: 15
Saikee,

I am trying to avoid any type of boot loader install to hard drive and simply want the option not to install a boot loader. I will amend my lilo floppy from my current Slackware install.

The reason I am pushing the issue is because I have heard of distros that do not ask, they just install a boot loader.

I am being careful because I have not yet found a way of booting WinXP using lilo or GRUB and do not wish to committ to a hard drive install until I know it works from floppy. I made the mistake of having an IDE HD, with a FAT32 partition on it, being connected when I installed WinXP to my SATA drive. WinXP saw the IDE as the first drive, decided to call that FAT32 partition C: and installed its boot loader to the IDE drive. That means that the WinXP system drive is D: and on my SATA drive. My linux install is also on the SATA drive. There is a technical issue of me installing the boot loader to the SATA drive whilst the first stage loader for WinXP is on the IDE drive. There probably is a way of doing it but hey I need a life The floppy solution works really well so I am not too concerned about sticking with that solution - but I do not want to break the system with a rogue distro auto-installing a boot loader.
 
Old 11-09-2005, 11:54 AM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
OK Alan,

Have a look at my post on creating a Grub bootable floppy "unattached" to an operating system. That floppy alone boots every of my 50+ systems. Naturally it boots my XP as well.

I understand your arrangement but believe it present no difficulty to Linux. There should be several system files, possibly the hidden boot.ini and NTLDR (or the file to detect NTLDR) in your C that points to the D drive for booting up your XP. Thus boot your C should get XP in the D.

I recommend that you give it a try, say using Lilo

Just add in /etc/lilo.conf

other=/dev/hda1
Label=DOS_XP

and remember to do a

lilo -b /dev/fd0

to update Lilo. Lilo should respond back by telling you DOS_XP added. If Lilo finds hda1 unbootable it wouldn't implement the changes in the floppy so you are quite safe.

----------------------------

If you do manage to create a Grub floppy unattached to an operating system, boot into a Grub prompt then there is a good possibility that your XP can be booted up by these 3 lines

root (hd0,0)
chainloader +1
boot

In booting Windows or DOS both Lilo and Grub "cut and paste" itself with second stage of Windows or DOS. That is why they should boot succesfully at the +1 sector position.

-------------------------------------

Also when worse comes to worst you canb always pop in a bootable DOS floppy and type

fdisk /mbr

to have your original Windows MBR back.
 
  


Reply

Tags
booting, dual



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Booting SuSE 9.2 & XP Pro/dual hard drives The_Bug Linux - General 3 01-04-2006 05:44 PM
dual booting hariiyer Linux - General 5 11-08-2004 03:07 PM
Dual dual booting with Suse 9.1 pro and windows 98SE UDflyer Linux - General 1 07-30-2004 02:37 PM
Are you dual booting and Windows stopped working (booting) then here's the answer: rberry88 Linux - General 1 02-12-2004 09:05 AM
booting ,dual booting kmadhukar Linux - Newbie 1 02-02-2002 09:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration