LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 11-06-2004, 09:11 AM   #1
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Rep: Reputation: 15
Switching master/slave drives


I've realised that my hard drives are set up badly.
I have a 40GB Maxtor drive @ 5600 rpm as master (hda) and a 80GB Western Digital @ 7200 rpm as slave (hdb).

My problem is that I'm having trouble figuring out what parts of my system are on what disk. I had always though that the root partition, swap partition, MBR and LILO were on the big disk, but this seems not to be the case.

When I disconnect the small disk and put the big one as master, I get the LILO screen, but soon after selecting the default kernel I get a kernel panic error and booting stops.

in the / directory, typing df -k . gives :
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ide/host0/bus0/target1/lun0/part1
5542276 3703712 1557028 71% /

typing it in /home gives:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ide/host0/bus0/target1/lun0/part6
71133144 64045548 7087596 91% /home

In /boot I get:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ide/host0/bus0/target1/lun0/part1
5542276 3703736 1557004 71% /

These all seem to be part of the same (bigger) drive, so I don't know why the system won't boot without the smaller drive, or even with it as slave. I tried changing the boot order from HD0 to HD1 but it didn't help. I don't know which drive is HD0 and which is HD1.

Harddrake information for hda and hdb

Using Mandrake 10.0 and kernel 2.6.3-13mdk if it's any help.

Can anyone tell me what I might be overlooking and how to resolve this problem?

Thanks,
P
 
Old 11-06-2004, 09:50 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,217

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
Basically switching drives will mess up everything because now what was hdb is now hda and lilo can't find anything.

Your /etc/fstab file will show how each partition is mounted. Post the file.

Also look at the /etc/lilo.conf file this will tell you where lilo is being written to.
 
Old 11-06-2004, 10:30 AM   #3
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Original Poster
Rep: Reputation: 15
so it only assigns the drive letters at bootup based on their positions? Ahhh, makes sense now. Thanks for the help. Looking again at what I posted above, it seems the / and /boot partitions are actually on the small one.

FSTAB looks thus:
Code:
/dev/hdb1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdb6 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,sync,codepage=850 0 0
/dev/sda4 /mnt/usb vfat defaults 0 0
/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0
none /proc proc defaults 0 0
/dev/hdb5 swap swap defaults 0 0
lilo.conf begins like this:
Code:
boot=/dev/hda
map=/boot/map
default="linux"
keytable=/boot/uk.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
        label="linux"
        root=/dev/hdb1
        initrd=/boot/initrd.img
        append="devfs=mount acpi=ht splash=silent"
        vga=788
        read-only
so the boot is on the small drive. This is a bit of a mess, eh?
 
Old 11-06-2004, 01:30 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,217

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
The bootloader is being written to /dev/hda. You might of saved the bootloader to the second disk at sometime in the past.

It appears that linux is installed to the 2nd drive and according to you hdb is the big disk.
Your / partition is /dev/hdb1
Your /home is /dev/hdb6
And your swap is /dev/hdb5

And windows is on the first drive. Do you still use windows? If so then I do not see the need to change anything. So explain again what you want to change.
 
Old 11-06-2004, 08:15 PM   #5
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Original Poster
Rep: Reputation: 15
There's no Windows OS, but the small HD is a FAT32 partition, thath I use for temporary storing files copied from PCs.

The slower drive is master which I think slowing down teh performance of the bigger, faster drive.
I want to boot to the bigger drive and have it as master with the smaller drive as slave, only serving for temp storage.

I should be able to boot with only the big drive connected, als

Hope that's clearer.
 
Old 11-06-2004, 08:48 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,217

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
Having the slower drive as slave instead of master is not going to change the performance of the faster drive.

So exchange the drives as master / slave.
Boot the install CD to rescue mode. The / partition will be mounted. I do not remember the exact directory name. /mnt/???. If not then manually mount it. Remember it is now /dev/hda1 instead of /dev/hdb1.

Enter the command:
chroot /mnt/??? (where /mnt/??? is your / partition)
Then edit the /etc/fstab file to exchange what was /hdb with /hda and vice versa.

Next edit the /etc/lilo.conf file and change hdb to hda.
Rerun the lilo command to rewrite the changes to the MBR.
/sbin/lilo

Reboot the PC and if everything goes as planned your OS should boot.
 
Old 11-07-2004, 11:45 AM   #7
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Original Poster
Rep: Reputation: 15
Thanks. If the / partition isn't automatically mounted, how am I going to know the directory name (/mnt/???) to do it manually?

I was advised that there may be a problem of interference with the two drives (my hdparm -tT results are terrible and video playback is very jeky from the HD), so I wanted to check if there was an improvement by taking the smaller driver out of the equation. If you tell me that it doesn't matter which drive is master and which is slave, then I suppose I can skip swapping the jumpers and just reassign the boot partition to the bigger drive.
 
Old 11-07-2004, 12:03 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,217

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
Quote:
If the / partition isn't automatically mounted, how am I going to know the directory name (/mnt/???) to do it manually?
You create a directory using the mkdir command and then mount the partition to that directory.
 
Old 11-07-2004, 12:36 PM   #9
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Original Poster
Rep: Reputation: 15
Sorry, I'm just not getting it. I rebooted in rescue mode and picked the option to reinstall the boot partition, but it just put it back in the same place, without asking me where it should go.
So I disconnected the small drive and rebooted in rescue mode. Asked it to reinstall the boot loader and it hung.
Rebooted and went in to install/upgrade to try and remake the partitions, or even reinstall the OS if there was no otehr way around, but I got an error message saying there was no valid hard drive available to create a boot partition.

???

Last edited by pickarooney; 11-07-2004 at 12:53 PM.
 
Old 11-07-2004, 02:33 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,217

Rep: Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216Reputation: 2216
So I guess the computer doesn't boot anymore?
So how are the drives configured at the moment?
 
Old 11-07-2004, 02:44 PM   #11
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Original Poster
Rep: Reputation: 15
I switched them back to the original configuration so I could boot. Back to square one then. Sorry.
 
Old 11-08-2004, 01:02 PM   #12
pickarooney
Member
 
Registered: Aug 2003
Distribution: (X)ubuntu Maverick
Posts: 152

Original Poster
Rep: Reputation: 15
Going to try diskdrake to create a boot partition on hdb. Wish me luck...
 
  


Reply


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
slave not authenticating when master is down spyghost Solaris / OpenSolaris 3 10-04-2004 11:12 AM
Slave to Master? s9722 Linux - General 6 02-23-2004 10:34 PM
Slave to Master Question tkman Linux - General 2 11-23-2003 11:37 PM
Moving files from Master to Slave drives ch4s3r Linux - Software 11 10-23-2003 01:09 PM
Do 2 harddrives have to be Master/Slave? RAL Linux - Newbie 22 08-10-2003 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration