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-2007, 08:29 AM   #1
rgreeves
Member
 
Registered: Sep 2006
Location: Tucson, Az.
Distribution: hardy heron
Posts: 111

Rep: Reputation: 15
hard drive removal


I have 2 hard drives installed. How do I physically identify /dev/hda or /dev/hdb so that I can remove the one hard drive from the system? After doing so how do I modify the proper file (grub??) to enable a proper boot?

Thanks for help.
 
Old 11-06-2007, 09:23 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,945

Rep: Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314
hda - mastter, hdb - slave
On an standard IDE cable with cable select (CS) the slave should be the gray connector but if the drives are not configured for CS you will have to physically look at their jumpers to make sure you have the correct one identified.

You will need to post your menu.lst and fstab files before anyone can determine what needs to be modified.
 
Old 11-06-2007, 04:35 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Testing"
Posts: 6,121

Rep: Reputation: 418Reputation: 418Reputation: 418Reputation: 418Reputation: 418
Other useful commands for sorting out what is what and where (you may need to be root for these to work) are:
fdisk -l
mount
 
Old 11-06-2007, 11:17 PM   #4
rgreeves
Member
 
Registered: Sep 2006
Location: Tucson, Az.
Distribution: hardy heron
Posts: 111

Original Poster
Rep: Reputation: 15
title Ubuntu 7.10, kernel 2.6.22-14-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-386 root=/dev/md0 ro
initrd /boot/initrd.img-2.6.22-14-386

title Ubuntu 7.10, kernel 2.6.22-14-386 (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-386 root=/dev/md0 ro single
initrd /boot/initrd.img-2.6.22-14-386

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/md0 / ext3 defaults,errors=remount-ro 0 1
/dev/md1 /dvdbackup ext3 defaults 0 1
/dev/md2 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/scd1 /media/dvd+rw udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/sda /media/usb0 auto rw,user,noauto 0 0
/dev/sdb /media/usb1 auto rw,user,noauto 0 0

fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00051b2f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6687 53713296 fd Linux raid autodetect
/dev/sda2 6688 9605 23438835 fd Linux raid autodetect
/dev/sda3 9606 9702 779152+ 82 Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 6687 53713296 fd Linux raid autodetect
/dev/sdb2 6688 9605 23438835 fd Linux raid autodetect
/dev/sdb3 9606 9702 779152+ fd Linux raid autodetect

Disk /dev/md0: 55.0 GB, 55002333184 bytes
2 heads, 4 sectors/track, 13428304 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

Disk /dev/md1: 24.0 GB, 24001249280 bytes
2 heads, 4 sectors/track, 5859680 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 797 MB, 797769728 bytes
2 heads, 4 sectors/track, 194768 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table

mount

/dev/md0 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.22-14-386/volatile type tmpfs (rw)
/dev/md1 on /dvdbackup type ext3 (rw)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev
 
Old 11-08-2007, 06:26 PM   #5
rgreeves
Member
 
Registered: Sep 2006
Location: Tucson, Az.
Distribution: hardy heron
Posts: 111

Original Poster
Rep: Reputation: 15
wow...no help??
 
Old 11-08-2007, 07:38 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,945

Rep: Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314Reputation: 4314
Have not played with software RAID much and it was a few years ago.
/dev/md0 is a software raid device which appears to be using USB drives /dev/sda and /dev/sdb. fdisk does not show any IDE drives but if the kernel is using the libata then IDE drives will be SCSI devices i.e. /dev/sda.

Use these commands to find out information about the raid array.
cat /proc/mdstat
mdadm --query /dev/md0

http://www.devil-linux.org/documenta...x/ch01s05.html
 
Old 11-08-2007, 10:41 PM   #7
rgreeves
Member
 
Registered: Sep 2006
Location: Tucson, Az.
Distribution: hardy heron
Posts: 111

Original Poster
Rep: Reputation: 15
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda3[1]
779072 blocks [2/1] [_U]

md1 : active raid1 sda2[0] sdb2[1]
23438720 blocks [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
53713216 blocks [2/2] [UU]

unused devices: <none>

/dev/md0: 51.22GiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail
 
  


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
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 09:19 AM
Grub Error 5 after drive removal stranger777 Linux - Newbie 4 04-09-2006 06:35 PM
hard drive removal sfzombie13 Linux - Hardware 5 07-19-2005 10:03 AM
Mounting a RAID-1 Drive after removal ? fire.wisp Linux - General 1 12-06-2004 11:33 AM
"GRUB error 15" after hard drive removal maxfacta Linux - General 2 08-31-2004 08:59 AM

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

All times are GMT -5. The time now is 08:32 AM.

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
Open Source Consulting | Domain Registration