Can't install GNU/Linux after connecting external USB harddrive.
I connected an external usb drive to my computer and the next time I started it I got this message after choosing Ubuntu 7.04 or Windows XP in GRUB: "Error 29: Disk write error". Used XP disc to do fixboot and fixmbr which got Windows started. When I try to install Debian or Ubuntu I get this at the part where I accept partition changes: "Input/output error during write on /dev/hdb ERROR!!!" on Ubuntu and "Input/output error during read on /dev/ide/host0/bus0/target1/lun0/disc ERROR!!!" on Debian. dmesg gives me several: "end_request: I/O error, dev hdb, sector" and then a number. There were lots of 0 and 8 and a few 74252424. I just reformatted the drive with XP cd and installed XP, I also tried loading the optimized and then fail-safe defaults on BIOS but I *still* get that message when I get to the part where I accept partition changes, so I can't install either Debian or Ubuntu. Any ideas on what the problem is?
|
grub probably changes the lettering and numbering of the harddrive when the external one is plugged it
|
Quote:
Also I would find it odd that GRUB changed lettering/numbering all of a sudden. Those errors do seem to be caused by a malfunctioning (as in "not functioning quite the way it should") secondary (hard)disk, but if you plug the USB drive out, then shouldn't the problems vanish? Do they? |
GRUB was installed in master boot record so how can it still cause problems if I've done fixmbr with the Windows XP cd and even reinstalled?
Yes hdb refers to my internal IDE harddrive which is plugged in as slave (no reason for that other than that's how it turned out when I plugged it in the first time). I also have two other harddrives, sda and sdb, one which was /home and one which was only /media/sdb which contained everything I couldn't fit in /home. The external usb harddrive isn't plugged in, it only was for a short while. It had ntfs and I got a message that I didn't have permission to write to it, even when I was root, so I just gave up. |
Normally to boot a USB device you must instruct the Bios to boot it first. That gives the first bootable disk status to it. Therefore the MBR would be in the first sector of the USB disk.
The internal disk will not boot properly because it will be relegated to the second bootable disk status but all the OS were installed as the first boot disk. Also the USB device may not get the sda status as this is dependent on the relationship between the mobo connection and the Bios. Even if it is a sdc in Linux it can still be the first boot disk (hd0) to Grub. One needs to know how the boot disk order work reasonably well before trying to boot from a USB device. In general the sda, sdb, sdc etc are location-dependent and don't get changed once plugged but the disk order is one freely specifies in the Bios. Also SCSI/Sata/USB system names the disks consecutively. Thus removing sdb disk in the middle will force the one following sdc to take up its name. In case of doubt boot up a Live CD and type in root terminal Code:
fdisk -l Code:
grub That is the way to get the information from the horse's mouth, getting Linux and Grub to report how each sees your disks. |
I didn't try to boot from the USB hard disk. It was brand new and I connected it to move some files over to it, didn't work so I just ejected it and unplugged it, that was the end of it. And it's not mine so no advice on how to get it to work now :) Also I don't mind if everything on hdb gets lost as long as I can install GNU/Linux on it, obviously Windows installs on it just fine but i don't want to use that.
This is the boot order for hard disks in BIOS: Code:
1. Ch0 S. : ST340016A I forgot to do 'grub' but since I did fixmbr earlier I shouldn't have grub... right? Grub should be completely removed from my hard disk. This is what i got from 'fdisk -l' Code:
Disk /dev/sda: 200.0 GB 200049647616 bytes |
Don't kid yourself. The fixmbr merely overwrite the MBR which is 512 bytes large or the first sector with MS 's MBR.
You can destroy Grub by nuking the Linux partitions which you have sda1 and sdb1. You Windows can only boot if it was installed as the first disk and run as such. Your information doesn't tell us if the fisrt bootable disk is 400Gb or not. You should do geometry command in a Grub shell as suggested in Post #5. Seem to me you don't have an idea which of your 200Gb, 500Gb and 400Gb disk is the first bootable disk and could have restored the XP MBR to the wrong disk. In any case you haven't told us if your XP boots and you Linux doesn't have you? Under the normal circumstance the Pata disk will automatically get the first boot disk status unless the user specified otherwise. |
Why would GRUB end up in sda or sdb when I installed Ubuntu on hdb and only used sda as /home ? Either way I can't nuke sda and sdb since that's where I keep everything, hdb was for OS only.
I had Ubuntu and Windows XP on hdb, my 40gb hard disk. When I did fixmbr with the Windows XP cd I had to choose which hard disk to do it to, and the only choice was C: (where XP was installed, which is hdb) so I didn't restore MBR on the wrong disk. Yesterday I formatted the whole disk to NTFS and installed Windows XP on it, it boots just fine. It did before too when Windows was in a partition and Ubuntu was in another, after I did fixmbr to get rid of GRUB that is. Before I had done fixmbr neither Ubuntu or Windows would start when I chose them in the GRUB menu. ST340016A which is first in the BIOS boot order for hard disks is my 40gb hard disk and it is also bootable as you can see from the results that I got after doing 'fdisk -l'. I put in the Debian cd and chose to execute a shell, when I typed in 'grub' I got this: Code:
/bin/sh: grub: not found |
OK you 1st disk is now Xp.
Thus to install and boot a Linux you can either (1) Use Xp's boot loader NTLDR to boot Linux. Task E4 in the last link in my signature refers. or (2) Put another disk as first bootable disk. Install Linux or restore its boot loader. You then boot XP by switch the boot disk order on-the-fly, using commands inside Grub or Lilo. Section A of the second link of my signature refers |
Perhaps I misunderstand but I get the impression that to do nr. 1 I need to actually have GNU/Linux installed already (which I don't), is that right? If not, how will I get e.g. Ubuntu installed after doing those things if I can't even create a partition for it using the installation disc?
I don't want to keep Windows XP though, I'm just forced to use it. What I want is to completely remove Windows XP, fix the problem (whatever it is), and install Ubuntu. Nr 2. I can't do, my two other disks are full. |
Have you tried using the system rescue CD or RIP or something
to see if they can re-partition hdb? Cheers, Tink |
I haven't tried those but I did just try cfdisk with an old Slackware 9.1 cd. I deleted the NTFS partition which took up the whole disk and made two 7gb partitions at the beginning and one 2gb swap at the end. Then I put in the Ubuntu cd and got to the partitioning program in that. The first 7gb partition was NTFS, I guess that's because cfdisk didn't actually format the partition only created it so the old stuff was still in it (though WinXP wouldn't boot properly afterwards since I messed the partitions up). So I choose to format the first partition to ext3 and at first it looked like it was going to work but then it stopped and gave me this message:
Failed to create a file system The ext3 file system creation in partition #1 of IDEslave (hdb) failed. I then tried to delete all the partitions (we're still in ubuntu installer) and choose to install Ubuntu on the entire disk (hdb) instead of manually setting up the partitions. I then get this error message: The attempt to mount a file system with type ext3in IDE1 slave, partition #2 (hdb2) at / failed. So now I've at least gotten to more error messages (clues?). We're making some progress! :) |
you should just reformat and start from scratch
|
Well that's the problem, I can't.
|
When I tried installing Ubuntu on the entire disk (read post #12) I chose not to use sda and sdb so those weren't mounted but it still wouldn't work so obviously those are not part of the problem, right?
I have this in my notebook, I think it's from trying to install Slackware. Code:
[!!] Install the base system Code:
(here was date and time) kernel: [ 197.017785] end_request : I/O error, dev hdb, sector 812653 |
All times are GMT -5. The time now is 06:38 PM. |