Wednesday, January 24, 2007

Creating FC5 a rescue disk in USB stick from windows


All of us who love linux have this little pieces of it we do not dare to try, maybe we think we don't need to know how it is done, maybe it just looks too complicated to be bothered, maybe we are rushing to the nice, more exciting parts of our new Linux book and ALWAYS skip this one part. Why.. we will never need it?... WRONG! sooner or later we will need to know that piece of info.

In my particular case we are talking about creating a Rescue/Boot disc for linux (Fedora Core 5).

Why would you ever need to know this? I can think many scenarios. USB are for more portable and withstand more heavy usage than CDs and DVDs, so they are more likely to be ready when disaster strikes. Not all servers/desktops/laptops have CD-ROMs, even less likely they will have DVD-ROM drive. Normally I use a rescueCD+Net install from DVD. It is a fact that the more media is required on an installation, more things you have to go sour. (that LAST 4th CD of Fedora has a tiny scratch... and there goes those 30 mins of your life...).

So let's get to it:
In your distro you will find : \Images\bootdisk.img this contains ALL the necessary files required for the rescue media to be booted. Sadly it is not as easy as coying the file to the USB Drive. But it is not that hard either.

If you are on linux you could just do this:

dd if=diskboot.img of=/dev/sda1

et voilá! but as Mr. Murphy will have it, the server that is down will be for sure the ONLY one with linux and a DVD.

So, in your laptop you have windows installed, and a DVD ROM... (yes you know you have windows there!! admit it!)

Normally, you can read around and they will suggest that you use the rawrite utility, or it nice GUI cousin rawwritewin, but sadly those two
will only write to a Floppy Drive or will complain that they have no info in the sectors of that drive. So we are in trouble. Please stand up, and cheer our saviour:


dd for win which you can find here

Go ahead, download that and extract it to a directory, after that just type:

dd if=D:\diskboot.img of=\\.\E:

where D drive is your DVD-ROM and E: is your USB stick.

And you are ready.

Remember not all BIOS are created equal, be sure to check the boot order and see if USB is available at all. Else just like me you would have just wasted some time creating your own
USB FC5 rescue disk!!

Hope this help!! See ya!












2 comments:

Super Hector said...

I really like the FUN and PRACTICAL style of writing you got! Keep it up!

Anonymous said...

Well written article.