LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boot (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-700033/)

yzhong 01-26-2009 05:01 PM

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

vinnywrite 01-26-2009 06:44 PM

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 :)

yancek 01-26-2009 09:16 PM

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?

yzhong 01-26-2009 10:21 PM

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...

yancek 01-27-2009 09:16 AM

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:


markush 01-27-2009 09:27 AM

Hi yzhong,

Quote:

Originally Posted by yzhong (Post 3422125)
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

yzhong 01-27-2009 06:18 PM

Quote:

Originally Posted by yancek (Post 3422812)
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

amani 01-27-2009 06:32 PM

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

yzhong 01-27-2009 06:40 PM

Quote:

Originally Posted by markush (Post 3422826)
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)

yancek 01-27-2009 07:58 PM

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.


All times are GMT -5. The time now is 03:44 PM.