• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Why is there no warning that Linux installs FUBAR your MBR even on USB installs

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

c627627

c(n*199780) Senior Member
Joined
Feb 18, 2002
Each time I booted off of an Ubuntu flash drive, I had to re-download the Repositories and so I asked people how can I include them as part of a flash drive boot, so I can use the flash drive anywhere. After a long time of trying to unsuccessfully figure out how to do this, finally someone suggested I install Ubuntu from one flash drive to another.

[RANT]I couldn't understand why this wouldn't immediately occur to everyone half-way familiar with Linux from the get go but anyway.... [/RANT] So now I finally get around to doing it and even though I installed Ubuntu from one flash drive to another, Windows won't load unless the flash drive is in.

I reimaged my hard drive only to find out the hard way that Linux actually FUBARS your Master Boot Record which cannot be fixed even if you reimage your entire hard drive back. I fix the thing by booting with a Windows 98 boot floppy then FDISK/MBR but there really should be a warning when installing Linux that this is going to happen.


But why is Linux messing with my hard drives when I am not installing Linux on any of them is what I don't understand!?


Next I'll try physically disconnecting all hard drives and repeating the process in hopes that the flash drive by itself will contain all that is necessary to boot off of it since Linux will be prevented from accessing anything but the flash drives.


I also wanted to drive image the flash drive once I install Linux on it, can this be done inside Windows?
[RANT]Also found out the hard way that all recent versions of Norton Ghost of course cannot image flash drives no matter what is on them - only hard drives [why!?! %$@#!] [/RANT]


So can I drive image my Linux install on a flash drive from Windows and if so how?


EDIT EDIT EDIT EDIT
http://www.runtime.org/driveimage-xml.htm

DriveImage XML will image flash drives.


Double click on Setup.exe to install the program.

Created images can only be restored to Flash Drives which have the same or larger size as the original drive regardless of how big the actual content of the image was.


You may get the following error message, but the program was tested to work correctly if you simply select to Continue:

Could not initialize Windows Volume Shadow Service (VSS).
Code: ERROR 8004230C.
Make sure VSSVC.EXE is running in your task manager.
Click Help for more information.

Volume could not be properly locked.
You can still continue but the backup image might be damaged.


Also:

Here is what actually happened, there are two parts to the bootloader. The first part is the GRUB loader that gets written to the MBR. The second part consists of the binary modules, configuration, etc. needed to boot your operating systems. The second portion usually is stored in the /boot folder of the partition you install to. Now the GRUB loader is told where to look for this GRUB folder, and if it can't find it (USB drive is removed), you won't be able to boot. These two components can and often are written to different drives.

The real issue is what I consider a user-interface bug in the Ubuntu installer. Instead of explicitly prompting the user regarding where the boot loader should be installed, it usually assumes /dev/sda (first bios drive) and gives you the option on a drop-down menu that is easy to skip through. So you do have the ability to tell Ubuntu where to put the boot loader, it's just easy to miss it. Also there was a bug with previous versions where even if you told it where to install the bootloader, it would still install on /dev/sda. Perhaps this is what you encountered.




[...]While the Ubuntu installer will overwrite the MBR, it will install a boot-loader that handles switching between Windows and Linux with aplomb. The problem c627627 had only occurred because he was installing to a removable USB drive.
 
Last edited:
Well I am not really up on windows technology, I am assuming you are trying to take an image of your usb drive?

What format is required? if iso is ok I would say that you can boot into a livecd and use the program 'dd' to make an iso

Code:
dd if=/your/usb_drive of=/path/your_image.iso

as for grub, here is the thing, unless you specify during the install it assumes that it should be the controlling bootloader because Windows doesn't play nice with other OS' and therefore their bootloader is kinda useless. Thus grub puts itself onto the MBR of the primary boot drive by default.

If you're installing something like ubuntu or one of its derivatives, at one point instead of clicking 'next, next ,next' you will notice a screen which gives you a little 'advanced' tab for bootloader options. There you can specify installing grub to the usb device instead of the MBR. In this case you will be required to change the boot order in order to boot off the usb, but it will leave the windows bootloader in tact

Hopefully that helps clarify a few things
 
I reimaged my hard drive only to find out the hard way that Linux actually FUBARS your Master Boot Record which cannot be fixed even if you reimage your entire hard drive back. I fix the thing by booting with a Windows 98 boot floppy then FDISK/MBR but there really should be a warning when installing Linux that this is going to happen.

This can actually done with any windows disc and you boot into repair mode. It will kick you into a shell were you back just simply type fix mbr (i believe... there is an associated easy command if thats not the exact one)
 
What you want is the persistence option. There are a few distros that explicitly state they are good for USB. Toorox is one I know of but I haven't messed with them lately. I was working with virtualbox for a minute but even that was a pita.
 
↑ YES!

UbuntuInstall.jpg
Simply use universal usb installer http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
Since installed it onto a 2GB flash drive this is howm much space was left.

And once created that way - it will remember all the changes!
Thank you.


Disconnecting all hard drives and installing from one USB flash drive to another also worked but it took forever and the contents of the newly created flash drive installation were not visible under Windows.


However, when I used the universal usb installer, all contents were visible under Windows. Now, I know I can use Linux to make images but when I tried to simply copy the contents of the newly created USB Flash drive to another flash drive - it would not boot - because some boot information was not copies over.



Where on the flash drive is that boot info? There appears to be only one partition on the flash drive created by the use universal usb installer. How do I crate an image of this usb drive that includes everything, and do so under Windows?


EDIT:
Modern Imaging software such as Norton Ghost cannot make drive images of USB Flash Drives but WinImage can. Do you know of any open source USB Flash Drive image creating software for Windows?
 
Last edited:
Modern Imaging software such as Norton Ghost cannot make drive images of USB Flash Drives but WinImage can. Do you know of any open source USB Flash Drive image creating software for Windows?


win32 disk imager can make an image from a usb drive. it is what i suggest people use when creating an overclockix usb drive from windows and it can also create images from existing drives like you are asking for:
https://launchpad.net/win32-image-writer/+download
 
no problem :) i haven't actually tried to use it to create an image from a usb drive before so i'm glad that it worked.
 
Back