LinuxQuestions.org
Review your favorite Linux distribution.
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 10-10-2008, 10:05 PM   #1
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Rep: Reputation: 15
Thumbs up [Solved]How to change the boot order between 2 HDD?


Here is my situation:

I have debian etch installed on the machine. It is my webserver. I took a another hard drive (250GB) from another machine which has debian etch installed on it. It contains no data. I put this 250gb hardrive on my webserver machine thinking that i can use it at as a backup. when i booted the system it boots the debian from 250gb harddrive and not the other harddrive(40GB).

Here is what i want to do:

1. The machine should boot up from 40GB HDD.
2. I want to remove debian from the 250GB HDD. Format it and mount it and just use it as a backup for the 40GB HDD.

P.S Grub is installed in both the HDD

Plz advise...Thanks!

Last edited by linuxbee1; 10-17-2008 at 09:41 AM.
 
Old 10-10-2008, 10:07 PM   #2
smbell100
Member
 
Registered: Sep 2007
Location: Shetland, UK
Distribution: Slackware, Mandrake, LFS
Posts: 59

Rep: Reputation: 16
Enter the BIOS at boot. You should be able to sort the boot order there.
 
Old 10-10-2008, 10:17 PM   #3
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Original Poster
Rep: Reputation: 15
I did sort the boot order.

The boot order is
1.cd-rom
2. HDD

In my primary IDE master - cdrom
Primary IDE slave - 40GB
secondary IDE master - 250GB

The IDE configuration is as follows:
primary IDE master - 1st IDE
Primary IDE slave - 2nd IDE
secondary IDE master - 3rd IDE

what else do i have to change inorder to boot from 40GB HDD?
 
Old 10-10-2008, 11:37 PM   #4
smbell100
Member
 
Registered: Sep 2007
Location: Shetland, UK
Distribution: Slackware, Mandrake, LFS
Posts: 59

Rep: Reputation: 16
An interesting setup. Personally, when originally setting up the machine I would have made the 40GB drive Primary IDE master, and the cdrom Secondary IDE master, purely for speed as the IDE interface runs at the speed of the slowest device on it, and cdroms tend to be slower than hard drives.

If your BIOS is not giving you an option to choose between the two hard drives for booting, the only option really is to change the order of the drives on the IDE interfaces. I would put the 40 Gb as Primary IDE master. However this might mean changing the grub configuration.

Hope this helps
 
Old 10-10-2008, 11:44 PM   #5
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Original Poster
Rep: Reputation: 15
That means i need to physically change in the hardware and also the grub setting
 
Old 10-10-2008, 11:52 PM   #6
smbell100
Member
 
Registered: Sep 2007
Location: Shetland, UK
Distribution: Slackware, Mandrake, LFS
Posts: 59

Rep: Reputation: 16
I am afraid so. If the BIOS won't let you choose between the hard disks, you will need to change the order the BIOS finds them in.
 
Old 10-10-2008, 11:56 PM   #7
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for your replies.

let me try this tomm. and let you know how it goes.
 
Old 10-11-2008, 12:02 AM   #8
smbell100
Member
 
Registered: Sep 2007
Location: Shetland, UK
Distribution: Slackware, Mandrake, LFS
Posts: 59

Rep: Reputation: 16
I won't be back until tuesday i'm afraid. Hope it goes ok
 
Old 10-11-2008, 10:15 AM   #9
ghodkiller
Member
 
Registered: Jan 2005
Distribution: SuSE / Mandrake
Posts: 48

Rep: Reputation: 15
make the hdd you want your computer to boot from, the primary one. it should do the trick

Debian

Last edited by ghodkiller; 10-19-2008 at 07:30 AM.
 
Old 10-13-2008, 10:48 AM   #10
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Using the live cd I formatted the 250GB hdd.

If the set up is like:
primary IDE master - cdrom
Primary IDE slave - 40GB
secondary IDE master - 250GB

I get the grub error. Grub stage 1.5 Grub loading.....error 15

If my set up is like:
primary IDE master - cdrom
Primary IDE slave - 250GB
secondary IDE master - 40GB

The system tries to boot from 250GB hdd. When it tries to look at the /root files it just stays...since there are no files on the 250GB hdd.

Onething i noticed is that when i tried to start the machine with one hdd (40GB) connected. It gets the device name as hdc and boots without any problem. When I start the machine with 2 hdd connected. The dev name becomes hdb for 40GB and hdc for 250GB.

This is what is happenning to my system. what do i need to do if i want to boot my system from 40GB hdd? plz advice.
 
Old 10-13-2008, 11:55 AM   #11
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Going back to your origional post. Surely all you had to do was change /boot/grub/menu.lst so that root is on the hd you want.

So if grub thinks that the 250G thing is hd0 as it apparently did then change menu.lst on this drive so that root is hd1,whateverPartition also change the message that it sends to the kernel on the end of the kernel line is it? to: hdb or sdb or whatever.

Looking at your last post. Grub's trying to boot from the 250G? Suggest you put a small /boot partion on this drive with /boot/grub/menu.lst. Then this is the file grub'll use presumably.
If it's trying to boot from 40G then this unnecessary.

In the menu.lst file that grub is using make root apply to 40G, hd0 or hd1 I can't work it out, and at the end of the ?kernel line put the /dev for the 40G.

Grub may well have a different idea of the first hard drive than does the opperating system.
 
Old 10-13-2008, 01:40 PM   #12
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks lugoteehalt!

below is my menu.1st file:

title Debian GNU/Linux, kernel 2.6.18-6-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdc1 ro
initrd /boot/initrd.img-2.6.18-6-686
savedefault

As u mentioned in your reply I will change in the kernel line as root=/dev/hdc1 ro to root=/dev/hdb1 ro (since the 40gb is shown as hdb and 250gb is shown as hdc).

How do i find out whether 40GB is (hd0,0) or (hd1,0) or ? for the second line in root (hd0,0)
 
Old 10-13-2008, 07:09 PM   #13
louieb
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu 8.04
Posts: 94

Rep: Reputation: 17
Quote:
Originally Posted by linuxbee1 View Post
How do i find out whether 40GB is (hd0,0) or (hd1,0) or ? for the second line in root (hd0,0)
That would depend on where it is plugged in.
But to find out:
When you get the GRUB menu press c to get the grub> prompt
then enter
Code:
find /boot/grub/stage1
That will tell you where grub is and that is what you want to use in the root statement.

BTW: I agree with smbell100 You should plug in both hard drives to ide0 the 40 gig as master and the 250 gig as slave.
And the CD drive should be by its self in ide1.

Detailed Grub guide here with lots of examples IDBS GRUB Page

Last edited by louieb; 10-13-2008 at 07:11 PM.
 
Old 10-14-2008, 11:27 AM   #14
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally Posted by linuxbee1 View Post
Thanks lugoteehalt!

below is my menu.1st file:

title Debian GNU/Linux, kernel 2.6.18-6-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdc1 ro
initrd /boot/initrd.img-2.6.18-6-686
savedefault

As u mentioned in your reply I will change in the kernel line as root=/dev/hdc1 ro to root=/dev/hdb1 ro (since the 40gb is shown as hdb and 250gb is shown as hdc).

How do i find out whether 40GB is (hd0,0) or (hd1,0) or ? for the second line in root (hd0,0)
My guess is grub think 40 is hd0 and OS think 250 is 1st hd. In which case:

title Debian GNU/Linux, kernel 2.6.18-6-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.18-6-686
savedefault

But simplest thing is just trial and error. Change hd0 and /dev/hdc1 (where c come from? If two hd should be hda and hdb) till it works. 'e' to edit line in grub file when grub puts up its splash screen; b to attempt to boot.

Last edited by lugoteehalt; 10-14-2008 at 11:32 AM. Reason: Powerful surgings in the groin
 
Old 10-14-2008, 03:16 PM   #15
linuxbee1
LQ Newbie
 
Registered: Mar 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks a lot for your replies!

My set up:
primary IDE master - cdrom
Primary IDE slave - 40GB
secondary IDE master - 250GB

When i ran:
grub> find /boot/grub/stage1
I got hd(0,0)

During bootup using e, I edited the line root= /dev/hdb1 instead of /dev/hdc1

title Debian GNU/Linux, kernel 2.6.18-6-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.18-6-686
savedefault

I got something like this during bootup:

[/sbin/fsck.ext3(1)--/var] fsck.ext3 -a -C0 /dev/hdc6
fsck.ext3:no such file or directory while trying to open /dev/hdc6
The Superblock could not be read or does not describe a correct ext2 filesystem.......
and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
fsck died with exit status 8
file system check failed
Control-D will terminate this shell and resume system boot.
 
  


Reply

Tags
boot, grub config


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
How to Change Grub Boot Order Johnny Faster Ubuntu 15 02-05-2010 12:14 PM
Have to change boot order in BIOS to boot ubuntu/winxp Minn3h Linux - Software 7 04-01-2006 05:17 PM
RHEL install hdd in wrong order? how change jmral23 Linux - Software 2 08-16-2005 04:28 PM
how to change boot order Boomba Linux - Newbie 2 01-23-2004 07:33 AM
Change boot order? panicboy Linux - Software 6 01-21-2004 05:55 PM


All times are GMT -5. The time now is 08:39 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