LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 07-12-2007, 10:04 PM   #1
kage_wing
LQ Newbie
 
Registered: Jul 2007
Location: Philippines
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 0
Ubuntu and XP on 2 separate disk?


Good day,

I'm a newbie at linux. I got an UBUNTU cd from a friend. I really liked the LIVE CD, so i decided to install ubuntu. I got an old Maxtor 40GB hard disk, formatted it using my XP (which was installed on a separate disk I currently using) NTFS then restarted my computer and installed ubuntu. I installed ubuntu on the second hard disk then choose manual (in the partitioning) It went ok, successfully installed ubuntu. I get into a boot loader (GRUB) everytime and there I can choose the OS, Ubuntu and XP.

The problem was, I want to use the second hard disk on another PC, I took out the second hard disk and inserted it on another PC. When I started it, I get a blank screen... no boot loader or whatsoever just plain blank.

I returned to my first pc turned it on and GRUB gives me and Error 21. I don't get this error when my second hard disk was in placed. I know I can repair this by fixing the MBR, but what about my second hard disk? how can I let it work on the second PC, will I have to reinstall Ubuntu again? or is there a way to fix the GRUB so that it can load it from there.

I really need your help from this...

and also, I need alternative ways on how to fix the MBR. I don't have XP installer cd and a floppy on my computer.

Last edited by kage_wing; 07-12-2007 at 10:07 PM.
 
Old 07-13-2007, 12:58 AM   #2
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
when you put the harddisk back in you messed up the grub numbers and lettering of the drives
you just need to determine the placement of the harddrives according to grub
 
Old 07-13-2007, 01:30 AM   #3
kage_wing
LQ Newbie
 
Registered: Jul 2007
Location: Philippines
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
i don't have problems when I insert the second drive. What I would like to know if how can I make Ubuntu work without the first drive. I mean, how will I let it work on another pc?
 
Old 07-13-2007, 01:31 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by kage_wing
I returned to my first pc turned it on and GRUB gives me and Error 21. I don't get this error when my second hard disk was in placed.
The reason this happened, is the MBR contains the first stage of the bootloader only. The MBR is 512 bytes (including parition table!), which does not allow much code. So the first stage in the MBR calls the second stage of the boot loader, which is (was) on your second drive. The second drive also contained the menu info (/boot/grub/menu.lst)


Quote:
I know I can repair this by fixing the MBR, but what about my second hard disk? how can I let it work on the second PC, will I have to reinstall Ubuntu again? or is there a way to fix the GRUB so that it can load it from there.
If you really haven't done any customization or have an user files, the simplest thing might be just to reinstall. However, with probably minimal work you can probably get this working w/o reinstalling. You would need to install the bootloader (MBR), edit /boot/grub/menu.lst and possibly edit /etc/fstab. Editing fstab is not necessary if all the refernces to partitions are by UUIDs, which I believe is the case. I am not sure if I am forgetting something else you would need to edit

I am assuming in what follows that this disk is the primary hard drive (/dev/hda or /dev/sda). With the hard drive in the system, boot the system from your Ubuntu live CD, and bring up a terminal.

Type the following (what you type is in bold):

Code:
user@box~$  sudo grub
grub>  root (hd0,0)
grub>  setup (hd0)
grub>  quit
user@box~$
That should install GRUB on your MBR.

To edit the configuration files, you need to first mount your installation partition, which I am assuming is /dev/sda1:

Code:
sudo mkdir /mtn/sda1
sudo mount /dev/sda1 /mnt/sda1
You now have access to all of the files on your Ubuntu installation. All paths must have /mnt/sda1 prefixed to them. For example /boot/grub/menu.lst will now be accessed as /mnt/sda1/boot/grub/menu.lst.

You need to edit menu.lst. Type sudo followed by the name of your favorite editor followed by /mnt/sda1/grub/menu.lst and change the line that currently reads

groot=(hd1,0)

to

groot=(hd0,0)

Save your edit, exit the editor and type:

Code:
sudo chroot /mnt/sda1 update-grub
Unless I have forgotten something :-/ , you should now be able to boot into your Ubuntu instalation.


Quote:
I need alternative ways on how to fix the MBR. I don't have XP installer cd and a floppy on my computer.
There is a Linux program called install-mbr (I have not used it) that is supposed to be able to handle this. In Ubuntu, this is in the mbr package which you can install:

Code:
sudo apt-get install mbr
It also exists on the KNOPPIX live CD if you want to get a copy, or you might check to see if it exists on the Ubuntu live CD. Read its man page for instructions.

EDIT: You will probably also want to remove the lines from menu.lst which refer to the XP installation. But you can wait until you are able to boot into your regular Ubuntu installtion, if you wish.

Last edited by blackhole54; 07-13-2007 at 01:41 AM.
 
Old 07-13-2007, 04:21 AM   #5
kage_wing
LQ Newbie
 
Registered: Jul 2007
Location: Philippines
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
I borrowed an xp cd from a friend so I can use its recovery console.

I read a suggestion to do fixboot on a disk with an MBR directing to UBUNTU, WILL IT affect GRUB from the second disk?

What problems may arrise if I use fixboot? fixmbr?

IS IT possible to re-install or overwrite ubuntu from my second disk from another pc by using LIVE CD?

thanks I really appreciate your help.

Last edited by kage_wing; 07-13-2007 at 04:26 AM.
 
Old 07-13-2007, 06:13 AM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by kage_wing
I borrowed an xp cd from a friend so I can use its recovery console.

I read a suggestion to do fixboot on a disk with an MBR directing to UBUNTU, WILL IT affect GRUB from the second disk?

What problems may arrise if I use fixboot? fixmbr?
I believe the recovery console you speak of is a Microsoft product. Are fixboot and fixmbr also Microsoft? I've never known much about Micrososft products past Win95, and I am rapidly forgetting what I used to know about that.

Quote:
IS IT possible to re-install or overwrite ubuntu from my second disk from another pc by using LIVE CD?
I am not sure what you are asking here. There is certainly no problem installing something over the Ubuntu installation you have already done. If you are (re)installing Ubuntu and wish to use the whole disk for it, I think you just tell it to use the whole disk. If necessary you can always go to a custom paritioning scheme. Be aware, however, I have never installed Ubuntu on a system with more than one hard drive, so I am not totally sure what options you would be presented with. Does that answer your question?
 
Old 07-13-2007, 07:00 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,799

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
First things first - fix the XP machine so it runs with only one hard disk installed.
Boot the CP CD, and get into recovery console. Run fixmbr, then take the CD out and reboot.
XP should boot o.k. (but not Ubuntu).

If you have to build Ubuntu on that machine, I'd suggest you change the BIOS boot disk to be the second disk, and re-install Ubuntu completely.
Reboot to ensure it (Ubuntu) boots properly, then take the second disk out, change the BIOS boot disk back to the first disk, and check XP boots as expected.

Install (second) disk in other machine.

Simple, and no clean-up of config files needed.
 
Old 07-13-2007, 01:20 PM   #8
kage_wing
LQ Newbie
 
Registered: Jul 2007
Location: Philippines
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you very much for the help. I really appreciated it.

I solve the problem with my first disk, I inserted the XP CD, Run Recovery Console, run fixmbr. I finally got to boot windows.

One thing I noticed, when the two Disk were inserted, I inserted the XP CD, Run Recovery Console and typed fixboot. It didn't affect anything. I was afraid to use fixmbr because it gave me a warning that some partitions will be lost. So XP means the UBUNTU partitions.

Another problem arised, I deleted UBUNTU's partition using disk management from windows xp. Transfered the disk to the computer where I want it to run.

It's spec are:

Intel Celeron 1.7Ghz (S478)
Asus P4 Mobo (S478) (i forgot the model)
2x 128mb ram
80 GB Maxtor Harddisk (the second disk which I previously had Ubuntu on now formatted as NTFS by windows)
A DVD-ROM.

It was really slow, I had to click the install icon 3x before the installation window appears.

On the 4th Level of installation, I get to choose where to install ubuntu(by the way my second disk has 4 partitions)

I tried to use 1st partition to mount the "/" root and the second one was the swap.

Then suddenly when the partition manager loads up, and detects my file systems my pc justs freezes (no BOSD).

My question, does ubuntu run on Celeron?
or does it need more memory for me to install it?

I really want to try ubuntu (I'm a newbie at linux), as of now I installed a fresh xp on my PC because my lil bro will use it for his study.

Hope you could give me an idea about this. Thanks
 
Old 07-13-2007, 02:22 PM   #9
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
Quote:
Originally Posted by kage_wing
Thank you very much for the help. I really appreciated it.

I solve the problem with my first disk, I inserted the XP CD, Run Recovery Console, run fixmbr. I finally got to boot windows.

One thing I noticed, when the two Disk were inserted, I inserted the XP CD, Run Recovery Console and typed fixboot. It didn't affect anything. I was afraid to use fixmbr because it gave me a warning that some partitions will be lost. So XP means the UBUNTU partitions.

Another problem arised, I deleted UBUNTU's partition using disk management from windows xp. Transfered the disk to the computer where I want it to run.

It's spec are:

Intel Celeron 1.7Ghz (S478)
Asus P4 Mobo (S478) (i forgot the model)
2x 128mb ram
80 GB Maxtor Harddisk (the second disk which I previously had Ubuntu on now formatted as NTFS by windows)
A DVD-ROM.

It was really slow, I had to click the install icon 3x before the installation window appears.

On the 4th Level of installation, I get to choose where to install ubuntu(by the way my second disk has 4 partitions)

I tried to use 1st partition to mount the "/" root and the second one was the swap.

Then suddenly when the partition manager loads up, and detects my file systems my pc justs freezes (no BOSD).

My question, does ubuntu run on Celeron?
or does it need more memory for me to install it?

I really want to try ubuntu (I'm a newbie at linux), as of now I installed a fresh xp on my PC because my lil bro will use it for his study.

Hope you could give me an idea about this. Thanks
First of all Linux does not BSOD only windows does
My computer which I installed ubuntu from the livecd was a p3 @ 600 mhz and 256 mb of ram so I would imagine that you oculd install it from the livecd or you could try the alternate install cd
 
Old 07-13-2007, 06:33 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,799

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Those hardware specs should be fine.
Boot the liveCD again, but don't try the install this time. From a terminal window (Applications -> Accessories -> Terminal) enter the following commands,and post all the output here
Code:
free -m
sudo fdisk -l
Edit: corrected the "free" command.

Last edited by syg00; 07-15-2007 at 01:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install Windows in a separate Hard Disk? arindom Linux - Hardware 14 03-29-2007 09:02 AM
Migrate Directory to Separate Disk Partition Neapolitan Red Hat 1 01-18-2006 01:51 PM
loading Ubuntu on a separate drive Rory in Toronto Ubuntu 4 04-10-2005 07:41 AM
Install Red Hat linux on separate disk Micik Linux - Newbie 4 12-06-2004 09:58 AM
XP on a separate disk and GRUB config greg108 Linux - Newbie 3 08-10-2004 11:48 PM


All times are GMT -5. The time now is 06:44 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration