LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-14-2007, 10:49 PM   #1
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Rep: Reputation: 30
Second hard drive issue


Now working on a second computer which already has Ubuntu 6.06 installed. Have partitioned and formatted a second (larger) hard drive with partitions:

Quote:
Device Boot Start End Blocks Id System
/dev/hdb1 1 1217 9775521 83 Linux
/dev/hdb2 1218 1340 987997+ 82 Linux swap / Solaris
/dev/hdb3 1341 18362 136729215 83 Linux
/dev/hdb4 18363 19929 12586927+ 83 Linux
1 is boot, 3 is for /home, and 4 will be changed to fat32. 6.06 is installed

and have booted the original drive which has the following partition structure:

Quote:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3570 28675993+ 7 HPFS/NTFS
/dev/hda2 3571 4711 9165082+ 83 Linux
/dev/hda3 4712 4998 2305327+ 82 Linux swap / Solaris
The NTFS partition is corrupted, so this drive needs repartitioning and reinstalling.

After the reboot, I first tried to use the File Browser with the idea that I would simply copy the home directory from hda2 to hdb3, repart/reinstall hda with a structure more like hdb, copy /home back to the hda /home partition. However when I click on any partition, the Browser gives the message

Quote:
Unable to mount the selected volume
with details as:

Quote:
error: device /dev/hda[2-3] (or hdb[1-4])* is not removable
error: could not execute pmount
*(the "hda[2-3] (or hdb[1-4])" is my way of indicating that this is true for both drives and all linux partitions, although it will show the filesystem and home directories in hda2)

Here is fstab:

Quote:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda3 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
This newbie has suddenly jumped in over his head. I imagine that I need to figure out how to mount the hdb drive, but why is it giving the same message for hda?

Or am I not seeing a larger problem? Any guidance will be appreciated.
 
Old 01-14-2007, 11:19 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I don't know why it won't mount. Could the hard drive be physically failing?

You could certainly use any of the live CDs (knoppix, etc) to copy home from /dev/hda2 to /dev/hdb2 or whatever.

Peace,
JimBass
 
Old 01-15-2007, 09:50 AM   #3
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Thanx for the suggestion to use live CD. Will do and maybe somebody will have an idea on the hda2 mounting issue.

In one sense it is mounted cause I can peruse the file system and open files, it just gives this weird error message. Maybe the unmounted second drive is "contaminating" the browser.
 
Old 01-15-2007, 11:35 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
The unmounted drive shouldn't have any effect on the browser ooking at the first drive, but stranger things have been known to hapen.

Just FYI, you'll need to right click on the new drive under the live CD, and make sure the properties are changed so it can be written to. By default most live CDs mount read only, but that is easily changed to include the ability to write.

Peace,
JimBass
 
Old 01-15-2007, 03:27 PM   #5
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Jim, this is really emabarrassing, but have just realized that the 29GB is the corrupted Windows part. not the linux root.

Anyway that was more curiosity rather than need, so now trying to mount the second drive. Had made a mount point at /mnt/drive2, then:

Code:
mount /dev/hdb /mnt/drive2
but got an error message:

Quote:
mount: /dev/hdb already mounted or /mnt/drive2 busy
been googling up a storm, but can't figure out what is going on. Any thoughts?
 
Old 01-15-2007, 03:33 PM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yep. Do
Code:
cat /etc/mtab
That will tell us where everything is mounted. Either you have something else mounted to /mnt/drive2, or /dev/hdb? is mounted elsewhere.

By the way, since you partitioned it, you can't mount the entire /dev/hdb somewhere, you can only mount the individual partitions, like
Code:
mount /dev/hdb1 /mnt/drive2      (or)
mount /dev/hdb3 /mnt/drive2
You can't (AFAIK) mount an entire multipartitioned drive to a single mountpoint. Then what would the subdirectories of the mount become?

Peace,
JimBass
 
Old 01-15-2007, 05:39 PM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I second JimBass in assertion of the whole drive cannot be mounted.

One can have more than one partition and therefore more than one filing system inside a drive. An operating system can't cope if it has to switch around different filing systems for the reading/writing at same mounting point.

Also in mounting a partition its boot sector is excluded. If the whole drive is mounted it would look like a Swiss cheese with boot sector holes in every partition.

One can up to 63 partitions in a Pata. Modern Linux like a Slax will mount all of them automatically but never the as one drive.
 
Old 01-15-2007, 06:05 PM   #8
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Thanks for these.

Am now at the office and have brought the second hard drive with me. Understand about mounting partitions, not whole drive, and should have realized of course. Have now created two mount points for hdb1 and hdb3 (skipped hdb2 since it is swap) and mounted them.

This computer is running Ubuntu 5.04 and it's primary harddrive is really in need of repartioning, and upgrading (This was my first stab at Linux). AFAIK 5.04 does not have a browser like 6.06 does, but hopefully you will be able to set me straight if it is there. Can fdisk hdb, but can't figure out how to see hdb either in terminal or graphically Can you help me on this? (I will be copying /home over to hdb3 and then back to hda after repart and upgrade here as well.)

Here is output from mtab:

Quote:
/dev/hda6 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev /.dev unknown rw,bind 0 0
none /dev tmpfs rw,size=5M,mode=0755 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hdb1 /mnt/drive2a ext2 rw 0 0
/dev/hdb3 /mnt/drive2c ext2 rw 0 0
I am really in a muddle with this.
 
Old 01-15-2007, 06:13 PM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
If you did what JimBass told you to then you should see the files by
Code:
ls /mnt/drive2a
ls /mnt/drive2c
All ubuntu should have a file manager. It is the home icon. Just click it and look for / to get to the root directory.

The best and boomb proof way of moving a partition say from hdb1 to another partition say sda3 would be as follow, assuming sda3 has been formatted
Code:
mkdir /mnt/hdb1
mkdir /mnt/sda3
mount /dev/hdb1 /mnt/hdb1
mount /dev/sda3 /mnt/sda3
cd /mnt/hdb1
tar cf - . | (cd /mnt/sda3; tar xf -)
You will find hdb1 faithfully reproduced in sda3.

The idea is you go to the source directory, tar up the entire partition, go to the new directory and "un-tar" the entire filing system there.

Last edited by saikee; 01-15-2007 at 06:22 PM.
 
Old 01-15-2007, 11:26 PM   #10
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Had to leave due to ice storm coming in, but will implement this tomorrow (or as soon as the highways are open).

Small thing, but by "file manager" are you referring to a graphical file browser? In 6.06, when I click Places/Computer, it opens into a two pane window with /home and filesystem in left pane, and in the right pane:

Floppy Drive
CD-RW
the ersatz (corrupted) hda (described simply as 27.3GB Volume-Properties all unknown)
the partitions of the second drive (when connected)
filesystem

In 5.04, the same opens to a single pane with only the home and filesystem showing.

Is this an improvement in 6.06 or have I just not figured out how to get the two pane result in 5.04?

Many thanks for the guidance.
 
Old 01-15-2007, 11:33 PM   #11
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yes, by "file manager" Saikee means more or less, "the tool that allows you to look at files."

Both the single pane and the double pane window are available in both interfaces, it is just a different set of default rules. Chances are very good you could configure each to behave like the other if you desired it to.

Peace,
JimBass
 
Old 01-27-2007, 12:34 AM   #12
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
The ice finally melted, just in time for me to lightnin-a_s to the airport and squeak onto the plane. Now back and hope to get the drive sorted out tomorrow.

One other question occured to me while I was away. I plan to do the tar thing in any case, but since both drives are now hooked up to the computer (or were last time I saw it), is there any reason not to just copy the /home directory (and /var and /etc) over to hdb3 on the new drive? That is, what are the advantages of the tar method over the straight copy method?
 
  


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
Hard Drive Issue trubored Debian 8 06-27-2006 09:30 AM
Writing to Hard Drive issue? Tekerz Linux - Hardware 0 06-23-2005 03:47 PM
Hard Drive Issue The Oate Mandriva 6 07-28-2004 12:43 PM
Hard drive(s) issue randyriver10 Linux - Hardware 10 07-12-2004 05:57 PM
2nd hard drive issue aotweb Linux - Hardware 3 06-30-2003 11:50 AM


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