Linux - NewbieThis 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
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[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.
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.
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.
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.
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)
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
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:
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
[/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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.