LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Slave Hard Drive (https://www.linuxquestions.org/questions/linux-hardware-18/slave-hard-drive-337772/)

dudeman41465 06-27-2005 04:33 PM

Slave Hard Drive
 
I just moved my Linux hdd to master position and my Windows one to slave position, but when I first installed Linux the Windows drive wasn't there. How would I go about adding Windows to the bootloader menu? I've already tried re-installing it.

marghorp 06-27-2005 06:01 PM

First identify the drive. Use fdisk -l to see on which partition the windows reside and which harddisk. Change the grub.conf file or lilo.conf file accordingly.

in GRUB.CONF

if you got fdisk results like this:
/dev/hdb1 NTFS

then the appropriate lines in grub.conf would be:
title Windows XP
rootnoverify (hd1,0)
chainloader +1

See the difference from /dev/hdb1 to (hd1,0)

and /dev/hda2 would be (hd0,1)

I hope you get the idea. Just experiment if you don't :)

stefan_nicolau 06-27-2005 06:08 PM

If you use GRUB, add this to your /boot/grub/menu.lst:
Code:

title Windows 2000
        rootnoverify (hd0,0)
        chainloader +1

Of course, change (hd0,0) to the right drive.

With lilo, this would be
Code:

other = /dev/hda1
label = win

Again, put the right drive.
don't forget to run /sbin/lilo!

dudeman41465 06-27-2005 07:28 PM

I can't find either of those files, I found the grub folder but neither of the files you mentioned. I'm running Mandrake 10.1 and I do have my folders set to show hidden files.

stefan_nicolau 06-27-2005 07:46 PM

What do you have in the grub folder?

dudeman41465 06-27-2005 08:58 PM

Contents of grub folder
http://i2.photobucket.com/albums/y45...entsofGrub.jpg

stefan_nicolau 06-27-2005 09:38 PM

I don't understand... There seems to be no configuration file! Please run the following commands to try to find it:
'find /boot -name grub.conf'
'find /etc -name grub.conf'
'find /boot -name menu.lst'

Please post the names and contents of any files it finds.

dudeman41465 06-27-2005 09:59 PM

Administration
 
It found it using the second command, however it says access denied, however I'm the primary user and should have administrative access to everything. The first and last commands gave no response at all, it just bumped down a line.

stefan_nicolau 06-27-2005 10:22 PM

Quote:

however it says access command, however I'm the primary user and should have administrative access to everything
I guess you mean that it says 'access denied', an you would like to have the right to do everything...

*sigh*The only user that can do anything on a UNIX system is root. Root can do anything, and that includes destroying the system, even without realizing it. (imagine the result of typing 'rm -rf /bin' instead of 'rm -rf bin' when you are in your home ***Don't try this***) All other users have limited rights.

To do system administration, use the su command to get temporary root access. Never work as root in a graphical environment! A broken program or a tiny mistake could very easily destroy your system (and I'm not even mentioning a possible malicious program). Use extreme caution when you have root access. Very small mistakes can cost you a lot! (for example, using > instead of >> to redirect output)

In short, to view the file:
Code:

me@mybox# su
Password:  <--- Type password, followed by <return>. You won't see anything.
root@mybox# cat /etc/grub.conf


dudeman41465 06-27-2005 11:00 PM

Ok Cool
 
Cool, I've got one terminal program installing Java, I'll bring up another one and see what I can do with my boot menu. Thanks :)

dudeman41465 06-27-2005 11:55 PM

It still says no such file found. Here's exactly what I got, figured I'd attach a pic since I'm new to this CLI and I may have put someting in wrong.
http://i2.photobucket.com/albums/y45...ndgrubconf.jpg

marghorp 06-28-2005 02:01 AM

Run /sbin/grub

This will drop you to a grub command line.

Run: root (hd0,0)

Replace hd0,0 accordingly with your boot partition numbers, where hd0,0 is your primary harddisk and 0 is your primary partition on that harddrive. If you are dual booting with windows, then hd0,0 is probably your C: partition.

once you run root (hd0,0) changed respectively, run:

setup

this will install the necessary files for GRUB.

Hope this helps.

stefan_nicolau 06-28-2005 06:19 AM

You said you found the file in /etc? Why are you trying to open it in /boot? The command is cat /etc/grub.conf (assuming that's where you found the file with find /etc -name grub.conf)

marghorp is right, you shoud follow his instructions.

About find:
Code:

find <filename> <--- Wrong
find <somewhere> -name <filename> <---Right

replace <filename> with the exact file name you are looking for (you can also use wildcards such as *)
replace <somewhere> with the directory in which the file should be found. Find is recursive. To search your whole system, use /

Also there is a locate command:
Code:

locate <part of the file name>
This is the same as 'find / -name *<part of the file name>*'
BUT locate uses a nightly list of the files on your computer, so it runs much faster. However, this also means that locate may list files that have been deleted since the list was created, and will not list new files.


All times are GMT -5. The time now is 07:46 PM.