LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2009, 05:01 PM   #1
yzhong
Member
 
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Rep: Reputation: 16
Dual boot


Have a disk installed centos 5.0 and previously works fine (as a single disk in a computer).Now plug the disk to another computer as an external disk (use USB cable), which already running a windows xp. Now when I enter the boot menu, if choose boot from harddisk,it boots into windows xp (no problem) and if choose boot from usb, it start to boot into centos (but fail, only can see some message like booting into centos...).
I think the problem is the centos installed using the default settings, like /dev/mapper/VolGroup00-LogVol00...(pointed to /dev/sda),now it's as the second disk so system don't recognize it's /dev/sda. How can I manually modify this to make it work?

Thx in advance

Last edited by yzhong; 01-26-2009 at 07:11 PM.
 
Old 01-26-2009, 06:44 PM   #2
vinnywrite
Member
 
Registered: Jan 2007
Location: lexington NC.
Distribution: Ultimalinux 8.4 & Slackware 12.0.0
Posts: 82

Rep: Reputation: 16
post the output of

Code:
fdisk -l
you sead --(Have a disk installed centos 5.0 and works fine)----so I'm not shure what your asking?

sda,b are scsi disks like USB an ide disk will be hda,b,c so post the output of the line ubuve and we will see what you have
 
Old 01-26-2009, 09:16 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,537

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
If I understand your situation correctly, you had a hard drive with only CentOS on it, no other operating systems. You took this drive and put it in another computer which has xp and you are trying to boot CentOS by changing the boot priority in the BIOS to boot from the disk on which you have CentOS? Or are you booting from an entry in the xp boot.ini file?
 
Old 01-26-2009, 10:21 PM   #4
yzhong
Member
 
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Original Poster
Rep: Reputation: 16
yancek,yes,almost there...just didn't change the BIOS, only press F12, will get a boot menu on the screen, which list can boot from CDROM, Harddisk,USB...
 
Old 01-27-2009, 09:16 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,537

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
If you now have CentOS on a drive which already had xp on it, you will need to modify your bootloader. You can install Grub to the mbr of that disk and put an entry in /boot/grub/menu.lst for xp or you can modify the xp to boot CentOS. Never done that but the site below explains. It involves pputting Linux on a second drive so you will need to modify things a bit:

 
Old 01-27-2009, 09:27 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi yzhong,

Quote:
Originally Posted by yzhong View Post
I think the problem is the centos installed using the default settings, like /dev/mapper/VolGroup00-LogVol00...(pointed to /dev/sda),now it's as the second disk so system don't recognize it's /dev/sda. How can I manually modify this to make it work?
everything you have to modify are entries in /etc/fstab/. The fstab file connects the physical partitions of your harddrive with the filesystem of your linux. With "fdisk -l" check the names of your partitions and change them in fstab, after doing this everything should work. To change fstab you should enter your system with a live-CD.

Markus
 
Old 01-27-2009, 06:18 PM   #7
yzhong
Member
 
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by yancek View Post
If you now have CentOS on a drive which already had xp on it, you will need to modify your bootloader. You can install Grub to the mbr of that disk and put an entry in /boot/grub/menu.lst for xp or you can modify the xp to boot CentOS. Never done that but the site below explains. It involves pputting Linux on a second drive so you will need to modify things a bit:
Not really need this (even this can save not press F12 and pop up the boot menu), since already can boot to GRUB (already have in the second disk) from the boot menu, just fail in next step

Last edited by yzhong; 01-27-2009 at 06:19 PM.
 
Old 01-27-2009, 06:32 PM   #8
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
simply use the rescue mode in the centos install cd/dvd to correct all problems.

after chroot, you need to do

#grub-install /dev/sda

(or edit grub.conf in /boot/grub/...)


Also edit the file /etc/fstab
 
Old 01-27-2009, 06:40 PM   #9
yzhong
Member
 
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by markush View Post
Hi yzhong,


everything you have to modify are entries in /etc/fstab/. The fstab file connects the physical partitions of your harddrive with the filesystem of your linux. With "fdisk -l" check the names of your partitions and change them in fstab, after doing this everything should work. To change fstab you should enter your system with a live-CD.

Markus
1.It uses lv , not just simply change like /dev/sda1 to /dev/hda1 in /etc/fstab (plus I can't boot into the system atm)
...
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
...

2.I can boot to GRUB menu and did the following try.
1)press "a", boot to single, init=/bin/sh, emergency, but all fail
2)press "c" into command line,enter root (hd0,0) can find the second harddisk (first harddisk should be sda),enter find /grub/grub.conf can see the grub.conf,but enter kernel /vmliuz... it said can't find the file (the file it's there, use Tab key I can see what vm* files listed there)

3.Use live CD/first CD to boot (enter linux rescue), but in the last step, it said "no partition table in /etc/sdb" (not sure why the error said sdb not hda)

Last edited by yzhong; 01-27-2009 at 06:49 PM.
 
Old 01-27-2009, 07:58 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,537

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
When you boot your machine, you hit the F12 key to select which drive to boot from, then get the Grub boot menu??

If that's where you are at, you need to post your menu.lst as well as the output of the "fdisk -l" command to get any accurate help.
 
  


Reply



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
My FC6 / XP dual boot to FC10 / XP dual boot upgrade plan... is this sane? rylan76 Fedora - Installation 6 02-03-2009 07:31 AM
Dual linux boot and dual windows boot together? Stuart36 Linux - General 8 05-01-2007 11:53 PM
Installing dual Boot 98/Linux - WONT 'LILO' Dual Boot !? L1nux3d Linux - Laptop and Netbook 15 02-11-2006 05:36 AM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
hOw to dual boot linux suse with a dual boot win98/xp pc walterkai SUSE / openSUSE 1 12-14-2004 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:41 AM.

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