LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 06: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 08:11 PM.
 
Old 01-26-2009, 07: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, 10:16 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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, 11: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, 10:16 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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, 10:27 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
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, 07: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 07:19 PM.
 
Old 01-27-2009, 07: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, 07: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 07:49 PM.
 
Old 01-27-2009, 08:58 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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


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



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


All times are GMT -5. The time now is 06:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration