Tech Support Guy banner

Second hard drive issue

2616 Views 35 Replies 2 Participants Last post by  saikee
Now working on a second computer which already has Ubuntu 6.06 installed. Have partitioned and formatted a second (larger) hard drive with partitions:

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:

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

Unable to mount the selected volume
with details as:

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:

# /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.
Not open for further replies.
1 - 15 of 36 Posts
In order to assist we need to know the following

(1) Which Linux you are able to boot? as you have 2, one in hda and one in hdb. You show us the fstab and complaining a mounting problem with partitions in hda. That implies you are running a Linux in hda. If it runs then hda2 must have been mounted or else you Linux won't boot. If you boot Linux from hdb then why show us the fstab of the Linux in hda? Linux in hdb has its own fstab for mounting only hdb partitions. Your post suggests none of the partitions can be mounted.

(2) output of "fdisk-l" as you have now. As we do not know if hda1 has been deleted or not or if additional partitions created since then, as you mentioned a reboot. You started thread with a reference to a second computer and what is the connection? Is hda in one computer and hdb in another?

(3) Your problem in mounting is associated with the difficulties experienced by the filing manager. Can you mount the partitions manually yourself? Show us the /mnt directory of the boot up Linux.
See less See more
Yes all the things you want can be done but you need to get your hands dirty.

You can boot a Linux originally installed in a master (hda) but subsequently moved to a slave (hdb).

You can have Grub to boot either system for you.

Both will not happen automatically.

Your first priority is to readjust the partition referenece of the Linux installed in hda but now resides in hdb. If this is an Ubuntu then you need to edit

(1) /boot/grub/menu.lst
(2) /etc/fstab

After editing the above you can then edit the Linux in the master disk hda's boot loader to boot the second Linux. Again if it has Grub it will be editing its /boot/grub/menu.lst but this time it is the one in hda.

Take a look at the last link of my signature on how to mount the second Linux with the boot-up first one. You need root privileges to edit the system files and this can either by obtained by "su" at the terminal followed by the password or prefix every command with "sudo".

Like I said previously you need to post the output of "fdisk -l" for others to advise you on the correct steps.

You don't need to re-install any system but need to change the partition reference of the two above-mentioned system files. A re-install can get you out of the difficulty at the expense that you don't learn anything from it.
See less See more
When you see the Grub screen offering you the booting choices pressing "c" key can drop you into a Grub prompt. You can then ask Grub to report to you all the partitions of 1st disk (hd0) and the 2nd disk (hd1) it sees by
geometry (hd0)
geometry (hd1)
You can also ask Grub which partition has a boot configuration file menu.lst by
find /boot/grub/menu.lst
If Grub reports (hd0,1) that means one is found in the 2nd partition of the 1st disk and you can fire it up by
configfile (hd0,1)/boot/grub/menu.lst
Any time you wish to go back from the Grub prompt to the first original screeen you can do so by
root (hd0)
chainloader +1
Linux reserves hda1, hda2, hda3 and hda4 as the primary partitions and first logical partition always starts at the 5th position.

Partition Type 0xb is Fat32.

You last post confirms Grub didn't get your 2nd hard disk. Since Grub uses the information handed down by the Bios then Bios also didn't detect the 2nd disk.
If you have it configured wrong then the Bios will reject it.

Say you have both disks jumpered as master or plugged the cable the wrong way round or the power supply plug didn't fully pushed in.

It is time to check the electrical connections.
I take it you know connecting the end plug of the cable to an IDE device automatically makes it the master and the device plugged to the middle plug becomes a slave when both devices are set to "cable select".
I shall look at your information only after the hard ware has been fully recognised.

If you set IDE devices on cable select then all of them must be on cable select!

Can you try this out and report you have two disks recognised before proceeding to the next problem?
OK we are getting somewhere. You now have two disks.

The next thing I need to know is which part does not work and requires help. Equally tell us which parts boot satisfactorily.

Regarding your queries on the partition table. My explanation would be as follow:-

You fstab is only relevent to the Linux installed in hda6 because it is to be mounted as the root "/" .

The reason you have no swap is because you ran out of disk space and the Linux was forced to do without it at the expense of a slower speed.

According to your hda disk you could have told the partitioner to start the logical partition from the bottom of the hard disk so that hda5 occupies the very rear of the disk. In the middle is hda6. The front end of the disk is hda3. hda1 is just an extended partition defining the two extremes of you logical partitions.

Your partition is healthy but OS always alerts you any unusual feature.

It looks to me you have another Linux in hdb and there should be another /etc/fstab in possibly hdb4 since you talk about /home in hdb3.

From now on please do not change the disk order.

If you have access to Grub issue these commands and post its output here
geometry (hd0)
geometry (hd1)
as the output confirm which is the 1st and 2nd disk.
See less See more
I shall assume that you are booting from hda. That means you have access to the Linux in hda6.

Your Grub output confirms hda is the 1st disk (hd0), as Grub counts from 0. Your hda6 is shown up there as the partition 5.

I don't know why you say "partition hdb1 is / on this drive" as your fstab does not indicate any of the partition from hdb would be mounted.

To get the second /etc/fstab you need to mount the partition first by commands
mkdir /mnt/hdb1
mkdir /mnt/hdb3
mount /dev/hdb1 /mnt/hdb1
mount /dev/hdb3 /mnt/hdb3
find / -name fstab
The above should return two location of /etc/fstab. Post the missing one here.

Also post the /mnt/hdb1/boot/grub/menu.lst and the /boot/grub/menu.lst of the boot up Linux in hda6.

I shall need you boot the second system
See less See more
I don't know how the new UUID system works in Ubuntu and would rather re-write its fstab. However before we do that can you try to boot it manually as follow using the existing fstab (possibly causing a panic)

When you see a Grub boot screen press "c" will drop you to a Grub prompt. These lines should fire up the Ubuntu in hdb
root (hd[color=red]1[/color],0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hd[color=red]b[/color]1 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
OK can you mount /dev/hdb1 on /mnt/hdb1 and edit /etc/fstab using possibly
sudo mount /dev/hdb1 /mnt/hdb1
sudo gedit /mnt/hdb1/etc/fstab
and implement the following changes in /mnt/hdb1/etc/fstab
proc /proc proc defaults 0 0

/dev/hdb1 / ext3 defaults,errors=remount-ro 0 1

/dev/hdb3 /home ext3 defaults 0 2

/devhdb4 /media/hda4 vfat defaults,utf8,umask=007,gid=46 0 1

/dev/hdb2 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdc /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/ /media/floppy0 auto rw,user,noauto 0 0
The red bits are the actual alterations required.

The above should stop it from a panic.

If things work out the lines you manually boot up the Ubuntu in hdb are the commands needed to be put inside the /boot/grub/menu.lst of hda6 (in hda), except you need an identifcation with the "title" statement at the beginning like
title My other Ubuntu in hdb1
. You can add the lines now to save typing them in every time. Grub wouldn't mind to boot it for you.
I colored the red bits to assist you to do less typing. The black bits are from your original fstab untouched by me. Basically I delete the UUID references and replace them with the device names. UUID is new and haven't been used in many Linux but the device names can be found by all Linux kernels.

You need the full line in each case. If I were you I copy and paste the whole lot over the existing file.

I have requested that you should never unplug the hard disk connections from now on. If you do the disk order can be messed up again. Therefore to boot the system manually you boot up sda6 Linux's Grub screen and press "c" to get a Grub prompt. You then type line by line as shown in Post #25 to boot the Ubuntu in sdb1 manually.

I like you getting the hands dirty by manually boot up a Linux and your Post #26 suggests you have done that. Did you cheat? Believe me it gives us a kick in the feeling if you manage to boot up a system manually. You are then grabbing Grub by its horns and has this bugger serve you as a slave forever.

OK here is the menu.lst you should have (just copy and paste the whole lot) in the sda6's /boot/grub/menu.lst (I delete the lines with # as those are not acted on)
default 0
timeout 10
title Ubuntu, kernel 2.6.10-6-386 
root (hd0,5)
kernel /boot/vmlinuz-2.6.10-6-386 root=/dev/hda6 ro quiet splash
initrd /boot/initrd.img-2.6.10-6-386

title Ubuntu, kernel 2.6.10-6-386 (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.10-6-386 root=/dev/hda6 ro single
initrd /boot/initrd.img-2.6.10-6-386

title Ubuntu, kernel 2.6.10-5-386 
root (hd0,5)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda6 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-386

title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda6 ro single
initrd /boot/initrd.img-2.6.10-5-386

title Ubuntu, kernel memtest86+ 
root (hd0,5)
kernel /boot/memtest86+.bin 

[color=red]title My other Ubuntu in sdb1
root (hd1,0)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hdb1 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic
Again I have colored the bits red that you would have to add.
See less See more
You have learned how to mount a partition manually now. Once it is mounted you will see it in Nautilus. It is the same if you boot to the other Linux.

It is exactly the same thing if you hook any USB device.

To mount it automatically you add an entry to fstab.

Enjoy Linux.
No need to thank me.

I am just passing the information other members of the forum had taught me.

Linux itself is very logical. If you are not in a hurry you can reason some of the bits out yourself after using it for a while.

It is an unselfish and public system that we can all share knowledge together.
I have been installing quite a few of OS especially Linux and many things are obvious to me so I offer suggestions to others like yourself to get the system up and running. In giving out instructions it helps me to consolidate my understanding of the subject too, as I have to be certain the advice will hit the mark.

I can't get everything right. If I make a mistake hopefully other more experienced Linux users can step in and so I can learn from my mistakes as well.

It does give me a kick in getting my predictions right in your case.

I thank you for a good response. Many got the problem sorted, walked away and wouldn't let me know if the advice any good to them. That makes me nervous giving out advice to the next one.

I enjoy Linux and derive pleasure in seeing others enjoying it too. You are pretty quick too in picking up the ideas. Many have to be taken by the hand.

In future if you think we can be of help just post your threads here.
1 - 15 of 36 Posts
Not open for further replies.