Hey guys, I seem to have gotten myself into a bit of a bind. I just bought a 1.5TB external USB hard drive, and decided I wanted Ubuntu back and would install it seperatly on that so I could also keep Windows 7 on my laptop.
Using an official Ubuntu disk, I selected my external HDD and chose the option "use all of the hard drive". When it came time to reboot, I get a grub message: Error 21. I disconnected the external HDD and tried booting into windows 7, same error. Now I can't get into either OS, and I can only use the CD drive.
I really need my laptop back so some good advice would be very much appreciated!
Ubuntu on external HDD
Page 1 of 15 Replies - 1239 Views - Last Post: 17 May 2010 - 02:04 PM
Replies To: Ubuntu on external HDD
#2
Re: Ubuntu on external HDD
Posted 14 May 2010 - 11:52 PM
Do you have an actual Windows 7 install disc (and not the "recovery disks" by laptop manufacturers)? If so, you can fix the problem. Grub modifies the MBR, to support booting from Ubuntu. You just need to restore this MBR.
A MS Knowledge base article points you in the right direction (you should use bootrec /fixmbr). You can also Google for repetitions of this advice, some of them with screenshots.
Then you can try again with GRUB. Or you can experiment first, then fix the MBR if you've trashed it! For the record, I've dual booted successfully using an external before, and I had to take a few additional steps, because as the ubuntu article indicates, some computers especially older ones don't support booting from USB devices.
If you keep regular backups, and can use the Windows 7 CD to fix the MBR, then you can play around with grub. Once you manually get into linux, you can modify the grub configuration to handle the external automatically. I can't recall what I actually did, but it probably was similar.
A MS Knowledge base article points you in the right direction (you should use bootrec /fixmbr). You can also Google for repetitions of this advice, some of them with screenshots.
Then you can try again with GRUB. Or you can experiment first, then fix the MBR if you've trashed it! For the record, I've dual booted successfully using an external before, and I had to take a few additional steps, because as the ubuntu article indicates, some computers especially older ones don't support booting from USB devices.
If you keep regular backups, and can use the Windows 7 CD to fix the MBR, then you can play around with grub. Once you manually get into linux, you can modify the grub configuration to handle the external automatically. I can't recall what I actually did, but it probably was similar.
#3
Re: Ubuntu on external HDD
Posted 16 May 2010 - 11:41 AM
Fixing the MBR can create useless partitions, you can lose all the data on your HD.
Often, erasing the first partition will erase the MBR. I don't know why, but it does. If you have a Windows 7 *INSTALLATION* disk, then I think you should simply do a reinstall. Let's see what other members have to say about it.
Often, erasing the first partition will erase the MBR. I don't know why, but it does. If you have a Windows 7 *INSTALLATION* disk, then I think you should simply do a reinstall. Let's see what other members have to say about it.
#4
Re: Ubuntu on external HDD
Posted 17 May 2010 - 06:49 AM
The MBR is located within the 1st 512 bytes of the hard drive.
The following command will backup your MBR (on Linux)
dd if=/dev/hda of=/tmp/mbr.backup bs=512 count=1
Be sure to change source & destination accordingly.
The following command will backup your MBR (on Linux)
dd if=/dev/hda of=/tmp/mbr.backup bs=512 count=1
Be sure to change source & destination accordingly.
#5
Re: Ubuntu on external HDD
Posted 17 May 2010 - 09:35 AM
no2pencil, on 17 May 2010 - 05:49 PM, said:
The MBR is located within the 1st 512 bytes of the hard drive.
The following command will backup your MBR (on Linux)
dd if=/dev/hda of=/tmp/mbr.backup bs=512 count=1
Be sure to change source & destination accordingly.
The following command will backup your MBR (on Linux)
dd if=/dev/hda of=/tmp/mbr.backup bs=512 count=1
Be sure to change source & destination accordingly.
Wait, they don't need to backup the MBR, they need to erase it. However, erasing the first 512 bytes of HD also erase the partition table on some machines. If you wanna restore the MBR, do this:
1. Use a Linux Live CD like CRUX. Download it and burn it to a disc. Also download testdisk (http://www.cgsecurity.org/wiki/TestDisk_Download) for Linux and save it on a USB.
2. Boot from the Live CD, first erase the first 512 bytes of MBR using the following:
dd if=/dev/zero of=/dev/hda1 bs=512 count=1
3. Now mount the USB and cd to the directory where testdisk is saved. Run it. You choose these preferences:
ANALYSE .... NO LOG ... SEARCH .... (I do not remember their sequence). Soon it will give you a list of all you partitions. MAKE SURE IT IS THE CORRECT LIST WITH THE CORRECT DISK SIZES! If it is not, then select the DEEP SEARCH option given at the bottom.
4. Once you have the correct list of partitions, write it to disk. Now your MBR has been erased and the partition table written on it again. GRUB is gone!
#6
Re: Ubuntu on external HDD
Posted 17 May 2010 - 02:04 PM
Page 1 of 1

New Topic/Question
This topic is locked



MultiQuote



|