[SOLVED] removed 2 hard drives, not /, error 'corrupt partition table' on reboot
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
removed 2 hard drives, not /, error 'corrupt partition table' on reboot
Debian Etch, AMD64
I think I found the answer in 'man fdisk' but want to confirm before opening & un-plugging: will editing /proc/partitions, commenting out the 2 hard drives I want to remove, solve this problem, which prevents reboot until I reconnect these two hard drives? Thanks!
Oh, and of course I'll have to edit /etc/fstab also
That was the *only* thing I did previously before shutting down & unplugging the unwanted hard drives earlier. To clarify my question, is editing /proc/partitions the *only* other thing I need to do? Thanks again.
That was the *only* thing I did previously before shutting down & unplugging the unwanted hard drives earlier. To clarify my question, is editing /proc/partitions the *only* other thing I need to do? Thanks again.
You need to comment out any entries in /etc/fstab for the removed partitions. I doubt that editing /proc/partitions has any effect one way or the other.
You can’t edit /proc/partitions (at least not in the usual sense). It is a dynamically generated file, which gives all the partitions that are mounted in the kernel each time it is read. Writing to /proc/partitions has no effect since there is no write-handler (in fact it should not even be writable).
You can't edit /proc/partitions (at least not in the usual sense). It is a dynamically generated file, which gives all the partitions that are mounted in the kernel each time it is read. Writing to /proc/partitions has no effect since there is no write-handler (in fact it should not even be writable).
I did comment out the lines in fstab for the drives I want to remove, the first time I tried removing them. On reboot I encountered an error message, "corrupt partition table" and could not proceed except by re-connecting the IDE drives, which I'd like to transfer to another system. Has anybody else encountered a problem like this? It's easy to find a Linux How-To on installing hard drives, but Google returns no info (that I've noticed) about removing them. :-(
You need to comment out any entries in /etc/fstab for the removed partitions. I doubt that editing /proc/partitions has any effect one way or the other.
------------------
Steve Stites
Maybe I just need to umount them before I shutdown -h now. Would that cause /proc/partitions to be updated dynamically so that I could reboot without the unwanted drives?
Would that cause /proc/partitions to be updated dynamically so that I could reboot without the unwanted drives?
The state of a procfile before boot does not affect its state on a new boot. When the computer shuts down, the proc filesystem disappears (POOF!).
Quote:
Originally Posted by gr8scot
On reboot I encountered an error message, "corrupt partition table" and could not proceed except by re-connecting the IDE drives, which I'd like to transfer to another system.
What this seems like to me is that your boot partition or the bootloader is on the drive you are removing. The other drive has no bootloader. What you should do in this case is copy any files needed for booting (e.g., kernel images) to the other drive, and then install your bootloader on that drive.
The state of a procfile before boot does not affect its state on a new boot. When the computer shuts down, the proc filesystem disappears (POOF!).
What this seems like to me is that your boot partition or the bootloader is on the drive you are removing. The other drive has no bootloader. What you should do in this case is copy any files needed for booting (e.g., kernel images) to the other drive, and then install your bootloader on that drive.
That seems like what I would guess too, but I don't see how that could happen:
/dev/sda1 = /, which is the disk I'm leaving alone. I want to remove /dev/hdc, /dev/hdd and maybe /dev/sdb, all of which are "safely" mounted under /media, so I don't see how any of my boot partition could have gotten onto any of those drives. And the boot loader is where it belongs; I get the 'partition tables' error message after hitting Enter in Grub to boot my recently-compiled kernel.
You might have two bootloaders installed (one on hdc and one on sda), but only one is working. Or maybe it’s something completely different.
What is the output of:
Code:
fdisk -l
Also, is there any similar output in dmesg when you happen to boot correctly? Lastly, please post the exact error message (and some context preceding it).
You might have two bootloaders installed (one on hdc and one on sda), but only one is working. Or maybe it’s something completely different.
What is the output of:
Code:
fdisk -l
Also, is there any similar output in dmesg when you happen to boot correctly? Lastly, please post the exact error message (and some context preceding it).
Code:
fdisk -l
Disk /dev/hdc: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 1 38913 312568641 83 Linux
Disk /dev/hdd: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 1 38913 312568641 7 HPFS/NTFS
Disk /dev/sda: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 17495 140528556 83 Linux
/dev/sda2 17496 18241 5992245 5 Extended
/dev/sda5 17496 18241 5992213+ 82 Linux swap / Solaris
Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 38913 312568641 7 HPFS/NTFS
dmesg does not contain the word 'partition' on successful boot, and nothing applicable about any 'table.' Plenty about TCP & IP hash tables, and some CPU hash tables, though.
For the *exact* wording of the error message, I'll have to wait until at least tomorrow to reboot, but it occurs immediately after selecting a kernel to boot from GRUB. I have left the originally installed 2.6.18 kernel, three subsequent security updates from Debian, and the one I just compiled a few weeks ago. The error occurs regardless of which kernel I try to boot, which is no surprise as far as I know, but for all I know might be relevant after all.
It would be really nice if that "Device Boot" reported by fdisk -l tells you the problem. This is much deeper into the boot sequence than I've ever gotten before, and I feel completely lost.
I think the problem is described in 'root (hd2,0)' but I don't know what to make of it, except that it looks like something is looking for some data on one of my removed IDE drives instead of on the SATA boot device.
I think the problem is described in 'root (hd2,0)' but I don't know what to make of it, except that it looks like something is looking for some data on one of my removed IDE drives instead of on the SATA boot device.
grub numbers drives in relative order. The first hard drive it encounters is hd0, the second is hd1, the third is hd2. So in removing two drives and/or rearranging the drives the original hd2 may no longer be called hd2 by grub. You may have to go through /boot/grub/menu.lst and change all of its hdx parameters to reflect the new hard drive order.
grub numbers drives in relative order. The first hard drive it encounters is hd0, the second is hd1, the third is hd2. So in removing two drives and/or rearranging the drives the original hd2 may no longer be called hd2 by grub. You may have to go through /boot/grub/menu.lst and change all of its hdx parameters to reflect the new hard drive order.
-----------------------
Steve Stites
Cute that it uses a different nomenclature from /etc/fstab!!
OK, I'm changing the line
Quote:
root (hd2,0)
to
Quote:
root (sd1,0)
and I think it will work. If it doesn't, I'll have to whine about it from a different computer!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.