Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-26-2008, 08:05 AM
|
#1
|
|
Member
Registered: Jul 2007
Distribution: RedHat Enterprise 5 Server Edition; Ubuntu 8.04 ; RHCE Certificate number: 805008741034103
Posts: 78
Rep:
|
Booting Windows and Linux distros separately; from master & slave drives
My Motherboard Intel D865GBF supports 2 PATA IDE. In my case, it is 250 GB Seagate(master) & 40 GB(slave.) Using BIOS settings; I can select the drive to boot.
Presently, Windows XP has been installed on the master drive. RHEL5 & Ubuntu has been installed on the slave drives. GRUB containing entries for RHEL5, Ubuntu & Windows has been installed on the MBR Of the master drive.
My AIM is to: boot Windows & LInux distros independent of each other.
A thought came in my mind. If I select the master drive as 1st boot device, then I should be able to see only the bootloader of the Windows; & NO GRUB. consequently, no Linux distros
If I select the slave drive as 1st boot device, then I should be able to see the GRUB only with Linux distros as its entries. With No windows option available.
Is it possible? & How to proceed with it?
|
|
|
|
02-26-2008, 10:45 AM
|
#2
|
|
Senior Member
Registered: Sep 2003
Posts: 3,171
Rep: 
|
Sure it is possible. Why you would want to do it, since it requires you to go into bios and change the boot drive to switch OS is a mystery to me, but yes you can do it.
Just install grub on the slave drive, and reinstall the windows boot loader on the master drive.
Both operating systems will see the other drive, but Windows will ignore it because it isn't a Windows filesystem and Linux won't mount it unless you tell it to.
|
|
|
|
02-26-2008, 12:44 PM
|
#3
|
|
Senior Member
Registered: Dec 2007
Distribution: Mepis, Centos
Posts: 4,680
|
When you install GRUB on the second drive, make sure you specify that GRUB's stage one also goes on the second drive.
Some (I expect most) Linux installers "help" you with installing GRUB and when you install Linux on the second drive, they will default to installing most of GRUB on the second drive but stage 1 of GRUB on the first drive.
If you're installing GRUB without such help, it will be clear that you need to select places for both.
Quote:
Originally Posted by jiml8
Just install grub on the slave drive, and reinstall the windows boot loader on the master drive.
|
Edit: When I first wrote this post, I missed the detail in the first post of this thread that stage one of GRUB is already installed in the MBR of the master drive. So jiml8 is correct. You do need to reinstall the windows boot loader. I believe that is done with the fixmbr command. In this unusual case that windows is bootable despite needing its mbr fixed, you might be able to do that from within windows. Normally that must be done from the recovery media.
Last edited by johnsfine; 02-26-2008 at 04:51 PM.
|
|
|
|
02-26-2008, 04:41 PM
|
#4
|
|
LQ Newbie
Registered: Feb 2008
Posts: 3
Rep:
|
Hi
can you give a link or something that shows how to do these things?
for example: how to specify that GRUB's stage one also goes on the second drive?!!
sorry, i'm a complete newbie!
thanks!
|
|
|
|
02-26-2008, 04:59 PM
|
#5
|
|
Senior Member
Registered: Dec 2007
Distribution: Mepis, Centos
Posts: 4,680
|
Quote:
Originally Posted by k1he_not
Hi
can you give a link or something that shows how to do these things?
for example: how to specify that GRUB's stage one also goes on the second drive?!!
|
I'm not 100% sure. The fact that grub is already installed may make it easier or harder.
Is your linux partition sdb1? Or what?
Assuming you are booted already in linux in the partition containing most of the previous grub, I think it is as simple as
If that slave drive isn't sdb on your system, substitute the correct name.
If you are booted in Linux in a liveCD or a different partition, I think the command is
Code:
grub-install --root-directory=sdb1 sdb
Substituting the correct partition name (where most of grub is installed) in place of sdb1 and the drive name containing it in place of sdb.
Last edited by johnsfine; 02-26-2008 at 05:00 PM.
|
|
|
|
02-27-2008, 02:30 AM
|
#6
|
|
LQ Newbie
Registered: Feb 2008
Posts: 3
Rep:
|
thank you for answering me
ok here is what i'm going to do:
i have a SATA hard drive & a normal Hard drive (i dont know what this is called) and i'm going to install a windows on sata and a linux on the other one. i first install windows then linux. as articles say when i reboot the computer grub should load and show the both OSs, but it shows only the linux. in this situation the only way to swith between linux and windows is to change the first boot device from bios menu. i tried installing GAG boot manager (or boot loader, i dont know). it could load windows, but for linux, it says: boot sector not found, while i can boot linux by changing bios!
how can i choose "where to install grub" when i'm installing linux?
this the whole story!
by the way, i've got troubles using mouse in linux, help me here.
thank you
|
|
|
|
02-28-2008, 07:11 AM
|
#7
|
|
Member
Registered: Jul 2007
Distribution: RedHat Enterprise 5 Server Edition; Ubuntu 8.04 ; RHCE Certificate number: 805008741034103
Posts: 78
Original Poster
Rep:
|
/etc/fstab file of RedHat & Ubuntu distros
Quote:
|
Why you would want to do it, since it requires you to go into bios and change the boot drive to switch OS is a mystery to me, but yes you can do it.
|
The drives are PATA drives. I like to play around with the GRUB & partitions The Windows OS is shared by others. Any incomplete work done in GRUB; also makes Windows unbootable. Hence, I want to make the booting process of the Windows & Linux distros s.e.p.a.r.a.t.e
As, I have noted previously; I have 2 linux distros on slave PATA drive.
viz. RHEL5 & Ubuntu 7.04
Note:All the commands have been given through the RHEL5  distro.
This is the configuration of the partitions on my system, presently.
Code:
cat /proc/partitions
major minor #blocks name
3 0 244198584 hda
3 1 30523468 hda1
3 2 1 hda2
3 5 30523468 hda5
3 6 30523468 hda6
3 7 8385898 hda7
3 8 29358756 hda8
3 9 29358756 hda9
3 10 7341673 hda10
3 11 78180291 hda11
3 64 39121488 hdb
3 65 128488 hdb1
3 66 4192965 hdb2
3 67 1044225 hdb3
3 68 1 hdb4
3 69 522081 hdb5
3 70 16980673 hdb6
3 71 787153 hdb7
In the above output; the hda is the master PATA drive(Seagate).
hdb is the slave PATA drive(Samsung). Windows System Root(C:\)is installed on the hda1 partition.
Regarding RHEL5; /boot is on the hdb1 & / is on the hdb2.
Regarding Ubuntu 7.04; / is on the hdb6.
The swap space has been created on the hdb7.
These commands give the info bout RHEL5.
Code:
cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=/var /var ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
LABEL=SWAP-hdb7 swap swap defaults 0 0
Code:
cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=30
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
These command give information bout Ubuntu distro. Due to my fiddling around the GRUB & partitions; I had to grub-install through RHEL5 distribution to make, atleast RHEL5 & Windows accessible & hence, bootable.
Code:
cat /mnt/ubuntu/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb6
UUID=c7c8fdd7-6bfa-4e8b-b2a6-3c2c9b81af5e / ext3 defaults,errors=remount-ro 0 1
# /dev/sdb7
UUID=cd0b4abf-1b7f-4dc2-93ca-3a4eb8ae21f3 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=c7c8fdd7-6bfa-4e8b-b2a6-3c2c9b81af5e ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,6)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
root (hd1,6)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=c7c8fdd7-6bfa-4e8b-b2a6-3c2c9b81af5e ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd1,6)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=c7c8fdd7-6bfa-4e8b-b2a6-3c2c9b81af5e ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd1,6)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sdb2.
title Red Hat Enterprise Linux Server (2.6.18-8.el5) (on /dev/sdb2)
root (hd1,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img
savedefault
boot
Please suggest me the steps to
1. Make changes in the fstab files in each distro; to reflect the status of the drives.
2. Make changes in the grub.conf & menu.lst, to reflect the the changed order of the boot status.
3. Make changes in the grub configuration files of both the distros; such that both know; tht other exists 
4. Install GRUB on the slave drive.
Looking forward to your positive repl(y/ies)
|
|
|
|
03-03-2008, 06:42 AM
|
#8
|
|
Member
Registered: Jul 2007
Distribution: RedHat Enterprise 5 Server Edition; Ubuntu 8.04 ; RHCE Certificate number: 805008741034103
Posts: 78
Original Poster
Rep:
|
It is not possible to install GRUB on slave drive using the graphical installation provided in the live CD of Ubuntu7.04
|
|
|
|
07-11-2008, 05:22 AM
|
#9
|
|
Member
Registered: Jul 2007
Distribution: RedHat Enterprise 5 Server Edition; Ubuntu 8.04 ; RHCE Certificate number: 805008741034103
Posts: 78
Original Poster
Rep:
|
'map' is the keyword of this solution
Finally..Did It. Following points observerd
1. RHEL 5 doesn't identify the installation of Ubuntu 8.04. 
2. Manual addition has to be made in the grub.conf of RHEL5 .
These are the contents of the file.
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,2)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=30
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-8.el5)
root (hd0,2)
kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-8.el5.img
title Ubuntu 8.04, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=942080e2-43b7-47b6-a6f1-f31d708bbb7e ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04, kernel 2.6.24-19-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=942080e2-43b7-47b6-a6f1-f31d708bbb7e ro single
initrd /boot/initrd.img-2.6.24-19-generic
title WindowsXP Professional
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
Hence; I can now boot even Windows XP from the slave drive.
Here are the details
http://kbase.redhat.com/faq/FAQ_43_4053.shtm
Last edited by Mr. ameya sathe; 07-11-2008 at 05:34 AM.
Reason: RedHat Support Link
|
|
|
|
08-20-2009, 01:39 AM
|
#10
|
|
LQ Newbie
Registered: Aug 2009
Posts: 7
Rep:
|
Quote:
Originally Posted by Mr. ameya sathe
My Motherboard Intel D865GBF supports 2 PATA IDE. In my case, it is 250 GB Seagate(master) & 40 GB(slave.) Using BIOS settings; I can select the drive to boot.
Presently, Windows XP has been installed on the master drive. RHEL5 & Ubuntu has been installed on the slave drives. GRUB containing entries for RHEL5, Ubuntu & Windows has been installed on the MBR Of the master drive.
My AIM is to: boot Windows & LInux distros independent of each other.
A thought came in my mind. If I select the master drive as 1st boot device, then I should be able to see only the bootloader of the Windows; & NO GRUB. consequently, no Linux distros
If I select the slave drive as 1st boot device, then I should be able to see the GRUB only with Linux distros as its entries. With No windows option available.
Is it possible? & How to proceed with it?
|
Load first Windows XP & free some space for linux at the time installation of linux creating partion select free space for linux or othe r disk for installtion & create partion as per reqr. after complete the installtion at time of booting it will show two options one for windows (it may show other) & linux.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:07 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|